diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index d3f66fa..2cc4f56 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -1,3 +1,4 @@ [ - "obsidian-git" + "obsidian-git", + "obsidian-importer" ] \ No newline at end of file diff --git a/.obsidian/graph.json b/.obsidian/graph.json index e206ceb..db3e1c7 100644 --- a/.obsidian/graph.json +++ b/.obsidian/graph.json @@ -17,6 +17,6 @@ "repelStrength": 10, "linkStrength": 1, "linkDistance": 250, - "scale": 1.0000000000000004, + "scale": 0.3628873693012124, "close": false } \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-importer/main.js b/.obsidian/plugins/obsidian-importer/main.js new file mode 100644 index 0000000..ebfef8a --- /dev/null +++ b/.obsidian/plugins/obsidian-importer/main.js @@ -0,0 +1,229 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source, please visit the github repository of this plugin +*/ + +var ud=Object.create;var vi=Object.defineProperty;var fd=Object.getOwnPropertyDescriptor;var dd=Object.getOwnPropertyNames;var md=Object.getPrototypeOf,hd=Object.prototype.hasOwnProperty;var Y=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Se=(n,t)=>{for(var e in t)vi(n,e,{get:t[e],enumerable:!0})},ts=(n,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of dd(t))!hd.call(n,r)&&r!==e&&vi(n,r,{get:()=>t[r],enumerable:!(i=fd(t,r))||i.enumerable});return n};var ns=(n,t,e)=>(e=n!=null?ud(md(n)):{},ts(t||!n||!n.__esModule?vi(e,"default",{value:n,enumerable:!0}):e,n)),gd=n=>ts(vi({},"__esModule",{value:!0}),n);var Do=Y((Ax,Ll)=>{"use strict";Ll.exports=ih;function ih(n,t){for(var e=new Array(arguments.length-1),i=0,r=2,o=!0;r{"use strict";var zi=$l;zi.length=function(t){var e=t.length;if(!e)return 0;for(var i=0;--e%4>1&&t.charAt(e)==="=";)++i;return Math.ceil(t.length*3)/4-i};var wn=new Array(64),Ml=new Array(123);for(Ye=0;Ye<64;)Ml[wn[Ye]=Ye<26?Ye+65:Ye<52?Ye+71:Ye<62?Ye-4:Ye-59|43]=Ye++;var Ye;zi.encode=function(t,e,i){for(var r=null,o=[],a=0,s=0,l;e>2],l=(c&3)<<4,s=1;break;case 1:o[a++]=wn[l|c>>4],l=(c&15)<<2,s=2;break;case 2:o[a++]=wn[l|c>>6],o[a++]=wn[c&63],s=0;break}a>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,o)),a=0)}return s&&(o[a++]=wn[l],o[a++]=61,s===1&&(o[a++]=61)),r?(a&&r.push(String.fromCharCode.apply(String,o.slice(0,a))),r.join("")):String.fromCharCode.apply(String,o.slice(0,a))};var Pl="invalid encoding";zi.decode=function(t,e,i){for(var r=i,o=0,a,s=0;s1)break;if((l=Ml[l])===void 0)throw Error(Pl);switch(o){case 0:a=l,o=1;break;case 1:e[i++]=a<<2|(l&48)>>4,a=l,o=2;break;case 2:e[i++]=(a&15)<<4|(l&60)>>2,a=l,o=3;break;case 3:e[i++]=(a&3)<<6|l,o=0;break}}if(o===1)throw Error(Pl);return i-r};zi.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var jl=Y((Nx,Ul)=>{"use strict";Ul.exports=Gi;function Gi(){this._listeners={}}Gi.prototype.on=function(t,e,i){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:i||this}),this};Gi.prototype.off=function(t,e){if(t===void 0)this._listeners={};else if(e===void 0)this._listeners[t]=[];else for(var i=this._listeners[t],r=0;r{"use strict";zl.exports=Hl(Hl);function Hl(n){return typeof Float32Array!="undefined"?function(){var t=new Float32Array([-0]),e=new Uint8Array(t.buffer),i=e[3]===128;function r(l,c,p){t[0]=l,c[p]=e[0],c[p+1]=e[1],c[p+2]=e[2],c[p+3]=e[3]}function o(l,c,p){t[0]=l,c[p]=e[3],c[p+1]=e[2],c[p+2]=e[1],c[p+3]=e[0]}n.writeFloatLE=i?r:o,n.writeFloatBE=i?o:r;function a(l,c){return e[0]=l[c],e[1]=l[c+1],e[2]=l[c+2],e[3]=l[c+3],t[0]}function s(l,c){return e[3]=l[c],e[2]=l[c+1],e[1]=l[c+2],e[0]=l[c+3],t[0]}n.readFloatLE=i?a:s,n.readFloatBE=i?s:a}():function(){function t(i,r,o,a){var s=r<0?1:0;if(s&&(r=-r),r===0)i(1/r>0?0:2147483648,o,a);else if(isNaN(r))i(2143289344,o,a);else if(r>34028234663852886e22)i((s<<31|2139095040)>>>0,o,a);else if(r<11754943508222875e-54)i((s<<31|Math.round(r/1401298464324817e-60))>>>0,o,a);else{var l=Math.floor(Math.log(r)/Math.LN2),c=Math.round(r*Math.pow(2,-l)*8388608)&8388607;i((s<<31|l+127<<23|c)>>>0,o,a)}}n.writeFloatLE=t.bind(null,ql),n.writeFloatBE=t.bind(null,Wl);function e(i,r,o){var a=i(r,o),s=(a>>31)*2+1,l=a>>>23&255,c=a&8388607;return l===255?c?NaN:s*(1/0):l===0?s*1401298464324817e-60*c:s*Math.pow(2,l-150)*(c+8388608)}n.readFloatLE=e.bind(null,Zl),n.readFloatBE=e.bind(null,Yl)}(),typeof Float64Array!="undefined"?function(){var t=new Float64Array([-0]),e=new Uint8Array(t.buffer),i=e[7]===128;function r(l,c,p){t[0]=l,c[p]=e[0],c[p+1]=e[1],c[p+2]=e[2],c[p+3]=e[3],c[p+4]=e[4],c[p+5]=e[5],c[p+6]=e[6],c[p+7]=e[7]}function o(l,c,p){t[0]=l,c[p]=e[7],c[p+1]=e[6],c[p+2]=e[5],c[p+3]=e[4],c[p+4]=e[3],c[p+5]=e[2],c[p+6]=e[1],c[p+7]=e[0]}n.writeDoubleLE=i?r:o,n.writeDoubleBE=i?o:r;function a(l,c){return e[0]=l[c],e[1]=l[c+1],e[2]=l[c+2],e[3]=l[c+3],e[4]=l[c+4],e[5]=l[c+5],e[6]=l[c+6],e[7]=l[c+7],t[0]}function s(l,c){return e[7]=l[c],e[6]=l[c+1],e[5]=l[c+2],e[4]=l[c+3],e[3]=l[c+4],e[2]=l[c+5],e[1]=l[c+6],e[0]=l[c+7],t[0]}n.readDoubleLE=i?a:s,n.readDoubleBE=i?s:a}():function(){function t(i,r,o,a,s,l){var c=a<0?1:0;if(c&&(a=-a),a===0)i(0,s,l+r),i(1/a>0?0:2147483648,s,l+o);else if(isNaN(a))i(0,s,l+r),i(2146959360,s,l+o);else if(a>17976931348623157e292)i(0,s,l+r),i((c<<31|2146435072)>>>0,s,l+o);else{var p;if(a<22250738585072014e-324)p=a/5e-324,i(p>>>0,s,l+r),i((c<<31|p/4294967296)>>>0,s,l+o);else{var m=Math.floor(Math.log(a)/Math.LN2);m===1024&&(m=1023),p=a*Math.pow(2,-m),i(p*4503599627370496>>>0,s,l+r),i((c<<31|m+1023<<20|p*1048576&1048575)>>>0,s,l+o)}}}n.writeDoubleLE=t.bind(null,ql,0,4),n.writeDoubleBE=t.bind(null,Wl,4,0);function e(i,r,o,a,s){var l=i(a,s+r),c=i(a,s+o),p=(c>>31)*2+1,m=c>>>20&2047,y=4294967296*(c&1048575)+l;return m===2047?y?NaN:p*(1/0):m===0?p*5e-324*y:p*Math.pow(2,m-1075)*(y+4503599627370496)}n.readDoubleLE=e.bind(null,Zl,0,4),n.readDoubleBE=e.bind(null,Yl,4,0)}(),n}function ql(n,t,e){t[e]=n&255,t[e+1]=n>>>8&255,t[e+2]=n>>>16&255,t[e+3]=n>>>24}function Wl(n,t,e){t[e]=n>>>24,t[e+1]=n>>>16&255,t[e+2]=n>>>8&255,t[e+3]=n&255}function Zl(n,t){return(n[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24)>>>0}function Yl(n,t){return(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0}});var Co=Y((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(n){}return null}});var Kl=Y(Vl=>{"use strict";var Io=Vl;Io.length=function(t){for(var e=0,i=0,r=0;r191&&l<224?a[s++]=(l&31)<<6|t[e++]&63:l>239&&l<365?(l=((l&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,a[s++]=55296+(l>>10),a[s++]=56320+(l&1023)):a[s++]=(l&15)<<12|(t[e++]&63)<<6|t[e++]&63,s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,a)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,a.slice(0,s))),o.join("")):String.fromCharCode.apply(String,a.slice(0,s))};Io.write=function(t,e,i){for(var r=i,o,a,s=0;s>6|192,e[i++]=o&63|128):(o&64512)===55296&&((a=t.charCodeAt(s+1))&64512)===56320?(o=65536+((o&1023)<<10)+(a&1023),++s,e[i++]=o>>18|240,e[i++]=o>>12&63|128,e[i++]=o>>6&63|128,e[i++]=o&63|128):(e[i++]=o>>12|224,e[i++]=o>>6&63|128,e[i++]=o&63|128);return i-r}});var Jl=Y((Ox,Xl)=>{"use strict";Xl.exports=rh;function rh(n,t,e){var i=e||8192,r=i>>>1,o=null,a=i;return function(l){if(l<1||l>r)return n(l);a+l>i&&(o=n(i),a=0);var c=t.call(o,a,a+=l);return a&7&&(a=(a|7)+1),c}}});var ec=Y((Dx,Ql)=>{"use strict";Ql.exports=ge;var Qn=et();function ge(n,t){this.lo=n>>>0,this.hi=t>>>0}var Jt=ge.zero=new ge(0,0);Jt.toNumber=function(){return 0};Jt.zzEncode=Jt.zzDecode=function(){return this};Jt.length=function(){return 1};var oh=ge.zeroHash="\0\0\0\0\0\0\0\0";ge.fromNumber=function(t){if(t===0)return Jt;var e=t<0;e&&(t=-t);var i=t>>>0,r=(t-i)/4294967296>>>0;return e&&(r=~r>>>0,i=~i>>>0,++i>4294967295&&(i=0,++r>4294967295&&(r=0))),new ge(i,r)};ge.from=function(t){if(typeof t=="number")return ge.fromNumber(t);if(Qn.isString(t))if(Qn.Long)t=Qn.Long.fromString(t);else return ge.fromNumber(parseInt(t,10));return t.low||t.high?new ge(t.low>>>0,t.high>>>0):Jt};ge.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,i=~this.hi>>>0;return e||(i=i+1>>>0),-(e+i*4294967296)}return this.lo+this.hi*4294967296};ge.prototype.toLong=function(t){return Qn.Long?new Qn.Long(this.lo|0,this.hi|0,Boolean(t)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(t)}};var Ot=String.prototype.charCodeAt;ge.fromHash=function(t){return t===oh?Jt:new ge((Ot.call(t,0)|Ot.call(t,1)<<8|Ot.call(t,2)<<16|Ot.call(t,3)<<24)>>>0,(Ot.call(t,4)|Ot.call(t,5)<<8|Ot.call(t,6)<<16|Ot.call(t,7)<<24)>>>0)};ge.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};ge.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};ge.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};ge.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return i===0?e===0?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:i<128?9:10}});var et=Y(Fo=>{"use strict";var j=Fo;j.asPromise=Do();j.base64=Bl();j.EventEmitter=jl();j.float=Gl();j.inquire=Co();j.utf8=Kl();j.pool=Jl();j.LongBits=ec();j.isNode=Boolean(typeof global!="undefined"&&global&&global.process&&global.process.versions&&global.process.versions.node);j.global=j.isNode&&global||typeof window!="undefined"&&window||typeof self!="undefined"&&self||Fo;j.emptyArray=Object.freeze?Object.freeze([]):[];j.emptyObject=Object.freeze?Object.freeze({}):{};j.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};j.isString=function(t){return typeof t=="string"||t instanceof String};j.isObject=function(t){return t&&typeof t=="object"};j.isset=j.isSet=function(t,e){var i=t[e];return i!=null&&t.hasOwnProperty(e)?typeof i!="object"||(Array.isArray(i)?i.length:Object.keys(i).length)>0:!1};j.Buffer=function(){try{var n=j.inquire("buffer").Buffer;return n.prototype.utf8Write?n:null}catch(t){return null}}();j._Buffer_from=null;j._Buffer_allocUnsafe=null;j.newBuffer=function(t){return typeof t=="number"?j.Buffer?j._Buffer_allocUnsafe(t):new j.Array(t):j.Buffer?j._Buffer_from(t):typeof Uint8Array=="undefined"?t:new Uint8Array(t)};j.Array=typeof Uint8Array!="undefined"?Uint8Array:Array;j.Long=j.global.dcodeIO&&j.global.dcodeIO.Long||j.global.Long||j.inquire("long");j.key2Re=/^true|false|0|1$/;j.key32Re=/^-?(?:0|[1-9][0-9]*)$/;j.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;j.longToHash=function(t){return t?j.LongBits.from(t).toHash():j.LongBits.zeroHash};j.longFromHash=function(t,e){var i=j.LongBits.fromHash(t);return j.Long?j.Long.fromBits(i.lo,i.hi,e):i.toNumber(Boolean(e))};function tc(n,t,e){for(var i=Object.keys(t),r=0;r-1;--o)if(e[r[o]]===1&&this[r[o]]!==void 0&&this[r[o]]!==null)return r[o]}};j.oneOfSetter=function(t){return function(e){for(var i=0;i{"use strict";ac.exports=X;var $e=et(),Lo,Vi=$e.LongBits,ic=$e.base64,rc=$e.utf8;function ei(n,t,e){this.fn=n,this.len=t,this.next=void 0,this.val=e}function Mo(){}function ah(n){this.head=n.head,this.tail=n.tail,this.len=n.len,this.next=n.states}function X(){this.len=0,this.head=new ei(Mo,0,0),this.tail=this.head,this.states=null}var oc=function(){return $e.Buffer?function(){return(X.create=function(){return new Lo})()}:function(){return new X}};X.create=oc();X.alloc=function(t){return new $e.Array(t)};$e.Array!==Array&&(X.alloc=$e.pool(X.alloc,$e.Array.prototype.subarray));X.prototype._push=function(t,e,i){return this.tail=this.tail.next=new ei(t,e,i),this.len+=e,this};function $o(n,t,e){t[e]=n&255}function sh(n,t,e){for(;n>127;)t[e++]=n&127|128,n>>>=7;t[e]=n}function Bo(n,t){this.len=n,this.next=void 0,this.val=t}Bo.prototype=Object.create(ei.prototype);Bo.prototype.fn=sh;X.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new Bo((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};X.prototype.int32=function(t){return t<0?this._push(Uo,10,Vi.fromNumber(t)):this.uint32(t)};X.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function Uo(n,t,e){for(;n.hi;)t[e++]=n.lo&127|128,n.lo=(n.lo>>>7|n.hi<<25)>>>0,n.hi>>>=7;for(;n.lo>127;)t[e++]=n.lo&127|128,n.lo=n.lo>>>7;t[e++]=n.lo}X.prototype.uint64=function(t){var e=Vi.from(t);return this._push(Uo,e.length(),e)};X.prototype.int64=X.prototype.uint64;X.prototype.sint64=function(t){var e=Vi.from(t).zzEncode();return this._push(Uo,e.length(),e)};X.prototype.bool=function(t){return this._push($o,1,t?1:0)};function Po(n,t,e){t[e]=n&255,t[e+1]=n>>>8&255,t[e+2]=n>>>16&255,t[e+3]=n>>>24}X.prototype.fixed32=function(t){return this._push(Po,4,t>>>0)};X.prototype.sfixed32=X.prototype.fixed32;X.prototype.fixed64=function(t){var e=Vi.from(t);return this._push(Po,4,e.lo)._push(Po,4,e.hi)};X.prototype.sfixed64=X.prototype.fixed64;X.prototype.float=function(t){return this._push($e.float.writeFloatLE,4,t)};X.prototype.double=function(t){return this._push($e.float.writeDoubleLE,8,t)};var lh=$e.Array.prototype.set?function(t,e,i){e.set(t,i)}:function(t,e,i){for(var r=0;r>>0;if(!e)return this._push($o,1,0);if($e.isString(t)){var i=X.alloc(e=ic.length(t));ic.decode(t,i,0),t=i}return this.uint32(e)._push(lh,e,t)};X.prototype.string=function(t){var e=rc.length(t);return e?this.uint32(e)._push(rc.write,e,t):this._push($o,1,0)};X.prototype.fork=function(){return this.states=new ah(this),this.head=this.tail=new ei(Mo,0,0),this.len=0,this};X.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new ei(Mo,0,0),this.len=0),this};X.prototype.ldelim=function(){var t=this.head,e=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=e,this.len+=i),this};X.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,e,i),i+=t.len,t=t.next;return e};X._configure=function(n){Lo=n,X.create=oc(),Lo._configure()}});var cc=Y((Fx,lc)=>{"use strict";lc.exports=tt;var sc=Ki();(tt.prototype=Object.create(sc.prototype)).constructor=tt;var Dt=et();function tt(){sc.call(this)}tt._configure=function(){tt.alloc=Dt._Buffer_allocUnsafe,tt.writeBytesBuffer=Dt.Buffer&&Dt.Buffer.prototype instanceof Uint8Array&&Dt.Buffer.prototype.set.name==="set"?function(t,e,i){e.set(t,i)}:function(t,e,i){if(t.copy)t.copy(e,i,0,t.length);else for(var r=0;r>>0;return this.uint32(e),e&&this._push(tt.writeBytesBuffer,e,t),this};function ch(n,t,e){n.length<40?Dt.utf8.write(n,t,e):t.utf8Write?t.utf8Write(n,e):t.write(n,e)}tt.prototype.string=function(t){var e=Dt.Buffer.byteLength(t);return this.uint32(e),e&&this._push(ch,e,t),this};tt._configure()});var Ji=Y((Lx,mc)=>{"use strict";mc.exports=se;var ze=et(),Ho,fc=ze.LongBits,ph=ze.utf8;function Ge(n,t){return RangeError("index out of range: "+n.pos+" + "+(t||1)+" > "+n.len)}function se(n){this.buf=n,this.pos=0,this.len=n.length}var pc=typeof Uint8Array!="undefined"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new se(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new se(t);throw Error("illegal buffer")},dc=function(){return ze.Buffer?function(e){return(se.create=function(r){return ze.Buffer.isBuffer(r)?new Ho(r):pc(r)})(e)}:pc};se.create=dc();se.prototype._slice=ze.Array.prototype.subarray||ze.Array.prototype.slice;se.prototype.uint32=function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,Ge(this,10);return t}}();se.prototype.int32=function(){return this.uint32()|0};se.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function jo(){var n=new fc(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw Ge(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<>>0,n}if(this.len-this.pos>4){for(;t<5;++t)if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}else for(;t<5;++t){if(this.pos>=this.len)throw Ge(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}se.prototype.bool=function(){return this.uint32()!==0};function Xi(n,t){return(n[t-4]|n[t-3]<<8|n[t-2]<<16|n[t-1]<<24)>>>0}se.prototype.fixed32=function(){if(this.pos+4>this.len)throw Ge(this,4);return Xi(this.buf,this.pos+=4)};se.prototype.sfixed32=function(){if(this.pos+4>this.len)throw Ge(this,4);return Xi(this.buf,this.pos+=4)|0};function uc(){if(this.pos+8>this.len)throw Ge(this,8);return new fc(Xi(this.buf,this.pos+=4),Xi(this.buf,this.pos+=4))}se.prototype.float=function(){if(this.pos+4>this.len)throw Ge(this,4);var t=ze.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};se.prototype.double=function(){if(this.pos+8>this.len)throw Ge(this,4);var t=ze.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};se.prototype.bytes=function(){var t=this.uint32(),e=this.pos,i=this.pos+t;if(i>this.len)throw Ge(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(e,i);if(e===i){var r=ze.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,e,i)};se.prototype.string=function(){var t=this.bytes();return ph.read(t,0,t.length)};se.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw Ge(this,t);this.pos+=t}else do if(this.pos>=this.len)throw Ge(this);while(this.buf[this.pos++]&128);return this};se.prototype.skipType=function(n){switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(n=this.uint32()&7)!==4;)this.skipType(n);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this};se._configure=function(n){Ho=n,se.create=dc(),Ho._configure();var t=ze.Long?"toLong":"toNumber";ze.merge(se.prototype,{int64:function(){return jo.call(this)[t](!1)},uint64:function(){return jo.call(this)[t](!0)},sint64:function(){return jo.call(this).zzDecode()[t](!1)},fixed64:function(){return uc.call(this)[t](!0)},sfixed64:function(){return uc.call(this)[t](!1)}})}});var bc=Y((Px,yc)=>{"use strict";yc.exports=Qt;var gc=Ji();(Qt.prototype=Object.create(gc.prototype)).constructor=Qt;var hc=et();function Qt(n){gc.call(this,n)}Qt._configure=function(){hc.Buffer&&(Qt.prototype._slice=hc.Buffer.prototype.slice)};Qt.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};Qt._configure()});var wc=Y((Mx,xc)=>{"use strict";xc.exports=ti;var qo=et();(ti.prototype=Object.create(qo.EventEmitter.prototype)).constructor=ti;function ti(n,t,e){if(typeof n!="function")throw TypeError("rpcImpl must be a function");qo.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(e)}ti.prototype.rpcCall=function n(t,e,i,r,o){if(!r)throw TypeError("request must be specified");var a=this;if(!o)return qo.asPromise(n,a,t,e,i,r);if(!a.rpcImpl){setTimeout(function(){o(Error("already ended"))},0);return}try{return a.rpcImpl(t,e[a.requestDelimited?"encodeDelimited":"encode"](r).finish(),function(l,c){if(l)return a.emit("error",l,t),o(l);if(c===null){a.end(!0);return}if(!(c instanceof i))try{c=i[a.responseDelimited?"decodeDelimited":"decode"](c)}catch(p){return a.emit("error",p,t),o(p)}return a.emit("data",c,t),o(null,c)})}catch(s){a.emit("error",s,t),setTimeout(function(){o(s)},0);return}};ti.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var Wo=Y(vc=>{"use strict";var uh=vc;uh.Service=wc()});var Zo=Y((Bx,Ec)=>{"use strict";Ec.exports={}});var Ac=Y(Tc=>{"use strict";var Oe=Tc;Oe.build="minimal";Oe.Writer=Ki();Oe.BufferWriter=cc();Oe.Reader=Ji();Oe.BufferReader=bc();Oe.util=et();Oe.rpc=Wo();Oe.roots=Zo();Oe.configure=_c;function _c(){Oe.util._configure(),Oe.Writer._configure(Oe.BufferWriter),Oe.Reader._configure(Oe.BufferReader)}_c()});var Nc=Y((jx,kc)=>{"use strict";kc.exports=Yo;function Yo(n,t){typeof n=="string"&&(t=n,n=void 0);var e=[];function i(o){if(typeof o!="string"){var a=r();if(Yo.verbose&&console.log("codegen: "+a),a="return "+a,o){for(var s=Object.keys(o),l=new Array(s.length+1),c=new Array(s.length),p=0;p{"use strict";Sc.exports=ni;var fh=Do(),dh=Co(),zo=dh("fs");function ni(n,t,e){return typeof t=="function"?(e=t,t={}):t||(t={}),e?!t.xhr&&zo&&zo.readFile?zo.readFile(n,function(r,o){return r&&typeof XMLHttpRequest!="undefined"?ni.xhr(n,t,e):r?e(r):e(null,t.binary?o:o.toString("utf8"))}):ni.xhr(n,t,e):fh(ni,this,n,t)}ni.xhr=function(t,e,i){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(r.readyState===4){if(r.status!==0&&r.status!==200)return i(Error("status "+r.status));if(e.binary){var a=r.response;if(!a){a=[];for(var s=0;s{"use strict";var Vo=Dc,Oc=Vo.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},Go=Vo.normalize=function(t){t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var e=t.split("/"),i=Oc(t),r="";i&&(r=e.shift()+"/");for(var o=0;o0&&e[o-1]!==".."?e.splice(--o,2):i?e.splice(o,1):++o:e[o]==="."?e.splice(o,1):++o;return r+e.join("/")};Vo.resolve=function(t,e,i){return i||(e=Go(e)),Oc(e)?e:(i||(t=Go(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?Go(t+"/"+e):e)}});var en=Y(Ic=>{"use strict";var ii=Ic,mh=ye(),hh=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function ri(n,t){var e=0,i={};for(t|=0;e{"use strict";Pc.exports=Be;var Qi=tn();((Be.prototype=Object.create(Qi.prototype)).constructor=Be).className="Field";var Fc=Ve(),Lc=en(),pe=ye(),Ko,gh=/^required|optional|repeated$/;Be.fromJSON=function(t,e){return new Be(t,e.id,e.type,e.rule,e.extend,e.options,e.comment)};function Be(n,t,e,i,r,o,a){if(pe.isObject(i)?(a=r,o=i,i=r=void 0):pe.isObject(r)&&(a=o,o=r,r=void 0),Qi.call(this,n,o),!pe.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!pe.isString(e))throw TypeError("type must be a string");if(i!==void 0&&!gh.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(r!==void 0&&!pe.isString(r))throw TypeError("extend must be a string");i==="proto3_optional"&&(i="optional"),this.rule=i&&i!=="optional"?i:void 0,this.type=e,this.id=t,this.extend=r||void 0,this.required=i==="required",this.optional=!this.required,this.repeated=i==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=pe.Long?Lc.long[e]!==void 0:!1,this.bytes=e==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=a}Object.defineProperty(Be.prototype,"packed",{get:function(){return this._packed===null&&(this._packed=this.getOption("packed")!==!1),this._packed}});Be.prototype.setOption=function(t,e,i){return t==="packed"&&(this._packed=null),Qi.prototype.setOption.call(this,t,e,i)};Be.prototype.toJSON=function(t){var e=t?Boolean(t.keepComments):!1;return pe.toObject(["rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])};Be.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=Lc.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof Ko?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof Fc&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&((this.options.packed===!0||this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof Fc))&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=pe.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var t;pe.base64.test(this.typeDefault)?pe.base64.decode(this.typeDefault,t=pe.newBuffer(pe.base64.length(this.typeDefault)),0):pe.utf8.write(this.typeDefault,t=pe.newBuffer(pe.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=pe.emptyObject:this.repeated?this.defaultValue=pe.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof Ko&&(this.parent.ctor.prototype[this.name]=this.defaultValue),Qi.prototype.resolve.call(this)};Be.d=function(t,e,i,r){return typeof e=="function"?e=pe.decorateType(e).name:e&&typeof e=="object"&&(e=pe.decorateEnum(e).name),function(a,s){pe.decorateType(a.constructor).add(new Be(s,t,e,i,{default:r}))}};Be._configure=function(t){Ko=t}});var vn=Y((Yx,Bc)=>{"use strict";Bc.exports=Ue;var tr=tn();((Ue.prototype=Object.create(tr.prototype)).constructor=Ue).className="OneOf";var Mc=Ct(),er=ye();function Ue(n,t,e,i){if(Array.isArray(t)||(e=t,t=void 0),tr.call(this,n,e),!(t===void 0||Array.isArray(t)))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=i}Ue.fromJSON=function(t,e){return new Ue(t,e.oneof,e.options,e.comment)};Ue.prototype.toJSON=function(t){var e=t?Boolean(t.keepComments):!1;return er.toObject(["options",this.options,"oneof",this.oneof,"comment",e?this.comment:void 0])};function $c(n){if(n.parent)for(var t=0;t-1&&this.oneof.splice(e,1),t.partOf=null,this};Ue.prototype.onAdd=function(t){tr.prototype.onAdd.call(this,t);for(var e=this,i=0;i{"use strict";qc.exports=J;var Xo=tn();((J.prototype=Object.create(Xo.prototype)).constructor=J).className="Namespace";var Uc=Ct(),nr=ye(),yh=vn(),En,oi,_n;J.fromJSON=function(t,e){return new J(t,e.options).addJSON(e.nested)};function jc(n,t){if(n&&n.length){for(var e={},i=0;ie)return!0}return!1};J.isReservedName=function(t,e){if(t){for(var i=0;i0;){var r=t.shift();if(i.nested&&i.nested[r]){if(i=i.nested[r],!(i instanceof J))throw Error("path conflicts with non-namespace objects")}else i.add(i=new J(r))}return e&&i.addJSON(e),i};J.prototype.resolveAll=function(){for(var t=this.nestedArray,e=0;e-1)return r}else if(r instanceof J&&(r=r.lookup(t.slice(1),e,!0)))return r}else for(var o=0;o{"use strict";Wc.exports=dt;var Jo=Ct();((dt.prototype=Object.create(Jo.prototype)).constructor=dt).className="MapField";var bh=en(),ai=ye();function dt(n,t,e,i,r,o){if(Jo.call(this,n,t,i,void 0,void 0,r,o),!ai.isString(e))throw TypeError("keyType must be a string");this.keyType=e,this.resolvedKeyType=null,this.map=!0}dt.fromJSON=function(t,e){return new dt(t,e.id,e.keyType,e.type,e.options,e.comment)};dt.prototype.toJSON=function(t){var e=t?Boolean(t.keepComments):!1;return ai.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])};dt.prototype.resolve=function(){if(this.resolved)return this;if(bh.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return Jo.prototype.resolve.call(this)};dt.d=function(t,e,i){return typeof i=="function"?i=ai.decorateType(i).name:i&&typeof i=="object"&&(i=ai.decorateEnum(i).name),function(o,a){ai.decorateType(o.constructor).add(new dt(a,t,e,i))}}});var rr=Y((Vx,Zc)=>{"use strict";Zc.exports=nn;var Qo=tn();((nn.prototype=Object.create(Qo.prototype)).constructor=nn).className="Method";var An=ye();function nn(n,t,e,i,r,o,a,s,l){if(An.isObject(r)?(a=r,r=o=void 0):An.isObject(o)&&(a=o,o=void 0),!(t===void 0||An.isString(t)))throw TypeError("type must be a string");if(!An.isString(e))throw TypeError("requestType must be a string");if(!An.isString(i))throw TypeError("responseType must be a string");Qo.call(this,n,a),this.type=t||"rpc",this.requestType=e,this.requestStream=r?!0:void 0,this.responseType=i,this.responseStream=o?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=s,this.parsedOptions=l}nn.fromJSON=function(t,e){return new nn(t,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options,e.comment,e.parsedOptions)};nn.prototype.toJSON=function(t){var e=t?Boolean(t.keepComments):!1;return An.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",e?this.comment:void 0,"parsedOptions",this.parsedOptions])};nn.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),Qo.prototype.resolve.call(this))}});var or=Y((Kx,zc)=>{"use strict";zc.exports=je;var It=Tn();((je.prototype=Object.create(It.prototype)).constructor=je).className="Service";var ea=rr(),si=ye(),xh=Wo();function je(n,t){It.call(this,n,t),this.methods={},this._methodsArray=null}je.fromJSON=function(t,e){var i=new je(t,e.options);if(e.methods)for(var r=Object.keys(e.methods),o=0;o{"use strict";Gc.exports=nt;var wh=et();function nt(n){if(n)for(var t=Object.keys(n),e=0;e{"use strict";Kc.exports=_h;var vh=Ve(),mt=en(),Vc=ye();function Eh(n){return"missing required '"+n.name+"'"}function _h(n){var t=Vc.codegen(["r","l"],n.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(n.fieldsArray.filter(function(s){return s.map}).length?",k,value":""))("while(r.pos>>3){");for(var e=0;e>>3){")("case 1: k=r.%s(); break",i.keyType)("case 2:"),mt.basic[r]===void 0?t("value=types[%i].decode(r,r.uint32())",e):t("value=r.%s()",r),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),mt.long[i.keyType]!==void 0?t('%s[typeof k==="object"?util.longToHash(k):k]=value',o):t("%s[k]=value",o)):i.repeated?(t("if(!(%s&&%s.length))",o,o)("%s=[]",o),mt.packed[r]!==void 0&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos{"use strict";Xc.exports=kh;var Th=Ve(),na=ye();function He(n,t){return n.name+": "+t+(n.repeated&&t!=="array"?"[]":n.map&&t!=="object"?"{k:"+n.keyType+"}":"")+" expected"}function ia(n,t,e,i){if(t.resolvedType)if(t.resolvedType instanceof Th){n("switch(%s){",i)("default:")("return%j",He(t,"enum value"));for(var r=Object.keys(t.resolvedType.values),o=0;o{"use strict";var Jc=Qc,li=Ve(),it=ye();function oa(n,t,e,i){var r=!1;if(t.resolvedType)if(t.resolvedType instanceof li){n("switch(d%s){",i);for(var o=t.resolvedType.values,a=Object.keys(o),s=0;s>>0",i,i);break;case"int32":case"sint32":case"sfixed32":n("m%s=d%s|0",i,i);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":n("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",i,i,l)('else if(typeof d%s==="string")',i)("m%s=parseInt(d%s,10)",i,i)('else if(typeof d%s==="number")',i)("m%s=d%s",i,i)('else if(typeof d%s==="object")',i)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",i,i,i,l?"true":"");break;case"bytes":n('if(typeof d%s==="string")',i)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",i,i,i)("else if(d%s.length >= 0)",i)("m%s=d%s",i,i);break;case"string":n("m%s=String(d%s)",i,i);break;case"bool":n("m%s=Boolean(d%s)",i,i);break}}return n}Jc.fromObject=function(t){var e=t.fieldsArray,i=it.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!e.length)return i("return new this.ctor");i("var m=new this.ctor");for(var r=0;r>>0,m%s.high>>>0).toNumber(%s):m%s",i,i,i,i,r?"true":"",i);break;case"bytes":n("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",i,i,i,i,i);break;default:n("d%s=m%s",i,i);break}}return n}Jc.toObject=function(t){var e=t.fieldsArray.slice().sort(it.compareFieldsById);if(!e.length)return it.codegen()("return {}");for(var i=it.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],o=[],a=[],s=0;s{"use strict";var Nh=ep,Sh=ar();Nh[".google.protobuf.Any"]={fromObject:function(n){if(n&&n["@type"]){var t=n["@type"].substring(n["@type"].lastIndexOf("/")+1),e=this.lookup(t);if(e){var i=n["@type"].charAt(0)==="."?n["@type"].slice(1):n["@type"];return i.indexOf("/")===-1&&(i="/"+i),this.create({type_url:i,value:e.encode(e.fromObject(n)).finish()})}}return this.fromObject(n)},toObject:function(n,t){var e="type.googleapis.com/",i="",r="";if(t&&t.json&&n.type_url&&n.value){r=n.type_url.substring(n.type_url.lastIndexOf("/")+1),i=n.type_url.substring(0,n.type_url.lastIndexOf("/")+1);var o=this.lookup(r);o&&(n=o.decode(n.value))}if(!(n instanceof this.ctor)&&n instanceof Sh){var a=n.$type.toObject(n,t),s=n.$type.fullName[0]==="."?n.$type.fullName.slice(1):n.$type.fullName;return i===""&&(i=e),r=i+s,a["@type"]=r,a}return this.toObject(n,t)}}});var cr=Y((nw,np)=>{"use strict";np.exports=ne;var Ke=Tn();((ne.prototype=Object.create(Ke.prototype)).constructor=ne).className="Type";var Rh=Ve(),ua=vn(),sr=Ct(),Oh=ir(),Dh=or(),ca=ar(),pa=Ji(),Ch=Ki(),we=ye(),Ih=fa(),Fh=ta(),Lh=ra(),tp=sa(),Ph=la();function ne(n,t){Ke.call(this,n,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(ne.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var n=Object.keys(this.fields),t=0;t{"use strict";sp.exports=Ce;var ur=Tn();((Ce.prototype=Object.create(ur.prototype)).constructor=Ce).className="Root";var ma=Ct(),rp=Ve(),Mh=vn(),Ft=ye(),op,da,ci;function Ce(n){ur.call(this,"",n),this.deferred=[],this.files=[]}Ce.fromJSON=function(t,e){return e||(e=new Ce),t.options&&e.setOptions(t.options),e.addJSON(t.nested)};Ce.prototype.resolvePath=Ft.path.resolve;Ce.prototype.fetch=Ft.fetch;function ap(){}Ce.prototype.load=function n(t,e,i){typeof e=="function"&&(i=e,e=void 0);var r=this;if(!i)return Ft.asPromise(n,r,t,e);var o=i===ap;function a(E,v){if(i){var d=i;if(i=null,o)throw E;d(E,v)}}function s(E){var v=E.lastIndexOf("google/protobuf/");if(v>-1){var d=E.substring(v);if(d in ci)return d}return null}function l(E,v){try{if(Ft.isString(v)&&v.charAt(0)==="{"&&(v=JSON.parse(v)),!Ft.isString(v))r.setOptions(v.options).addJSON(v.nested);else{da.filename=E;var d=da(v,r,e),f,g=0;if(d.imports)for(;g-1)){if(r.files.push(E),E in ci){o?l(E,ci[E]):(++p,setTimeout(function(){--p,l(E,ci[E])}));return}if(o){var d;try{d=Ft.fs.readFileSync(E).toString("utf8")}catch(f){v||a(f);return}l(E,d)}else++p,r.fetch(E,function(f,g){if(--p,!!i){if(f){v?p||a(null,r):a(f);return}l(E,g)}})}}var p=0;Ft.isString(t)&&(t=[t]);for(var m=0,y;m-1&&this.deferred.splice(e,1)}}else if(t instanceof rp)pr.test(t.name)&&delete t.parent[t.name];else if(t instanceof ur){for(var i=0;i{"use strict";var le=cp.exports=et(),lp=Zo(),ha,ga;le.codegen=Nc();le.fetch=Rc();le.path=Cc();le.fs=le.inquire("fs");le.toArray=function(t){if(t){for(var e=Object.keys(t),i=new Array(e.length),r=0;r0)o[l]=r(o[l]||{},a,s);else{var c=o[l];c&&(s=[].concat(c).concat(s)),o[l]=s}return o}if(typeof t!="object")throw TypeError("dst must be an object");if(!e)throw TypeError("path must be specified");return e=e.split("."),r(t,e,i)};Object.defineProperty(le,"decorateRoot",{get:function(){return lp.decorated||(lp.decorated=new(fr()))}})});var tn=Y((ow,pp)=>{"use strict";pp.exports=Ie;Ie.className="ReflectionObject";var dr=ye(),mr;function Ie(n,t){if(!dr.isString(n))throw TypeError("name must be a string");if(t&&!dr.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=n,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(Ie.prototype,{root:{get:function(){for(var n=this;n.parent!==null;)n=n.parent;return n}},fullName:{get:function(){for(var n=[this.name],t=this.parent;t;)n.unshift(t.name),t=t.parent;return n.join(".")}}});Ie.prototype.toJSON=function(){throw Error()};Ie.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof mr&&e._handleAdd(this)};Ie.prototype.onRemove=function(t){var e=t.root;e instanceof mr&&e._handleRemove(this),this.parent=null,this.resolved=!1};Ie.prototype.resolve=function(){return this.resolved?this:(this.root instanceof mr&&(this.resolved=!0),this)};Ie.prototype.getOption=function(t){if(this.options)return this.options[t]};Ie.prototype.setOption=function(t,e,i){return(!i||!this.options||this.options[t]===void 0)&&((this.options||(this.options={}))[t]=e),this};Ie.prototype.setParsedOption=function(t,e,i){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(i){var o=r.find(function(l){return Object.prototype.hasOwnProperty.call(l,t)});if(o){var a=o[t];dr.setProperty(a,i,e)}else o={},o[t]=dr.setProperty({},i,e),r.push(o)}else{var s={};s[t]=e,r.push(s)}return this};Ie.prototype.setOptions=function(t,e){if(t)for(var i=Object.keys(t),r=0;r{"use strict";dp.exports=rt;var up=tn();((rt.prototype=Object.create(up.prototype)).constructor=rt).className="Enum";var fp=Tn(),hr=ye();function rt(n,t,e,i,r,o){if(up.call(this,n,e),t&&typeof t!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=i,this.comments=r||{},this.valuesOptions=o,this.reserved=void 0,t)for(var a=Object.keys(t),s=0;s{"use strict";hp.exports=qh;var Hh=Ve(),ya=en(),ba=ye();function mp(n,t,e,i){return t.resolvedType.group?n("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",e,i,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):n("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",e,i,(t.id<<3|2)>>>0)}function qh(n){for(var t=ba.codegen(["m","w"],n.name+"$encode")("if(!w)")("w=Writer.create()"),e,i,r=n.fieldsArray.slice().sort(ba.compareFieldsById),e=0;e>>0,8|ya.mapKey[o.keyType],o.keyType),l===void 0?t("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",a,i):t(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|l,s,i),t("}")("}")):o.repeated?(t("if(%s!=null&&%s.length){",i,i),o.packed&&ya.packed[s]!==void 0?t("w.uint32(%i).fork()",(o.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",s,i)("w.ldelim()"):(t("for(var i=0;i<%s.length;++i)",i),l===void 0?mp(t,o,a,i+"[i]"):t("w.uint32(%i).%s(%s[i])",(o.id<<3|l)>>>0,s,i)),t("}")):(o.optional&&t("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,o.name),l===void 0?mp(t,o,a,i):t("w.uint32(%i).%s(%s)",(o.id<<3|l)>>>0,s,i))}return t("return w")}});var yp=Y((lw,gp)=>{"use strict";var V=gp.exports=Ac();V.build="light";function Wh(n,t,e){return typeof t=="function"?(e=t,t=new V.Root):t||(t=new V.Root),t.load(n,e)}V.load=Wh;function Zh(n,t){return t||(t=new V.Root),t.loadSync(n)}V.loadSync=Zh;V.encoder=fa();V.decoder=ta();V.verifier=ra();V.converter=sa();V.ReflectionObject=tn();V.Namespace=Tn();V.Root=fr();V.Enum=Ve();V.Type=cr();V.Field=Ct();V.OneOf=vn();V.MapField=ir();V.Service=or();V.Method=rr();V.Message=ar();V.wrappers=la();V.types=en();V.util=ye();V.ReflectionObject._configure(V.Root);V.Namespace._configure(V.Type,V.Service,V.Enum);V.Root._configure(V.Type);V.Field._configure(V.Type)});var wa=Y((cw,wp)=>{"use strict";wp.exports=xp;var xa=/[\s{}=;:[\],'"()<>]/g,Yh=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,zh=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,Gh=/^ *[*/]+ */,Vh=/^\s*\*?\/*/,Kh=/\n/g,Xh=/\s/,Jh=/\\(.?)/g,Qh={0:"\0",r:"\r",n:` +`,t:" "};function bp(n){return n.replace(Jh,function(t,e){switch(e){case"\\":case"":return e;default:return Qh[e]||""}})}xp.unescape=bp;function xp(n,t){n=n.toString();var e=0,i=n.length,r=1,o=0,a={},s=[],l=null;function c(A){return Error("illegal "+A+" (line "+r+")")}function p(){var A=l==="'"?zh:Yh;A.lastIndex=e-1;var D=A.exec(n);if(!D)throw c("string");return e=A.lastIndex,f(l),l=null,bp(D[1])}function m(A){return n.charAt(A)}function y(A,D,_){var S={type:n.charAt(A++),lineEmpty:!1,leading:_},x;t?x=2:x=3;var C=A-x,O;do if(--C<0||(O=n.charAt(C))===` +`){S.lineEmpty=!0;break}while(O===" "||O===" ");for(var R=n.substring(A,D).split(Kh),M=0;M0)return s.shift();if(l)return p();var A,D,_,S,x,C=e===0;do{if(e===i)return null;for(A=!1;Xh.test(_=m(e));)if(_===` +`&&(C=!0,++r),++e===i)return null;if(m(e)==="/"){if(++e===i)throw c("comment");if(m(e)==="/")if(t){if(S=e,x=!1,E(e-1)){x=!0;do if(e=v(e),e===i||(e++,!C))break;while(E(e))}else e=Math.min(i,v(e)+1);x&&(y(S,e,C),C=!0),r++,A=!0}else{for(x=m(S=e+1)==="/";m(++e)!==` +`;)if(e===i)return null;++e,x&&(y(S,e-1,C),C=!0),++r,A=!0}else if((_=m(e))==="*"){S=e+1,x=t||m(S)==="*";do{if(_===` +`&&++r,++e===i)throw c("comment");D=_,_=m(e)}while(D!=="*"||_!=="/");++e,x&&(y(S,e-2,C),C=!0),A=!0}else return"/"}}while(A);var O=e;xa.lastIndex=0;var R=xa.test(m(O++));if(!R)for(;O{"use strict";Ap.exports=ht;ht.filename=null;ht.defaults={keepCase:!1};var eg=wa(),vp=fr(),Ep=cr(),_p=Ct(),tg=ir(),Tp=vn(),ng=Ve(),ig=or(),rg=rr(),va=en(),Ea=ye(),og=/^[1-9][0-9]*$/,ag=/^-?[1-9][0-9]*$/,sg=/^0[x][0-9a-fA-F]+$/,lg=/^-?0[x][0-9a-fA-F]+$/,cg=/^0[0-7]+$/,pg=/^-?0[0-7]+$/,ug=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,ot=/^[a-zA-Z_][a-zA-Z_0-9]*$/,at=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,fg=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function ht(n,t,e){t instanceof vp||(e=t,t=new vp),e||(e=ht.defaults);var i=e.preferTrailingComment||!1,r=eg(n,e.alternateCommentMode||!1),o=r.next,a=r.push,s=r.peek,l=r.skip,c=r.cmnt,p=!0,m,y,E,v,d=!1,f=t,g=e.keepCase?function(b){return b}:Ea.camelCase;function w(b,k,I){var L=ht.filename;return I||(ht.filename=null),Error("illegal "+(k||"token")+" '"+b+"' ("+(L?L+", ":"")+"line "+r.line+")")}function T(){var b=[],k;do{if((k=o())!=='"'&&k!=="'")throw w(k);b.push(o()),l(k),k=s()}while(k==='"'||k==="'");return b.join("")}function A(b){var k=o();switch(k){case"'":case'"':return a(k),T();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return _(k,!0)}catch(I){if(b&&at.test(k))return k;throw w(k,"value")}}function D(b,k){var I,L;do k&&((I=s())==='"'||I==="'")?b.push(T()):b.push([L=S(o()),l("to",!0)?S(o()):L]);while(l(",",!0));l(";")}function _(b,k){var I=1;switch(b.charAt(0)==="-"&&(I=-1,b=b.substring(1)),b){case"inf":case"INF":case"Inf":return I*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(og.test(b))return I*parseInt(b,10);if(sg.test(b))return I*parseInt(b,16);if(cg.test(b))return I*parseInt(b,8);if(ug.test(b))return I*parseFloat(b);throw w(b,"number",k)}function S(b,k){switch(b){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!k&&b.charAt(0)==="-")throw w(b,"id");if(ag.test(b))return parseInt(b,10);if(lg.test(b))return parseInt(b,16);if(pg.test(b))return parseInt(b,8);throw w(b,"id")}function x(){if(m!==void 0)throw w("package");if(m=o(),!at.test(m))throw w(m,"name");f=f.define(m),l(";")}function C(){var b=s(),k;switch(b){case"weak":k=E||(E=[]),o();break;case"public":o();default:k=y||(y=[]);break}b=T(),l(";"),k.push(b)}function O(){if(l("="),v=T(),d=v==="proto3",!d&&v!=="proto2")throw w(v,"syntax");l(";")}function R(b,k){switch(k){case"option":return U(b,k),l(";"),!0;case"message":return P(b,k),!0;case"enum":return z(b,k),!0;case"service":return pn(b,k),!0;case"extend":return u(b,k),!0}return!1}function M(b,k,I){var L=r.line;if(b&&(typeof b.comment!="string"&&(b.comment=c()),b.filename=ht.filename),l("{",!0)){for(var $;($=o())!=="}";)k($);l(";",!0)}else I&&I(),l(";"),b&&(typeof b.comment!="string"||i)&&(b.comment=c(L)||b.comment)}function P(b,k){if(!ot.test(k=o()))throw w(k,"type name");var I=new Ep(k);M(I,function($){if(!R(I,$))switch($){case"map":F(I,$);break;case"required":case"repeated":H(I,$);break;case"optional":d?H(I,"proto3_optional"):H(I,"optional");break;case"oneof":ee(I,$);break;case"extensions":D(I.extensions||(I.extensions=[]));break;case"reserved":D(I.reserved||(I.reserved=[]),!0);break;default:if(!d||!at.test($))throw w($);a($),H(I,"optional");break}}),b.add(I)}function H(b,k,I){var L=o();if(L==="group"){Z(b,k);return}for(;L.endsWith(".")||s().startsWith(".");)L+=o();if(!at.test(L))throw w(L,"type");var $=o();if(!ot.test($))throw w($,"name");$=g($),l("=");var W=new _p($,S(o()),L,k,I);if(M(W,function(re){if(re==="option")U(W,re),l(";");else throw w(re)},function(){lt(W)}),k==="proto3_optional"){var ie=new Tp("_"+$);W.setOption("proto3_optional",!0),ie.add(W),b.add(ie)}else b.add(W);!d&&W.repeated&&(va.packed[L]!==void 0||va.basic[L]===void 0)&&W.setOption("packed",!1,!0)}function Z(b,k){var I=o();if(!ot.test(I))throw w(I,"name");var L=Ea.lcFirst(I);I===L&&(I=Ea.ucFirst(I)),l("=");var $=S(o()),W=new Ep(I);W.group=!0;var ie=new _p(L,$,I,k);ie.filename=ht.filename,M(W,function(re){switch(re){case"option":U(W,re),l(";");break;case"required":case"repeated":H(W,re);break;case"optional":d?H(W,"proto3_optional"):H(W,"optional");break;case"message":P(W,re);break;case"enum":z(W,re);break;default:throw w(re)}}),b.add(W).add(ie)}function F(b){l("<");var k=o();if(va.mapKey[k]===void 0)throw w(k,"type");l(",");var I=o();if(!at.test(I))throw w(I,"type");l(">");var L=o();if(!ot.test(L))throw w(L,"name");l("=");var $=new tg(g(L),S(o()),k,I);M($,function(ie){if(ie==="option")U($,ie),l(";");else throw w(ie)},function(){lt($)}),b.add($)}function ee(b,k){if(!ot.test(k=o()))throw w(k,"name");var I=new Tp(g(k));M(I,function($){$==="option"?(U(I,$),l(";")):(a($),H(I,"optional"))}),b.add(I)}function z(b,k){if(!ot.test(k=o()))throw w(k,"name");var I=new ng(k);M(I,function($){switch($){case"option":U(I,$),l(";");break;case"reserved":D(I.reserved||(I.reserved=[]),!0);break;default:We(I,$)}}),b.add(I)}function We(b,k){if(!ot.test(k))throw w(k,"name");l("=");var I=S(o(),!0),L={options:void 0};L.setOption=function($,W){this.options===void 0&&(this.options={}),this.options[$]=W},M(L,function(W){if(W==="option")U(L,W),l(";");else throw w(W)},function(){lt(L)}),b.add(k,I,L.comment,L.options)}function U(b,k){var I=l("(",!0);if(!at.test(k=o()))throw w(k,"name");var L=k,$=L,W;I&&(l(")"),L="("+L+")",$=L,k=s(),fg.test(k)&&(W=k.slice(1),L+=k,o())),l("=");var ie=Ne(b,L);Q(b,$,ie,W)}function Ne(b,k){if(l("{",!0)){for(var I={};!l("}",!0);){if(!ot.test(N=o()))throw w(N,"name");if(N===null)throw w(N,"end of input");var L,$=N;if(l(":",!0),s()==="{")L=Ne(b,k+"."+N);else if(s()==="["){L=[];var W;if(l("[",!0)){do W=A(!0),L.push(W);while(l(",",!0));l("]"),typeof W!="undefined"&&G(b,k+"."+N,W)}}else L=A(!0),G(b,k+"."+N,L);var ie=I[$];ie&&(L=[].concat(ie).concat(L)),I[$]=L,l(",",!0),l(";",!0)}return I}var te=A(!0);return G(b,k,te),te}function G(b,k,I){b.setOption&&b.setOption(k,I)}function Q(b,k,I,L){b.setParsedOption&&b.setParsedOption(k,I,L)}function lt(b){if(l("[",!0)){do U(b,"option");while(l(",",!0));l("]")}return b}function pn(b,k){if(!ot.test(k=o()))throw w(k,"service name");var I=new ig(k);M(I,function($){if(!R(I,$))if($==="rpc")h(I,$);else throw w($)}),b.add(I)}function h(b,k){var I=c(),L=k;if(!ot.test(k=o()))throw w(k,"name");var $=k,W,ie,te,re;if(l("("),l("stream",!0)&&(ie=!0),!at.test(k=o())||(W=k,l(")"),l("returns"),l("("),l("stream",!0)&&(re=!0),!at.test(k=o())))throw w(k);te=k,l(")");var un=new rg($,L,W,te,ie,re);un.comment=I,M(un,function(qt){if(qt==="option")U(un,qt),l(";");else throw w(qt)}),b.add(un)}function u(b,k){if(!at.test(k=o()))throw w(k,"reference");var I=k;M(null,function($){switch($){case"required":case"repeated":H(b,$,I);break;case"optional":d?H(b,"proto3_optional",I):H(b,"optional",I);break;default:if(!d||!at.test($))throw w($);a($),H(b,"optional",I);break}})}for(var N;(N=o())!==null;)switch(N){case"package":if(!p)throw w(N);x();break;case"import":if(!p)throw w(N);C();break;case"syntax":if(!p)throw w(N);O();break;case"option":U(f,N),l(";");break;default:if(R(f,N)){p=!1;continue}throw w(N)}return ht.filename=null,{package:m,imports:y,weakImports:E,syntax:v,root:t}}});var Rp=Y((uw,Sp)=>{"use strict";Sp.exports=Xe;var dg=/\/|\./;function Xe(n,t){dg.test(n)||(n="google/protobuf/"+n+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),Xe[n]=t}Xe("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var Np;Xe("duration",{Duration:Np={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}});Xe("timestamp",{Timestamp:Np});Xe("empty",{Empty:{fields:{}}});Xe("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}});Xe("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}});Xe("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}});Xe.get=function(t){return Xe[t]||null}});var Dp=Y((fw,Op)=>{"use strict";var Lt=Op.exports=yp();Lt.build="full";Lt.tokenize=wa();Lt.parse=kp();Lt.common=Rp();Lt.Root._configure(Lt.Type,Lt.parse,Lt.common)});var Ip=Y((dw,Cp)=>{"use strict";Cp.exports=Dp()});var Rf=Y(Rr=>{(function(n){n.parser=function(h,u){return new e(h,u)},n.SAXParser=e,n.SAXStream=c,n.createStream=l,n.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function e(h,u){if(!(this instanceof e))return new e(h,u);var N=this;r(N),N.q=N.c="",N.bufferCheckPosition=n.MAX_BUFFER_LENGTH,N.opt=u||{},N.opt.lowercase=N.opt.lowercase||N.opt.lowercasetags,N.looseCase=N.opt.lowercase?"toLowerCase":"toUpperCase",N.tags=[],N.closed=N.closedRoot=N.sawRoot=!1,N.tag=N.error=null,N.strict=!!h,N.noscript=!!(h||N.opt.noscript),N.state=x.BEGIN,N.strictEntities=N.opt.strictEntities,N.ENTITIES=N.strictEntities?Object.create(n.XML_ENTITIES):Object.create(n.ENTITIES),N.attribList=[],N.opt.xmlns&&(N.ns=Object.create(v)),N.trackPosition=N.opt.position!==!1,N.trackPosition&&(N.position=N.line=N.column=0),O(N,"onready")}Object.create||(Object.create=function(h){function u(){}u.prototype=h;var N=new u;return N}),Object.keys||(Object.keys=function(h){var u=[];for(var N in h)h.hasOwnProperty(N)&&u.push(N);return u});function i(h){for(var u=Math.max(n.MAX_BUFFER_LENGTH,10),N=0,b=0,k=t.length;bu)switch(t[b]){case"textNode":M(h);break;case"cdata":R(h,"oncdata",h.cdata),h.cdata="";break;case"script":R(h,"onscript",h.script),h.script="";break;default:H(h,"Max buffer length exceeded: "+t[b])}N=Math.max(N,I)}var L=n.MAX_BUFFER_LENGTH-N;h.bufferCheckPosition=L+h.position}function r(h){for(var u=0,N=t.length;u"||T(h)}function _(h,u){return h.test(u)}function S(h,u){return!_(h,u)}var x=0;n.STATE={BEGIN:x++,BEGIN_WHITESPACE:x++,TEXT:x++,TEXT_ENTITY:x++,OPEN_WAKA:x++,SGML_DECL:x++,SGML_DECL_QUOTED:x++,DOCTYPE:x++,DOCTYPE_QUOTED:x++,DOCTYPE_DTD:x++,DOCTYPE_DTD_QUOTED:x++,COMMENT_STARTING:x++,COMMENT:x++,COMMENT_ENDING:x++,COMMENT_ENDED:x++,CDATA:x++,CDATA_ENDING:x++,CDATA_ENDING_2:x++,PROC_INST:x++,PROC_INST_BODY:x++,PROC_INST_ENDING:x++,OPEN_TAG:x++,OPEN_TAG_SLASH:x++,ATTRIB:x++,ATTRIB_NAME:x++,ATTRIB_NAME_SAW_WHITE:x++,ATTRIB_VALUE:x++,ATTRIB_VALUE_QUOTED:x++,ATTRIB_VALUE_CLOSED:x++,ATTRIB_VALUE_UNQUOTED:x++,ATTRIB_VALUE_ENTITY_Q:x++,ATTRIB_VALUE_ENTITY_U:x++,CLOSE_TAG:x++,CLOSE_TAG_SAW_WHITE:x++,SCRIPT:x++,SCRIPT_ENDING:x++},n.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},n.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(n.ENTITIES).forEach(function(h){var u=n.ENTITIES[h],N=typeof u=="number"?String.fromCharCode(u):u;n.ENTITIES[h]=N});for(var C in n.STATE)n.STATE[n.STATE[C]]=C;x=n.STATE;function O(h,u,N){h[u]&&h[u](N)}function R(h,u,N){h.textNode&&M(h),O(h,u,N)}function M(h){h.textNode=P(h.opt,h.textNode),h.textNode&&O(h,"ontext",h.textNode),h.textNode=""}function P(h,u){return h.trim&&(u=u.trim()),h.normalize&&(u=u.replace(/\s+/g," ")),u}function H(h,u){return M(h),h.trackPosition&&(u+=` +Line: `+h.line+` +Column: `+h.column+` +Char: `+h.c),u=new Error(u),h.error=u,O(h,"onerror",u),h}function Z(h){return h.sawRoot&&!h.closedRoot&&F(h,"Unclosed root tag"),h.state!==x.BEGIN&&h.state!==x.BEGIN_WHITESPACE&&h.state!==x.TEXT&&H(h,"Unexpected end"),M(h),h.c="",h.closed=!0,O(h,"onend"),e.call(h,h.strict,h.opt),h}function F(h,u){if(typeof h!="object"||!(h instanceof e))throw new Error("bad call to strictFail");h.strict&&H(h,u)}function ee(h){h.strict||(h.tagName=h.tagName[h.looseCase]());var u=h.tags[h.tags.length-1]||h,N=h.tag={name:h.tagName,attributes:{}};h.opt.xmlns&&(N.ns=u.ns),h.attribList.length=0,R(h,"onopentagstart",N)}function z(h,u){var N=h.indexOf(":"),b=N<0?["",h]:h.split(":"),k=b[0],I=b[1];return u&&h==="xmlns"&&(k="xmlns",I=""),{prefix:k,local:I}}function We(h){if(h.strict||(h.attribName=h.attribName[h.looseCase]()),h.attribList.indexOf(h.attribName)!==-1||h.tag.attributes.hasOwnProperty(h.attribName)){h.attribName=h.attribValue="";return}if(h.opt.xmlns){var u=z(h.attribName,!0),N=u.prefix,b=u.local;if(N==="xmlns")if(b==="xml"&&h.attribValue!==y)F(h,"xml: prefix must be bound to "+y+` +Actual: `+h.attribValue);else if(b==="xmlns"&&h.attribValue!==E)F(h,"xmlns: prefix must be bound to "+E+` +Actual: `+h.attribValue);else{var k=h.tag,I=h.tags[h.tags.length-1]||h;k.ns===I.ns&&(k.ns=Object.create(I.ns)),k.ns[b]=h.attribValue}h.attribList.push([h.attribName,h.attribValue])}else h.tag.attributes[h.attribName]=h.attribValue,R(h,"onattribute",{name:h.attribName,value:h.attribValue});h.attribName=h.attribValue=""}function U(h,u){if(h.opt.xmlns){var N=h.tag,b=z(h.tagName);N.prefix=b.prefix,N.local=b.local,N.uri=N.ns[b.prefix]||"",N.prefix&&!N.uri&&(F(h,"Unbound namespace prefix: "+JSON.stringify(h.tagName)),N.uri=b.prefix);var k=h.tags[h.tags.length-1]||h;N.ns&&k.ns!==N.ns&&Object.keys(N.ns).forEach(function(es){R(h,"onopennamespace",{prefix:es,uri:N.ns[es]})});for(var I=0,L=h.attribList.length;I",h.tagName="",h.state=x.SCRIPT;return}R(h,"onscript",h.script),h.script=""}var u=h.tags.length,N=h.tagName;h.strict||(N=N[h.looseCase]());for(var b=N;u--;){var k=h.tags[u];if(k.name!==b)F(h,"Unexpected close tag");else break}if(u<0){F(h,"Unmatched closing tag: "+h.tagName),h.textNode+="",h.state=x.TEXT;return}h.tagName=N;for(var I=h.tags.length;I-- >u;){var L=h.tag=h.tags.pop();h.tagName=h.tag.name,R(h,"onclosetag",h.tagName);var $={};for(var W in L.ns)$[W]=L.ns[W];var ie=h.tags[h.tags.length-1]||h;h.opt.xmlns&&L.ns!==ie.ns&&Object.keys(L.ns).forEach(function(te){var re=L.ns[te];R(h,"onclosenamespace",{prefix:te,uri:re})})}u===0&&(h.closedRoot=!0),h.tagName=h.attribValue=h.attribName="",h.attribList.length=0,h.state=x.TEXT}function G(h){var u=h.entity,N=u.toLowerCase(),b,k="";return h.ENTITIES[u]?h.ENTITIES[u]:h.ENTITIES[N]?h.ENTITIES[N]:(u=N,u.charAt(0)==="#"&&(u.charAt(1)==="x"?(u=u.slice(2),b=parseInt(u,16),k=b.toString(16)):(u=u.slice(1),b=parseInt(u,10),k=b.toString(10))),u=u.replace(/^0+/,""),isNaN(b)||k.toLowerCase()!==u?(F(h,"Invalid character entity"),"&"+h.entity+";"):String.fromCodePoint(b))}function Q(h,u){u==="<"?(h.state=x.OPEN_WAKA,h.startTagPosition=h.position):T(u)||(F(h,"Non-whitespace before first tag."),h.textNode=u,h.state=x.TEXT)}function lt(h,u){var N="";return u"?(R(u,"onsgmldeclaration",u.sgmlDecl),u.sgmlDecl="",u.state=x.TEXT):(A(b)&&(u.state=x.SGML_DECL_QUOTED),u.sgmlDecl+=b);continue;case x.SGML_DECL_QUOTED:b===u.q&&(u.state=x.SGML_DECL,u.q=""),u.sgmlDecl+=b;continue;case x.DOCTYPE:b===">"?(u.state=x.TEXT,R(u,"ondoctype",u.doctype),u.doctype=!0):(u.doctype+=b,b==="["?u.state=x.DOCTYPE_DTD:A(b)&&(u.state=x.DOCTYPE_QUOTED,u.q=b));continue;case x.DOCTYPE_QUOTED:u.doctype+=b,b===u.q&&(u.q="",u.state=x.DOCTYPE);continue;case x.DOCTYPE_DTD:u.doctype+=b,b==="]"?u.state=x.DOCTYPE:A(b)&&(u.state=x.DOCTYPE_DTD_QUOTED,u.q=b);continue;case x.DOCTYPE_DTD_QUOTED:u.doctype+=b,b===u.q&&(u.state=x.DOCTYPE_DTD,u.q="");continue;case x.COMMENT:b==="-"?u.state=x.COMMENT_ENDING:u.comment+=b;continue;case x.COMMENT_ENDING:b==="-"?(u.state=x.COMMENT_ENDED,u.comment=P(u.opt,u.comment),u.comment&&R(u,"oncomment",u.comment),u.comment=""):(u.comment+="-"+b,u.state=x.COMMENT);continue;case x.COMMENT_ENDED:b!==">"?(F(u,"Malformed comment"),u.comment+="--"+b,u.state=x.COMMENT):u.state=x.TEXT;continue;case x.CDATA:b==="]"?u.state=x.CDATA_ENDING:u.cdata+=b;continue;case x.CDATA_ENDING:b==="]"?u.state=x.CDATA_ENDING_2:(u.cdata+="]"+b,u.state=x.CDATA);continue;case x.CDATA_ENDING_2:b===">"?(u.cdata&&R(u,"oncdata",u.cdata),R(u,"onclosecdata"),u.cdata="",u.state=x.TEXT):b==="]"?u.cdata+="]":(u.cdata+="]]"+b,u.state=x.CDATA);continue;case x.PROC_INST:b==="?"?u.state=x.PROC_INST_ENDING:T(b)?u.state=x.PROC_INST_BODY:u.procInstName+=b;continue;case x.PROC_INST_BODY:if(!u.procInstBody&&T(b))continue;b==="?"?u.state=x.PROC_INST_ENDING:u.procInstBody+=b;continue;case x.PROC_INST_ENDING:b===">"?(R(u,"onprocessinginstruction",{name:u.procInstName,body:u.procInstBody}),u.procInstName=u.procInstBody="",u.state=x.TEXT):(u.procInstBody+="?"+b,u.state=x.PROC_INST_BODY);continue;case x.OPEN_TAG:_(f,b)?u.tagName+=b:(ee(u),b===">"?U(u):b==="/"?u.state=x.OPEN_TAG_SLASH:(T(b)||F(u,"Invalid character in tag name"),u.state=x.ATTRIB));continue;case x.OPEN_TAG_SLASH:b===">"?(U(u,!0),Ne(u)):(F(u,"Forward-slash in opening tag not followed by >"),u.state=x.ATTRIB);continue;case x.ATTRIB:if(T(b))continue;b===">"?U(u):b==="/"?u.state=x.OPEN_TAG_SLASH:_(d,b)?(u.attribName=b,u.attribValue="",u.state=x.ATTRIB_NAME):F(u,"Invalid attribute name");continue;case x.ATTRIB_NAME:b==="="?u.state=x.ATTRIB_VALUE:b===">"?(F(u,"Attribute without value"),u.attribValue=u.attribName,We(u),U(u)):T(b)?u.state=x.ATTRIB_NAME_SAW_WHITE:_(f,b)?u.attribName+=b:F(u,"Invalid attribute name");continue;case x.ATTRIB_NAME_SAW_WHITE:if(b==="=")u.state=x.ATTRIB_VALUE;else{if(T(b))continue;F(u,"Attribute without value"),u.tag.attributes[u.attribName]="",u.attribValue="",R(u,"onattribute",{name:u.attribName,value:""}),u.attribName="",b===">"?U(u):_(d,b)?(u.attribName=b,u.state=x.ATTRIB_NAME):(F(u,"Invalid attribute name"),u.state=x.ATTRIB)}continue;case x.ATTRIB_VALUE:if(T(b))continue;A(b)?(u.q=b,u.state=x.ATTRIB_VALUE_QUOTED):(F(u,"Unquoted attribute value"),u.state=x.ATTRIB_VALUE_UNQUOTED,u.attribValue=b);continue;case x.ATTRIB_VALUE_QUOTED:if(b!==u.q){b==="&"?u.state=x.ATTRIB_VALUE_ENTITY_Q:u.attribValue+=b;continue}We(u),u.q="",u.state=x.ATTRIB_VALUE_CLOSED;continue;case x.ATTRIB_VALUE_CLOSED:T(b)?u.state=x.ATTRIB:b===">"?U(u):b==="/"?u.state=x.OPEN_TAG_SLASH:_(d,b)?(F(u,"No whitespace between attributes"),u.attribName=b,u.attribValue="",u.state=x.ATTRIB_NAME):F(u,"Invalid attribute name");continue;case x.ATTRIB_VALUE_UNQUOTED:if(!D(b)){b==="&"?u.state=x.ATTRIB_VALUE_ENTITY_U:u.attribValue+=b;continue}We(u),b===">"?U(u):u.state=x.ATTRIB;continue;case x.CLOSE_TAG:if(u.tagName)b===">"?Ne(u):_(f,b)?u.tagName+=b:u.script?(u.script+=""?Ne(u):F(u,"Invalid characters in closing tag");continue;case x.TEXT_ENTITY:case x.ATTRIB_VALUE_ENTITY_Q:case x.ATTRIB_VALUE_ENTITY_U:var L,$;switch(u.state){case x.TEXT_ENTITY:L=x.TEXT,$="textNode";break;case x.ATTRIB_VALUE_ENTITY_Q:L=x.ATTRIB_VALUE_QUOTED,$="attribValue";break;case x.ATTRIB_VALUE_ENTITY_U:L=x.ATTRIB_VALUE_UNQUOTED,$="attribValue";break}if(b===";")if(u.opt.unparsedEntities){var W=G(u);u.entity="",u.state=L,u.write(W)}else u[$]+=G(u),u.entity="",u.state=L;else _(u.entity.length?w:g,b)?u.entity+=b:(F(u,"Invalid character in entity name"),u[$]+="&"+u.entity+b,u.entity="",u.state=L);continue;default:throw new Error(u,"Unknown state: "+u.state)}return u.position>=u.bufferCheckPosition&&i(u),u}String.fromCodePoint||function(){var h=String.fromCharCode,u=Math.floor,N=function(){var b=16384,k=[],I,L,$=-1,W=arguments.length;if(!W)return"";for(var ie="";++$1114111||u(te)!==te)throw RangeError("Invalid code point: "+te);te<=65535?k.push(te):(te-=65536,I=(te>>10)+55296,L=te%1024+56320,k.push(I,L)),($+1===W||k.length>b)&&(ie+=h.apply(null,k),k.length=0)}return ie};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:N,configurable:!0,writable:!0}):String.fromCodePoint=N}()})(typeof Rr=="undefined"?Rr.sax={}:Rr)});var If=Y((z2,Cf)=>{var Of=/[&<>"]/g,dy=RegExp(Of.source),my={"&":"&","<":"<",">":">",'"':"""},hy=n=>{let t=String(n);return t&&dy.test(t)?t.replace(Of,e=>my[e]):t},gy=(n,t)=>typeof n=="string"&&typeof t=="string"||n&&n[0].$name===t.$name,yy=(n,t)=>typeof n=="string"?n+t:n.concat(t),by=n=>n.reduce((t,e)=>{let i=t.length-1,r=t[i];return gy(r,e)?t[i]=yy(r,e):t.push(typeof e=="string"?e:[e]),t},[]),xy=(n,t,e)=>{let i=null,r={};return Object.keys(n).forEach(o=>{let a=Or(n[o])?n[o]:null;if(a)switch(o){case"$name":!t&&a&&(r.$name=a);break;case"$attrs":i=a;break;case"$markup":r.$markup=Df(a);break;default:a&&(r[o]=e(a))}}),{stripped:r,$attrs:i}},wy=n=>Array.isArray(n)&&n.length===1?n[0]:n,vy=(n,t)=>Or(t)?n?Object.keys(t).length===1&&t.$name?Object.assign(t,n):Object.assign(t,{$attrs:n}):t:n,Ey=n=>{if(!n)return;let t=Object.keys(n),[e]=t;return t.length===1&&e!=="$name"&&e!=="id"?n[t[0]]:n},Za=(n,t,e)=>{let i=e?l=>l:wy,r=i(n);if(!Or(r))return null;if(typeof r!="object"||Array.isArray(r))return r;let{$attrs:o,stripped:a}=xy(r,t,i),s=vy(o,a);return Ey(s)},_y=n=>{let t,e={},i=!0;return n.every(r=>(typeof r=="string"?t="$text":t=r[0].$name,e[t]?(i=!1,!1):(e[t]=!0,!0))),i},Ya=(n=[],t=[],e=!1)=>{let i=Array.isArray(n)?n:[n],r=Array.isArray(t)?t:[t],o=i.concat(r);return o.length===1&&!e?o[0]:o},Df=(n,t)=>{let e=[];return n!==null&&typeof n=="object"&&n.constructor===Array?(n.forEach(i=>{e.push(Za(i,t))}),e):Za(n,t)},Ty=(n,t)=>{let e,i={};return Object.keys(n).forEach(r=>{r!=="$markup"&&(i[r]=n[r])}),n.$markup&&n.$markup.forEach(r=>{typeof r=="string"?i.$text=Ya(i.$text,r,t):typeof r=="object"&&(r.constructor===Array?e=r[0].$name:e=r.$name,i[e]=Ya(i[e],Df(r,!0),t))}),i},Or=n=>n!=null&&(n.length==null||n.length!==0)&&(typeof n!="object"||Object.keys(n).length!==0);Cf.exports={condenseArray:by,escape:hy,isSomething:Or,moosh:Ya,objectifyMarkup:Ty,shouldObjectifyMarkup:_y,simplifyNode:Za}});var Pf=Y((G2,Lf)=>{var{EventEmitter:Ay}=require("events"),ky=Rf(),$t=If(),Ny=1,Cn=0,Bt=-1,Ff={preserveMarkup:Cn,simplifyNodes:!0,useArrays:Cn,lowercase:!0,trim:!0,normalize:!0,cdataAsText:!1,strict:!1},bi=function(t,e=Ff){let i=new Ay,r=[],o=Object.assign({},Ff,e),{preserveMarkup:a,simplifyNodes:s,useArrays:l,lowercase:c,trim:p,normalize:m,cdataAsText:y,strict:E}=o,v=null,d=null,f=ky.createStream(E,{lowercase:c,trim:p,normalize:m,cdataAsText:y});return f.on("opentag",g=>{r.length===0&&!i.listeners(`tag:${g.name}`).length||(v={$name:g.name,$attrs:g.attributes},l>Bt&&(v.$markup=[]),r.push(v))}),f.on("text",g=>{v&&(l>Bt?v.$markup.push(g):v.$text?v.$text+=g:v.$text=g)}),f.on("opencdata",()=>{v&&(y||(d={$name:"$cdata",text:""},l>Bt?v.$markup.push(d):v.$cdata=d))}),f.on("cdata",g=>{v&&(d!==null?d.text+=g:l>Bt?v.$markup.push(g):v.$text?v.$text+=g:v.$text=g)}),f.on("closecdata",()=>{d=null}),f.on("script",g=>{v&&(v.$script=g)}),f.on("closetag",g=>{let w,T=null,A=l>Cn;r.length!==0&&(l>Bt&&(a<=Bt?(v.$markup=$t.condenseArray(v.$markup),v=$t.objectifyMarkup(v,A)):a===Cn&&(w=$t.condenseArray(v.$markup),$t.shouldObjectifyMarkup(w)&&(v.$markup=w,v=$t.objectifyMarkup(v,A)))),i.listeners(`tag:${g}`).length&&i.emit(`tag:${g}`,s?$t.simplifyNode(v,!1,l>Cn):v),r.pop(),r.length>0&&(T=r[r.length-1],l>Bt?T.$markup.push(v):T[g]||(T[g]=$t.simplifyNode(v,!0))),v=T)}),f.on("end",()=>{i.emit("end")}),f.on("error",g=>{i.emit("error",g)}),t.pipe(f),i.pause=function(){t.pause()},i.resume=function(){t.resume()},i};bi.ALWAYS=Ny;bi.SOMETIMES=Cn;bi.NEVER=Bt;bi.toXml=function(t,{indent:e="",selfClosing:i=!0,escape:r=$t.escape,nodeName:o}={}){let a=e?` +`:"";function s(l,c,p){let m="",y,E=c,v=p?a+p:"",d=p+e,f="";return l=l||"",l.constructor===Array?(l.forEach(g=>{m+=s(g,E,p)}),m):(!E&&l.$name&&(E=l.$name),E&&(m=`${v}<${E}`,l.$attrs&&typeof l.$attrs=="object"&&(y=Object.keys(l.$attrs),y.forEach(g=>{m+=` ${g}=${JSON.stringify(String(l.$attrs[g]))}`}))),l==null||l===""||(typeof l=="object"?(y=Object.keys(l),y.forEach(g=>{let w=l[g];switch(g){case"$name":case"$attrs":break;case"$text":case"$markup":f+=s(w,null,d);break;case"$script":f+=s(w,"script",d);break;case"$cdata":f+=`${v}`;break;default:f+=s(w,g,d)}})):f+=v+r(l)),E?f?m+=`>${f}${a}${p}`:i?m+="/>":m+=`>`:m+=f,m)}return s(t,o,"")};Lf.exports=bi});var v1={};Se(v1,{ATTACHMENT_EXTS:()=>Fn,AUTH_REDIRECT_URI:()=>$r,ImportContext:()=>Wr,ImporterModal:()=>wi,default:()=>Zr});module.exports=gd(v1);var Ht=require("obsidian");var st=require("obsidian");var wt=class{constructor(t){this.importer=t,this.app=t.app}};var Pn=class extends wt{constructor(e,i){super(e);this.scan=i.mergableDataObject,this.objects=this.scan.mergeableDataObjectData.mergeableDataObjectEntry}async format(){let e=[];for(let i of this.objects){if(!i.customMap)continue;let r=i.customMap.mapEntry[0].value.stringValue,o=await this.importer.database.get` + SELECT z_pk, zmedia, ztypeuti FROM ziccloudsyncingobject + WHERE zidentifier = ${r}`,a=await this.importer.resolveAttachment(o.Z_PK,"com.apple.notes.gallery");if(a||(a=await this.importer.resolveAttachment(o.ZMEDIA,o.ZTYPEUTI)),a)e.push(this.importer.app.fileManager.generateMarkdownLink(a,"/"));else return"**Cannot decode scan**"}return` +${e.join(` +`)} +`}};Pn.protobufType="ciofecaforensics.MergableDataProto";var Mn=class extends wt{constructor(e,i){super(e);this.rowLocations={};this.columnLocations={};this.table=i.mergableDataObject;let r=this.table.mergeableDataObjectData;this.keys=r.mergeableDataObjectKeyItem,this.types=r.mergeableDataObjectTypeItem,this.uuids=r.mergeableDataObjectUuidItem.map(this.uuidToString),this.objects=r.mergeableDataObjectEntry}async parse(){let e=this.objects.find(r=>r.customMap&&this.types[r.customMap.type]=="com.apple.notes.ICTable");if(!e)return null;let i=null;for(let r of e.customMap.mapEntry){let o=this.objects[r.value.objectIndex];switch(this.keys[r.key]){case"crRows":[this.rowLocations,this.rowCount]=this.findLocations(o);break;case"crColumns":[this.columnLocations,this.columnCount]=this.findLocations(o);break;case"cellColumns":i=o;break}}return i?await this.computeCells(i):null}findLocations(e){let i=[],r={};for(let o of e.orderedSet.ordering.array.attachment)i.push(this.uuidToString(o.uuid));for(let o of e.orderedSet.ordering.contents.element){let a=this.getTargetUuid(o.key),s=this.getTargetUuid(o.value);r[s]=i.indexOf(a)}return[r,i.length]}async computeCells(e){let i=Array(this.rowCount).fill(0).map(()=>Array(this.columnCount));for(let r of e.dictionary.element){let o=this.columnLocations[this.getTargetUuid(r.key)],a=this.objects[r.value.objectIndex];for(let s of a.dictionary.element){let l=this.rowLocations[this.getTargetUuid(s.key)],c=this.objects[s.value.objectIndex];if(!(l in i)||!c)continue;let p=new Wt(this.importer,c);i[l][o]=await p.format(!0)}}return i}async format(){let e=await this.parse();if(!e)return"";let i=` +`;for(let r=0;r").replace("|","|"),o.trim()}formatMultiRun(e){var o,a,s,l,c,p;let i=(o=e.paragraphStyle)==null?void 0:o.styleType,r="";switch(this.multiRun){case 3:(((a=e.paragraphStyle)==null?void 0:a.indentAmount)==0&&!rs.includes(i)||xd(e))&&(this.multiRun=0);break;case 1:i!=4&&(this.multiRun=0,r+="```\n");break;case 2:(s=e.paragraphStyle)!=null&&s.alignment||(this.multiRun=0,r+=`

+`);break}if(this.multiRun==0){if(i==4)this.multiRun=1,r+="\n```\n";else if(rs.includes(i))this.multiRun=3,(l=e.paragraphStyle)!=null&&l.indentAmount&&(r+=` +-   +`);else if((c=e.paragraphStyle)!=null&&c.alignment){this.multiRun=2;let m=this.convertAlign((p=e==null?void 0:e.paragraphStyle)==null?void 0:p.alignment);r+=` +

`}}return r}async formatHtmlAttr(e){var r,o;e.strikethrough&&(e.fragment=`${e.fragment}`),e.underlined&&(e.fragment=`${e.fragment}`),e.superscript==1&&(e.fragment=`${e.fragment}`),e.superscript==-1&&(e.fragment=`${e.fragment}`);let i="";switch(e.fontWeight){case 1:e.fragment=`${e.fragment}`;break;case 2:e.fragment=`${e.fragment}`;break;case 3:e.fragment=`${e.fragment}`;break}return(r=e.font)!=null&&r.fontName&&e.font.fontName!==bd&&(i+=`font-family:${e.font.fontName};`),(o=e.font)!=null&&o.pointSize&&(i+=`font-size:${e.font.pointSize}pt;`),e.color&&(i+=`color:${this.convertColor(e.color)};`),e.link&&!zr.test(e.link)?(i&&(i=` style="${i}"`),e.fragment=`${e.fragment}`):i&&(e.link&&(e.fragment=await this.getInternalLink(e.link,e.fragment)),e.fragment=`${e.fragment}`),e.atLineStart?this.formatParagraph(e):e.fragment}async formatAttr(e){switch(e.fontWeight){case 1:e.fragment=`**${e.fragment}**`;break;case 2:e.fragment=`*${e.fragment}*`;break;case 3:e.fragment=`***${e.fragment}***`;break}return e.strikethrough&&(e.fragment=`~~${e.fragment}~~`),e.link&&e.link!=e.fragment&&(zr.test(e.link)?e.fragment=await this.getInternalLink(e.link,e.fragment):e.fragment=`[${e.fragment}](${e.link})`),e.atLineStart?this.formatParagraph(e):e.fragment}formatParagraph(e){var a,s,l,c,p,m;let i=" ".repeat(((a=e.paragraphStyle)==null?void 0:a.indentAmount)||0),r=(s=e.paragraphStyle)==null?void 0:s.styleType,o=(l=e.paragraphStyle)!=null&&l.blockquote?"> ":"";switch(this.listNumber!=0&&(r!==102||this.listIndent!==((c=e.paragraphStyle)==null?void 0:c.indentAmount))&&(this.listIndent=((p=e.paragraphStyle)==null?void 0:p.indentAmount)||0,this.listNumber=0),r){case 0:return`${o}# ${e.fragment}`;case 1:return`${o}## ${e.fragment}`;case 2:return`${o}### ${e.fragment}`;case 101:case 100:return`${o}${i}- ${e.fragment}`;case 102:return this.listNumber++,`${o}${i}${this.listNumber}. ${e.fragment}`;case 103:let y=(m=e.paragraphStyle.checklist)!=null&&m.done?"[x]":"[ ]";return`${o}${i}- ${y} ${e.fragment}`}return this.multiRun==3&&(o+=i),`${o}${e.fragment}`}async formatAttachment(e){var l,c,p;let i,r,o;switch((l=e.attachmentInfo)==null?void 0:l.typeUti){case"com.apple.notes.inlinetextattachment.hashtag":case"com.apple.notes.inlinetextattachment.mention":return i=await this.importer.database.get` + SELECT zalttext FROM ziccloudsyncingobject + WHERE zidentifier = ${e.attachmentInfo.attachmentIdentifier}`,i.ZALTTEXT;case"com.apple.notes.inlinetextattachment.link":return i=await this.importer.database.get` + SELECT ztokencontentidentifier FROM ziccloudsyncingobject + WHERE zidentifier = ${e.attachmentInfo.attachmentIdentifier}`,await this.getInternalLink(i.ZTOKENCONTENTIDENTIFIER);case"com.apple.notes.table":return i=await this.importer.database.get` + SELECT hex(zmergeabledata1) as zhexdata FROM ziccloudsyncingobject + WHERE zidentifier = ${e.attachmentInfo.attachmentIdentifier}`,o=this.importer.decodeData(i.zhexdata,Mn),await o.format();case"public.url":return i=await this.importer.database.get` + SELECT ztitle, zurlstring FROM ziccloudsyncingobject + WHERE zidentifier = ${e.attachmentInfo.attachmentIdentifier}`,`[**${i.ZTITLE}**](${i.ZURLSTRING})`;case"com.apple.notes.gallery":return i=await this.importer.database.get` + SELECT hex(zmergeabledata1) as zhexdata FROM ziccloudsyncingobject + WHERE zidentifier = ${e.attachmentInfo.attachmentIdentifier}`,o=this.importer.decodeData(i.zhexdata,Pn),await o.format();case"com.apple.paper.doc.scan":case"com.apple.drawing":case"com.apple.drawing.2":case"com.apple.paper":i=await this.importer.database.get` + SELECT z_pk, zhandwritingsummary + FROM (SELECT *, NULL AS zhandwritingsummary FROM ziccloudsyncingobject) + WHERE zidentifier = ${e.attachmentInfo.attachmentIdentifier}`,r=i==null?void 0:i.Z_PK;break;default:i=await this.importer.database.get` + SELECT zmedia FROM ziccloudsyncingobject + WHERE zidentifier = ${(c=e.attachmentInfo)==null?void 0:c.attachmentIdentifier}`,r=i==null?void 0:i.ZMEDIA;break}if(!r)return` **(unknown attachment: ${(p=e.attachmentInfo)==null?void 0:p.typeUti})** `;let a=await this.importer.resolveAttachment(r,e.attachmentInfo.typeUti),s=a?` +${this.app.fileManager.generateMarkdownLink(a,"/")} +`:" **(error reading attachment)**";return this.importer.includeHandwriting&&i.ZHANDWRITINGSUMMARY&&(s=` +> [!Handwriting]- +> ${i.ZHANDWRITINGSUMMARY.replace(` +`,` +> `)}${s}`),s}async getInternalLink(e,i=void 0){let r=e.match(zr)[1],o=await this.importer.database.get` + SELECT z_pk FROM ziccloudsyncingobject + WHERE zidentifier = ${r.toUpperCase()}`,a=await this.importer.resolveNote(o.Z_PK);return a?this.app.fileManager.generateMarkdownLink(a,this.importer.rootFolder.path,void 0,i):"(unknown file link)"}convertColor(e){let i="#";for(let r of Object.values(e))i+=Math.floor(r*255).toString(16);return i}convertAlign(e){switch(e){default:return"left";case 1:return"center";case 2:return"right";case 3:return"justify"}}};Wt.protobufType="ciofecaforensics.Document";function xd(n){return n.attachmentInfo?!n.attachmentInfo.typeUti.includes("com.apple.notes.inlinetextattachment"):!1}function os(n,t){var e,i;if(!t||n.$type!=t.$type)return!1;for(let r of n.$type.fieldsArray)if(r.name!="length"){if((e=n[r.name])!=null&&e.$type&&((i=t[r.name])!=null&&i.$type)){if(!os(n[r.name],t[r.name]))return!1}else if(n[r.name]!=t[r.name])return!1}return!0}var as={nested:{ciofecaforensics:{nested:{Color:{fields:{red:{type:"float",id:1},green:{type:"float",id:2},blue:{type:"float",id:3},alpha:{type:"float",id:4}}},AttachmentInfo:{fields:{attachmentIdentifier:{type:"string",id:1},typeUti:{type:"string",id:2}}},Font:{fields:{fontName:{type:"string",id:1},pointSize:{type:"float",id:2},fontHints:{type:"int32",id:3}}},ParagraphStyle:{fields:{styleType:{type:"int32",id:1,options:{default:-1}},alignment:{type:"int32",id:2},indentAmount:{type:"int32",id:4},checklist:{type:"Checklist",id:5},blockquote:{type:"int32",id:8}}},Checklist:{fields:{uuid:{type:"bytes",id:1},done:{type:"int32",id:2}}},DictionaryElement:{fields:{key:{type:"ObjectID",id:1},value:{type:"ObjectID",id:2}}},Dictionary:{fields:{element:{rule:"repeated",type:"DictionaryElement",id:1,options:{packed:!1}}}},ObjectID:{fields:{unsignedIntegerValue:{type:"uint64",id:2},stringValue:{type:"string",id:4},objectIndex:{type:"int32",id:6}}},RegisterLatest:{fields:{contents:{type:"ObjectID",id:2}}},MapEntry:{fields:{key:{type:"int32",id:1},value:{type:"ObjectID",id:2}}},AttributeRun:{fields:{length:{type:"int32",id:1},paragraphStyle:{type:"ParagraphStyle",id:2},font:{type:"Font",id:3},fontWeight:{type:"int32",id:5},underlined:{type:"int32",id:6},strikethrough:{type:"int32",id:7},superscript:{type:"int32",id:8},link:{type:"string",id:9},color:{type:"Color",id:10},attachmentInfo:{type:"AttachmentInfo",id:12}}},NoteStoreProto:{fields:{document:{type:"Document",id:2}}},Document:{fields:{version:{type:"int32",id:2},note:{type:"Note",id:3}}},Note:{fields:{noteText:{type:"string",id:2},attributeRun:{rule:"repeated",type:"AttributeRun",id:5,options:{packed:!1}}}},MergableDataProto:{fields:{mergableDataObject:{type:"MergableDataObject",id:2}}},MergableDataObject:{fields:{version:{type:"int32",id:2},mergeableDataObjectData:{type:"MergeableDataObjectData",id:3}}},MergeableDataObjectData:{fields:{mergeableDataObjectEntry:{rule:"repeated",type:"MergeableDataObjectEntry",id:3,options:{packed:!1}},mergeableDataObjectKeyItem:{rule:"repeated",type:"string",id:4},mergeableDataObjectTypeItem:{rule:"repeated",type:"string",id:5},mergeableDataObjectUuidItem:{rule:"repeated",type:"bytes",id:6}}},MergeableDataObjectEntry:{fields:{registerLatest:{type:"RegisterLatest",id:1},list:{type:"List",id:5},dictionary:{type:"Dictionary",id:6},unknownMessage:{type:"UnknownMergeableDataObjectEntryMessage",id:9},note:{type:"Note",id:10},customMap:{type:"MergeableDataObjectMap",id:13},orderedSet:{type:"OrderedSet",id:16}}},UnknownMergeableDataObjectEntryMessage:{fields:{unknownEntry:{type:"UnknownMergeableDataObjectEntryMessageEntry",id:1}}},UnknownMergeableDataObjectEntryMessageEntry:{fields:{unknownInt1:{type:"int32",id:1},unknownInt2:{type:"int64",id:2}}},MergeableDataObjectMap:{fields:{type:{type:"int32",id:1},mapEntry:{rule:"repeated",type:"MapEntry",id:3,options:{packed:!1}}}},OrderedSet:{fields:{ordering:{type:"OrderedSetOrdering",id:1},elements:{type:"Dictionary",id:2}}},OrderedSetOrdering:{fields:{array:{type:"OrderedSetOrderingArray",id:1},contents:{type:"Dictionary",id:2}}},OrderedSetOrderingArray:{fields:{contents:{type:"Note",id:1},attachment:{rule:"repeated",type:"OrderedSetOrderingArrayAttachment",id:2,options:{packed:!1}}}},OrderedSetOrderingArrayAttachment:{fields:{index:{type:"int32",id:1},uuid:{type:"bytes",id:2}}},List:{fields:{listEntry:{rule:"repeated",type:"ListEntry",id:1,options:{packed:!1}}}},ListEntry:{fields:{id:{type:"ObjectID",id:2},details:{type:"ListEntryDetails",id:3},additionalDetails:{type:"ListEntryDetails",id:4}}},ListEntryDetails:{fields:{listEntryDetailsKey:{type:"ListEntryDetailsKey",id:1},id:{type:"ObjectID",id:2}}},ListEntryDetailsKey:{fields:{listEntryDetailsTypeIndex:{type:"int32",id:1},listEntryDetailsKey:{type:"int32",id:2}}}}}}};var De=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ks=1440,wd=0,vd=4,Ed=9,_d=5,Td=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Ad=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],kd=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],Nd=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Sd=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],Rd=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],vt=15;function Xr(){let n=this,t,e,i,r,o,a;function s(c,p,m,y,E,v,d,f,g,w,T){let A,D,_,S,x,C,O,R,M,P,H,Z,F,ee,z;P=0,x=m;do i[c[p+P]]++,P++,x--;while(x!==0);if(i[0]==m)return d[0]=-1,f[0]=0,0;for(R=f[0],C=1;C<=vt&&i[C]===0;C++);for(O=C,Rx&&(R=x),f[0]=R,ee=1<Z+R;){if(S++,Z+=R,z=_-Z,z=z>R?R:z,(D=1<<(C=O-Z))>A+1&&(D-=A+1,F=O,Cks)return-3;o[S]=H=w[0],w[0]+=z,S!==0?(a[S]=x,r[0]=C,r[1]=R,C=x>>>Z-R,r[2]=H-o[S-1]-C,g.set(r,(o[S-1]+C)*3)):d[0]=H}for(r[1]=O-Z,P>=m?r[0]=128+64:T[P]>>Z;C>>=1)x^=C;for(x^=C,M=(1<257?(w==-3?g.msg="oversubscribed distance tree":w==-5?(g.msg="incomplete distance tree",w=-3):w!=-4&&(g.msg="empty distance tree with lengths",w=-3),w):0)}}Xr.inflate_trees_fixed=function(n,t,e,i){return n[0]=Ed,t[0]=_d,e[0]=Td,i[0]=Ad,0};var Ei=0,ss=1,ls=2,cs=3,ps=4,us=5,fs=6,Gr=7,ds=8,_i=9;function Od(){let n=this,t,e=0,i,r=0,o=0,a=0,s=0,l=0,c=0,p=0,m,y=0,E,v=0;function d(f,g,w,T,A,D,_,S){let x,C,O,R,M,P,H,Z,F,ee,z,We,U,Ne,G,Q;H=S.next_in_index,Z=S.avail_in,M=_.bitb,P=_.bitk,F=_.write,ee=F<_.read?_.read-F-1:_.end-F,z=De[f],We=De[g];do{for(;P<20;)Z--,M|=(S.read_byte(H++)&255)<>=C[Q+1],P-=C[Q+1],_.win[F++]=C[Q+2],ee--;continue}do{if(M>>=C[Q+1],P-=C[Q+1],R&16){for(R&=15,U=C[Q+2]+(M&De[R]),M>>=R,P-=R;P<15;)Z--,M|=(S.read_byte(H++)&255)<>=C[Q+1],P-=C[Q+1],R&16){for(R&=15;P>=R,P-=R,ee-=U,F>=Ne)G=F-Ne,F-G>0&&2>F-G?(_.win[F++]=_.win[G++],_.win[F++]=_.win[G++],U-=2):(_.win.set(_.win.subarray(G,G+2),F),F+=2,G+=2,U-=2);else{G=F-Ne;do G+=_.end;while(G<0);if(R=_.end-G,U>R){if(U-=R,F-G>0&&R>F-G)do _.win[F++]=_.win[G++];while(--R!==0);else _.win.set(_.win.subarray(G,G+R),F),F+=R,G+=R,R=0;G=0}}if(F-G>0&&U>F-G)do _.win[F++]=_.win[G++];while(--U!==0);else _.win.set(_.win.subarray(G,G+U),F),F+=U,G+=U,U=0;break}else if(!(R&64))x+=C[Q+2],x+=M&De[R],Q=(O+x)*3,R=C[Q];else return S.msg="invalid distance code",U=S.avail_in-Z,U=P>>3>3:U,Z+=U,H-=U,P-=U<<3,_.bitb=M,_.bitk=P,S.avail_in=Z,S.total_in+=H-S.next_in_index,S.next_in_index=H,_.write=F,-3;while(!0);break}if(R&64)return R&32?(U=S.avail_in-Z,U=P>>3>3:U,Z+=U,H-=U,P-=U<<3,_.bitb=M,_.bitk=P,S.avail_in=Z,S.total_in+=H-S.next_in_index,S.next_in_index=H,_.write=F,1):(S.msg="invalid literal/length code",U=S.avail_in-Z,U=P>>3>3:U,Z+=U,H-=U,P-=U<<3,_.bitb=M,_.bitk=P,S.avail_in=Z,S.total_in+=H-S.next_in_index,S.next_in_index=H,_.write=F,-3);if(x+=C[Q+2],x+=M&De[R],Q=(O+x)*3,(R=C[Q])===0){M>>=C[Q+1],P-=C[Q+1],_.win[F++]=C[Q+2],ee--;break}}while(!0)}while(ee>=258&&Z>=10);return U=S.avail_in-Z,U=P>>3>3:U,Z+=U,H-=U,P-=U<<3,_.bitb=M,_.bitk=P,S.avail_in=Z,S.total_in+=H-S.next_in_index,S.next_in_index=H,_.write=F,0}n.init=function(f,g,w,T,A,D){t=Ei,c=f,p=g,m=w,y=T,E=A,v=D,i=null},n.proc=function(f,g,w){let T,A,D,_=0,S=0,x=0,C,O,R,M;for(x=g.next_in_index,C=g.avail_in,_=f.bitb,S=f.bitk,O=f.write,R=O=258&&C>=10&&(f.bitb=_,f.bitk=S,g.avail_in=C,g.total_in+=x-g.next_in_index,g.next_in_index=x,f.write=O,w=d(c,p,m,y,E,v,f,g),x=g.next_in_index,C=g.avail_in,_=f.bitb,S=f.bitk,O=f.write,R=O>>=i[A+1],S-=i[A+1],D=i[A],D===0){a=i[A+2],t=fs;break}if(D&16){s=D&15,e=i[A+2],t=ls;break}if(!(D&64)){o=D,r=A/3+i[A+2];break}if(D&32){t=Gr;break}return t=_i,g.msg="invalid literal/length code",w=-3,f.bitb=_,f.bitk=S,g.avail_in=C,g.total_in+=x-g.next_in_index,g.next_in_index=x,f.write=O,f.inflate_flush(g,w);case ls:for(T=s;S>=T,S-=T,o=p,i=E,r=v,t=cs;case cs:for(T=o;S>=i[A+1],S-=i[A+1],D=i[A],D&16){s=D&15,l=i[A+2],t=ps;break}if(!(D&64)){o=D,r=A/3+i[A+2];break}return t=_i,g.msg="invalid distance code",w=-3,f.bitb=_,f.bitk=S,g.avail_in=C,g.total_in+=x-g.next_in_index,g.next_in_index=x,f.write=O,f.inflate_flush(g,w);case ps:for(T=s;S>=T,S-=T,t=us;case us:for(M=O-l;M<0;)M+=f.end;for(;e!==0;){if(R===0&&(O==f.end&&f.read!==0&&(O=0,R=O7&&(S-=8,C++,x--),f.write=O,w=f.inflate_flush(g,w),O=f.write,R=Od.avail_out&&(g=d.avail_out),g!==0&&f==-5&&(f=0),d.avail_out-=g,d.total_out+=g,d.next_out.set(e.win.subarray(T,T+g),w),w+=g,T+=g,T==e.end&&(T=0,e.write==e.end&&(e.write=0),g=e.write-T,g>d.avail_out&&(g=d.avail_out),g!==0&&f==-5&&(f=0),d.avail_out-=g,d.total_out+=g,d.next_out.set(e.win.subarray(T,T+g),w),w+=g,T+=g),d.next_out_index=w,e.read=T,f},e.proc=function(d,f){let g,w,T,A,D,_,S,x;for(A=d.next_in_index,D=d.avail_in,w=e.bitb,T=e.bitk,_=e.write,S=_>>1){case 0:w>>>=3,T-=3,g=T&7,w>>>=g,T-=g,i=Vr;break;case 1:C=[],O=[],R=[[]],M=[[]],Xr.inflate_trees_fixed(C,O,R,M),p.init(C[0],O[0],R[0],0,M[0],0),w>>>=3,T-=3,i=Ti;break;case 2:w>>>=3,T-=3,i=gs;break;case 3:return w>>>=3,T-=3,i=Zt,d.msg="invalid block type",f=-3,e.bitb=w,e.bitk=T,d.avail_in=D,d.total_in+=A-d.next_in_index,d.next_in_index=A,e.write=_,e.inflate_flush(d,f)}break;case Vr:for(;T<32;){if(D!==0)f=0;else return e.bitb=w,e.bitk=T,d.avail_in=D,d.total_in+=A-d.next_in_index,d.next_in_index=A,e.write=_,e.inflate_flush(d,f);D--,w|=(d.read_byte(A++)&255)<>>16&65535)!=(w&65535))return i=Zt,d.msg="invalid stored block lengths",f=-3,e.bitb=w,e.bitk=T,d.avail_in=D,d.total_in+=A-d.next_in_index,d.next_in_index=A,e.write=_,e.inflate_flush(d,f);r=w&65535,w=T=0,i=r!==0?hs:m!==0?Ai:fn;break;case hs:if(D===0||S===0&&(_==e.end&&e.read!==0&&(_=0,S=_D&&(g=D),g>S&&(g=S),e.win.set(d.read_buf(A,g),_),A+=g,D-=g,_+=g,S-=g,(r-=g)!==0)break;i=m!==0?Ai:fn;break;case gs:for(;T<14;){if(D!==0)f=0;else return e.bitb=w,e.bitk=T,d.avail_in=D,d.total_in+=A-d.next_in_index,d.next_in_index=A,e.write=_,e.inflate_flush(d,f);D--,w|=(d.read_byte(A++)&255)<29||(g>>5&31)>29)return i=Zt,d.msg="too many length or distance symbols",f=-3,e.bitb=w,e.bitk=T,d.avail_in=D,d.total_in+=A-d.next_in_index,d.next_in_index=A,e.write=_,e.inflate_flush(d,f);if(g=258+(g&31)+(g>>5&31),!s||s.length>>=14,T-=14,a=0,i=ys;case ys:for(;a<4+(o>>>10);){for(;T<3;){if(D!==0)f=0;else return e.bitb=w,e.bitk=T,d.avail_in=D,d.total_in+=A-d.next_in_index,d.next_in_index=A,e.write=_,e.inflate_flush(d,f);D--,w|=(d.read_byte(A++)&255)<>>=3,T-=3}for(;a<19;)s[ms[a++]]=0;if(l[0]=7,g=v.inflate_trees_bits(s,l,c,y,d),g!=0)return f=g,f==-3&&(s=null,i=Zt),e.bitb=w,e.bitk=T,d.avail_in=D,d.total_in+=A-d.next_in_index,d.next_in_index=A,e.write=_,e.inflate_flush(d,f);a=0,i=bs;case bs:for(;g=o,!(a>=258+(g&31)+(g>>5&31));){let ee,z;for(g=l[0];T>>=g,T-=g,s[a++]=z;else{for(x=z==18?7:z-14,ee=z==18?11:3;T>>=g,T-=g,ee+=w&De[x],w>>>=x,T-=x,x=a,g=o,x+ee>258+(g&31)+(g>>5&31)||z==16&&x<1)return s=null,i=Zt,d.msg="invalid bit length repeat",f=-3,e.bitb=w,e.bitk=T,d.avail_in=D,d.total_in+=A-d.next_in_index,d.next_in_index=A,e.write=_,e.inflate_flush(d,f);z=z==16?s[x-1]:0;do s[x++]=z;while(--ee!==0);a=x}}if(c[0]=-1,P=[],H=[],Z=[],F=[],P[0]=9,H[0]=6,g=o,g=v.inflate_trees_dynamic(257+(g&31),1+(g>>5&31),s,P,H,Z,F,y,d),g!=0)return g==-3&&(s=null,i=Zt),f=g,e.bitb=w,e.bitk=T,d.avail_in=D,d.total_in+=A-d.next_in_index,d.next_in_index=A,e.write=_,e.inflate_flush(d,f);p.init(P[0],H[0],y,Z[0],y,F[0]),i=Ti;case Ti:if(e.bitb=w,e.bitk=T,d.avail_in=D,d.total_in+=A-d.next_in_index,d.next_in_index=A,e.write=_,(f=p.proc(e,d,f))!=1)return e.inflate_flush(d,f);if(f=0,p.free(d),A=d.next_in_index,D=d.avail_in,w=e.bitb,T=e.bitk,_=e.write,S=_15?(n.inflateEnd(e),-2):(n.wbits=i,e.istate.blocks=new Dd(e,1<>4)+8>a.wbits){a.mode=Et,e.msg="invalid win size",a.marker=5;break}a.mode=ws;case ws:if(e.avail_in===0)return r;if(r=i,e.avail_in--,e.total_in++,o=e.read_byte(e.next_in_index++)&255,((a.method<<8)+o)%31!==0){a.mode=Et,e.msg="incorrect header check",a.marker=5;break}if(!(o&Cd)){a.mode=$n;break}a.mode=vs;case vs:if(e.avail_in===0)return r;r=i,e.avail_in--,e.total_in++,a.need=(e.read_byte(e.next_in_index++)&255)<<24&4278190080,a.mode=Es;case Es:if(e.avail_in===0)return r;r=i,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<16&16711680,a.mode=_s;case _s:if(e.avail_in===0)return r;r=i,e.avail_in--,e.total_in++,a.need+=(e.read_byte(e.next_in_index++)&255)<<8&65280,a.mode=Ts;case Ts:return e.avail_in===0?r:(r=i,e.avail_in--,e.total_in++,a.need+=e.read_byte(e.next_in_index++)&255,a.mode=Kr,2);case Kr:return a.mode=Et,e.msg="need dictionary",a.marker=0,-2;case $n:if(r=a.blocks.proc(e,r),r==-3){a.mode=Et,a.marker=0;break}if(r==0&&(r=i),r!=1)return r;r=i,a.blocks.reset(e,a.was),a.mode=As;case As:return e.avail_in=0,1;case Et:return-3;default:return-2}},n.inflateSetDictionary=function(e,i,r){let o=0,a=r;if(!e||!e.istate||e.istate.mode!=Kr)return-2;let s=e.istate;return a>=1<0&&e.next_in_index!=y&&(l(e.next_in_index),y=e.next_in_index)}while(e.avail_in>0||e.avail_out===0);return c.length>1?(m=new Uint8Array(v),c.forEach(function(d){m.set(d,E),E+=d.length})):m=c[0]?new Uint8Array(c[0]):new Uint8Array,m}},t.flush=function(){e.inflateEnd()}}var Rs="/",tb=new Date(2107,11,31),nb=new Date(1980,0,1),_e=void 0,dn="undefined",ki="function";var Bn=class{constructor(t){return class extends TransformStream{constructor(e,i){let r=new t(i);super({transform(o,a){a.enqueue(r.append(o))},flush(o){let a=r.flush();a&&o.enqueue(a)}})}}}};var Md=64,Os=2;try{typeof navigator!=dn&&navigator.hardwareConcurrency&&(Os=navigator.hardwareConcurrency)}catch(n){}var $d={chunkSize:512*1024,maxWorkers:Os,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:_e,CompressionStreamNative:typeof CompressionStream!=dn&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=dn&&DecompressionStream},Tt=Object.assign({},$d);function Jr(){return Tt}function Ds(n){return Math.max(n.chunkSize,Md)}function Ni(n){let{baseURL:t,chunkSize:e,maxWorkers:i,terminateWorkerTimeout:r,useCompressionStream:o,useWebWorkers:a,Deflate:s,Inflate:l,CompressionStream:c,DecompressionStream:p,workerScripts:m}=n;if(_t("baseURL",t),_t("chunkSize",e),_t("maxWorkers",i),_t("terminateWorkerTimeout",r),_t("useCompressionStream",o),_t("useWebWorkers",a),s&&(Tt.CompressionStream=new Bn(s)),l&&(Tt.DecompressionStream=new Bn(l)),_t("CompressionStream",c),_t("DecompressionStream",p),m!==_e){let{deflate:y,inflate:E}=m;if((y||E)&&(Tt.workerScripts||(Tt.workerScripts={})),y){if(!Array.isArray(y))throw new Error("workerScripts.deflate must be an array");Tt.workerScripts.deflate=y}if(E){if(!Array.isArray(E))throw new Error("workerScripts.inflate must be an array");Tt.workerScripts.inflate=E}}}function _t(n,t){t!==_e&&(Tt[n]=t)}var Cs=[];for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t&1?t=t>>>1^3988292384:t=t>>>1;Cs[n]=t}var ct=class{constructor(t){this.crc=t||-1}append(t){let e=this.crc|0;for(let i=0,r=t.length|0;i>>8^Cs[(e^t[i])&255];this.crc=e}get(){return~this.crc}};var Un=class extends TransformStream{constructor(){let t,e=new ct;super({transform(i,r){e.append(i),r.enqueue(i)},flush(){let i=new Uint8Array(4);new DataView(i.buffer).setUint32(0,e.get()),t.value=i}}),t=this}};function Is(n){if(typeof TextEncoder=="undefined"){n=unescape(encodeURIComponent(n));let t=new Uint8Array(n.length);for(let e=0;e0&&t&&(n[e-1]=Te.partial(t,n[e-1]&2147483648>>t-1,1)),n},partial(n,t,e){return n===32?t:(e?t|0:t<<32-n)+n*1099511627776},getPartial(n){return Math.round(n/1099511627776)||32},_shiftRight(n,t,e,i){for(i===void 0&&(i=[]);t>=32;t-=32)i.push(e),e=0;if(t===0)return i.concat(n);for(let a=0;a>>t),e=n[a]<<32-t;let r=n.length?n[n.length-1]:0,o=Te.getPartial(r);return i.push(Te.partial(t+o&31,t+o>32?e:i.pop(),1)),i}},jn={bytes:{fromBits(n){let e=Te.bitLength(n)/8,i=new Uint8Array(e),r;for(let o=0;o>>24,r<<=8;return i},toBits(n){let t=[],e,i=0;for(e=0;e9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");let o=new Uint32Array(e),a=0;for(let s=t.blockSize+i-(t.blockSize+i&t.blockSize-1);s<=r;s+=t.blockSize)t._block(o.subarray(16*a,16*(a+1))),a+=1;return e.splice(0,16*a),t}finalize(){let n=this,t=n._buffer,e=n._h;t=Te.concat(t,[Te.partial(1,1)]);for(let i=t.length+2;i&15;i++)t.push(0);for(t.push(Math.floor(n._length/4294967296)),t.push(n._length|0);t.length;)n._block(t.splice(0,16));return n.reset(),e}_f(n,t,e,i){if(n<=19)return t&e|~t&i;if(n<=39)return t^e^i;if(n<=59)return t&e|t&i|e&i;if(n<=79)return t^e^i}_S(n,t){return t<>>32-n}_block(n){let t=this,e=t._h,i=Array(80);for(let c=0;c<16;c++)i[c]=n[c];let r=e[0],o=e[1],a=e[2],s=e[3],l=e[4];for(let c=0;c<=79;c++){c>=16&&(i[c]=t._S(1,i[c-3]^i[c-8]^i[c-14]^i[c-16]));let p=t._S(5,r)+t._f(c,o,a,s)+l+i[c]+t._key[Math.floor(c/20)]|0;l=s,s=a,a=t._S(30,o),o=r,r=p}e[0]=e[0]+r|0,e[1]=e[1]+o|0,e[2]=e[2]+a|0,e[3]=e[3]+s|0,e[4]=e[4]+l|0}};var Qr={};Qr.aes=class{constructor(n){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let e=t._tables[0][4],i=t._tables[1],r=n.length,o,a,s,l=1;if(r!==4&&r!==6&&r!==8)throw new Error("invalid aes key size");for(t._key=[a=n.slice(0),s=[]],o=r;o<4*r+28;o++){let c=a[o-1];(o%r===0||r===8&&o%r===4)&&(c=e[c>>>24]<<24^e[c>>16&255]<<16^e[c>>8&255]<<8^e[c&255],o%r===0&&(c=c<<8^c>>>24^l<<24,l=l<<1^(l>>7)*283)),a[o]=a[o-r]^c}for(let c=0;o;c++,o--){let p=a[c&3?o:o-4];o<=4||c<4?s[c]=p:s[c]=i[0][e[p>>>24]]^i[1][e[p>>16&255]]^i[2][e[p>>8&255]]^i[3][e[p&255]]}}encrypt(n){return this._crypt(n,0)}decrypt(n){return this._crypt(n,1)}_precompute(){let n=this._tables[0],t=this._tables[1],e=n[4],i=t[4],r=[],o=[],a,s,l,c;for(let p=0;p<256;p++)o[(r[p]=p<<1^(p>>7)*283)^p]=p;for(let p=a=0;!e[p];p^=s||1,a=o[a]||1){let m=a^a<<1^a<<2^a<<3^a<<4;m=m>>8^m&255^99,e[p]=m,i[m]=p,c=r[l=r[s=r[p]]];let y=c*16843009^l*65537^s*257^p*16843008,E=r[m]*257^m*16843008;for(let v=0;v<4;v++)n[v][p]=E=E<<24^E>>>8,t[v][m]=y=y<<24^y>>>8}for(let p=0;p<5;p++)n[p]=n[p].slice(0),t[p]=t[p].slice(0)}_crypt(n,t){if(n.length!==4)throw new Error("invalid aes block size");let e=this._key[t],i=e.length/4-2,r=[0,0,0,0],o=this._tables[t],a=o[0],s=o[1],l=o[2],c=o[3],p=o[4],m=n[0]^e[0],y=n[t?3:1]^e[1],E=n[2]^e[2],v=n[t?1:3]^e[3],d=4,f,g,w;for(let T=0;T>>24]^s[y>>16&255]^l[E>>8&255]^c[v&255]^e[d],g=a[y>>>24]^s[E>>16&255]^l[v>>8&255]^c[m&255]^e[d+1],w=a[E>>>24]^s[v>>16&255]^l[m>>8&255]^c[y&255]^e[d+2],v=a[v>>>24]^s[m>>16&255]^l[y>>8&255]^c[E&255]^e[d+3],d+=4,m=f,y=g,E=w;for(let T=0;T<4;T++)r[t?3&-T:T]=p[m>>>24]<<24^p[y>>16&255]<<16^p[E>>8&255]<<8^p[v&255]^e[d++],f=m,m=y,y=E,E=v,v=f;return r}};var Ls={getRandomValues(n){let t=new Uint32Array(n.buffer),e=i=>{let r=987654321,o=4294967295;return function(){return r=36969*(r&65535)+(r>>16)&o,i=18e3*(i&65535)+(i>>16)&o,(((r<<16)+i&o)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i=0,r;i>24&255)===255){let t=n>>16&255,e=n>>8&255,i=n&255;t===255?(t=0,e===255?(e=0,i===255?i=0:++i):++e):++t,n=0,n+=t<<16,n+=e<<8,n+=i}else n+=1<<24;return n}incCounter(n){(n[0]=this.incWord(n[0]))===0&&(n[1]=this.incWord(n[1]))}calculate(n,t,e){let i;if(!(i=t.length))return[];let r=Te.bitLength(t);for(let o=0;o>5)+1<<2,o,a,s,l,c,p=new ArrayBuffer(r),m=new DataView(p),y=0,E=Te;for(t=jn.bytes.toBits(t),c=1;y<(r||1);c++){for(o=a=n.encrypt(E.concat(t,[c])),s=1;sr&&(n=new e().update(n).finalize());for(let o=0;othis.resolveReady=o),password:t,signed:e,strength:i-1,pending:new Uint8Array})},async transform(o,a){let s=this,{password:l,strength:c,resolveReady:p,ready:m}=s;l?(await Vd(s,c,l,Fe(o,0,qn[c]+2)),o=Fe(o,qn[c]+2),r?a.error(new Error(pt)):p()):await m;let y=new Uint8Array(o.length-Nt-(o.length-Nt)%mn);a.enqueue(Hs(s,o,y,0,Nt,!0))},async flush(o){let{signed:a,ctr:s,hmac:l,pending:c,ready:p}=this;await p;let m=Fe(c,0,c.length-Nt),y=Fe(c,c.length-Nt),E=new Uint8Array;if(m.length){let v=Zn(Je,m);l.update(v);let d=s.update(v);E=Wn(Je,d)}if(a){let v=Fe(Wn(Je,l.digest()),0,Nt);for(let d=0;dthis.resolveReady=r),password:t,strength:e-1,pending:new Uint8Array})},async transform(r,o){let a=this,{password:s,strength:l,resolveReady:c,ready:p}=a,m=new Uint8Array;s?(m=await Kd(a,l,s),c()):await p;let y=new Uint8Array(m.length+r.length-r.length%mn);y.set(m,0),o.enqueue(Hs(a,r,y,m.length,0))},async flush(r){let{ctr:o,hmac:a,pending:s,ready:l}=this;await l;let c=new Uint8Array;if(s.length){let p=o.update(Zn(Je,s));a.update(p),c=Wn(Je,p)}i.signature=Wn(Je,a.digest()).slice(0,Nt),r.enqueue(no(c,i.signature))}}),i=this}};function Hs(n,t,e,i,r,o){let{ctr:a,hmac:s,pending:l}=n,c=t.length-r;l.length&&(t=no(l,t),e=Qd(e,c-c%mn));let p;for(p=0;p<=c-mn;p+=mn){let m=Zn(Je,Fe(t,p,p+mn));o&&s.update(m);let y=a.update(m);o||s.update(y),e.set(Wn(Je,y),p+i)}return n.pending=Fe(t,p),e}async function Vd(n,t,e,i){let r=await qs(n,t,e,Fe(i,0,qn[t])),o=Fe(i,qn[t]);if(r[0]!=o[0]||r[1]!=o[1])throw new Error(kt)}async function Kd(n,t,e){let i=Si(new Uint8Array(qn[t])),r=await qs(n,t,e,i);return no(i,r)}async function qs(n,t,e,i){n.password=null;let r=Is(e),o=await Xd(Ud,r,qd,!1,Wd),a=await Jd(Object.assign({salt:i},to),o,8*(Hn[t]*2+2)),s=new Uint8Array(a),l=Zn(Je,Fe(s,0,Hn[t])),c=Zn(Je,Fe(s,Hn[t],Hn[t]*2)),p=Fe(s,Hn[t]*2);return Object.assign(n,{keys:{key:l,authentication:c,passwordVerification:p},ctr:new zd(new Yd(l),Array.from(Zd)),hmac:new Gd(c)}),p}async function Xd(n,t,e,i,r){if(Ps)try{return await Yn.importKey(n,t,e,i,r)}catch(o){return Ps=!1,At.importKey(t)}else return At.importKey(t)}async function Jd(n,t,e){if(Ms)try{return await Yn.deriveBits(n,t,e)}catch(i){return Ms=!1,At.pbkdf2(t,n.salt,to.iterations,e)}else return At.pbkdf2(t,n.salt,to.iterations,e)}function no(n,t){let e=n;return n.length+t.length&&(e=new Uint8Array(n.length+t.length),e.set(n,0),e.set(t,n.length)),e}function Qd(n,t){if(t&&t>n.length){let e=n;n=new Uint8Array(t),n.set(e,0)}return n}function Fe(n,t,e){return n.subarray(t,e)}function Wn(n,t){return n.fromBits(t)}function Zn(n,t){return n.toBits(t)}var hn=12,Ci=class extends TransformStream{constructor({password:t,passwordVerification:e,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),zs(this,t)},transform(r,o){let a=this;if(a.password){let s=Ws(a,r.subarray(0,hn));if(a.password=null,s[hn-1]!=a.passwordVerification)throw new Error(kt);r=r.subarray(hn)}i?o.error(new Error(pt)):o.enqueue(Ws(a,r))}})}},Ii=class extends TransformStream{constructor({password:t,passwordVerification:e}){super({start(){Object.assign(this,{password:t,passwordVerification:e}),zs(this,t)},transform(i,r){let o=this,a,s;if(o.password){o.password=null;let l=Si(new Uint8Array(hn));l[hn-1]=o.passwordVerification,a=new Uint8Array(i.length+l.length),a.set(Zs(o,l),0),s=hn}else a=new Uint8Array(i.length),s=0;a.set(Zs(o,i),s),r.enqueue(a)}})}};function Ws(n,t){let e=new Uint8Array(t.length);for(let i=0;i>>24]),r=~n.crcKey2.get(),n.keys=[e,i,r]}function Gs(n){let t=n.keys[2]|2;return Vs(Math.imul(t,t^1)>>>8)}function Vs(n){return n&255}function Ys(n){return n&4294967295}var Ks="deflate-raw",Fi=class extends TransformStream{constructor(t,{chunkSize:e,CompressionStream:i,CompressionStreamNative:r}){super({});let{compressed:o,encrypted:a,useCompressionStream:s,zipCrypto:l,signed:c,level:p}=t,m=this,y,E,v=Xs(super.readable);(!a||l)&&c&&(y=new Un,v=Qe(v,y)),o&&(v=Qs(v,s,{level:p,chunkSize:e},r,i)),a&&(l?v=Qe(v,new Ii(t)):(E=new Oi(t),v=Qe(v,E))),Js(m,v,async()=>{let d;a&&!l&&(d=E.signature),(!a||l)&&c&&(d=new DataView(y.value.buffer).getUint32(0)),m.signature=d})}},Li=class extends TransformStream{constructor(t,{chunkSize:e,DecompressionStream:i,DecompressionStreamNative:r}){super({});let{zipCrypto:o,encrypted:a,signed:s,signature:l,compressed:c,useCompressionStream:p}=t,m,y,E=Xs(super.readable);a&&(o?E=Qe(E,new Ci(t)):(y=new Ri(t),E=Qe(E,y))),c&&(E=Qs(E,p,{chunkSize:e},r,i)),(!a||o)&&s&&(m=new Un,E=Qe(E,m)),Js(this,E,async()=>{if((!a||o)&&s){let v=new DataView(m.value.buffer);if(l!=v.getUint32(0,!1))throw new Error(Yt)}})}};function Xs(n){return Qe(n,new TransformStream({transform(t,e){t&&t.length&&e.enqueue(t)}}))}function Js(n,t,e){t=Qe(t,new TransformStream({flush:e})),Object.defineProperty(n,"readable",{get(){return t}})}function Qs(n,t,e,i,r){try{let o=t&&i?i:r;n=Qe(n,new o(Ks,e))}catch(o){if(t)n=Qe(n,new r(Ks,e));else throw o}return n}function Qe(n,t){return n.pipeThrough(t)}var el="message",tl="start",nl="pull",ro="data",il="ack",rl="close",ol="deflate",Mi="inflate";var Pi=class extends TransformStream{constructor(t,e){super({});let i=this,{codecType:r}=t,o;r.startsWith(ol)?o=Fi:r.startsWith(Mi)&&(o=Li);let a=0,s=new o(t,e),l=super.readable,c=new TransformStream({transform(p,m){p&&p.length&&(a+=p.length,m.enqueue(p))},flush(){let{signature:p}=s;Object.assign(i,{signature:p,size:a})}});Object.defineProperty(i,"readable",{get(){return l.pipeThrough(s).pipeThrough(c)}})}};var em=typeof Worker!=dn;var gn=class{constructor(t,{readable:e,writable:i},{options:r,config:o,streamOptions:a,useWebWorkers:s,transferStreams:l,scripts:c},p){let{signal:m}=a;return Object.assign(t,{busy:!0,readable:e.pipeThrough(new ao(e,a,o),{signal:m}),writable:i,options:Object.assign({},r),scripts:c,transferStreams:l,terminate(){let{worker:y,busy:E}=t;y&&!E&&(y.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,p(t)}}),(s&&em?nm:tm)(t,o)}},ao=class extends TransformStream{constructor(t,{onstart:e,onprogress:i,size:r,onend:o},{chunkSize:a}){let s=0;super({start(){e&&oo(e,r)},async transform(l,c){s+=l.length,i&&await oo(i,s,r),c.enqueue(l)},flush(){t.size=s,o&&oo(o,s)}},{highWaterMark:1,size:()=>a})}};async function oo(n,...t){try{await n(...t)}catch(e){}}function tm(n,t){return{run:()=>im(n,t)}}function nm(n,{baseURL:t,chunkSize:e}){return n.interface||Object.assign(n,{worker:am(n.scripts[0],t,n),interface:{run:()=>rm(n,{chunkSize:e})}}),n.interface}async function im({options:n,readable:t,writable:e,onTaskFinished:i},r){let o=new Pi(n,r);try{await t.pipeThrough(o).pipeTo(e,{preventClose:!0,preventAbort:!0});let{signature:a,size:s}=o;return{signature:a,size:s}}finally{i()}}async function rm(n,t){let e,i,r=new Promise((y,E)=>{e=y,i=E});Object.assign(n,{reader:null,writer:null,resolveResult:e,rejectResult:i,result:r});let{readable:o,options:a,scripts:s}=n,{writable:l,closed:c}=om(n.writable);so({type:tl,scripts:s.slice(1),options:a,config:t,readable:o,writable:l},n)||Object.assign(n,{reader:o.getReader(),writer:l.getWriter()});let m=await r;try{await l.getWriter().close()}catch(y){}return await c,m}function om(n){let t=n.getWriter(),e,i=new Promise(o=>e=o);return{writable:new WritableStream({async write(o){await t.ready,await t.write(o)},close(){t.releaseLock(),e()},abort(o){return t.abort(o)}}),closed:i}}var al=!0,sl=!0;function am(n,t,e){let i={type:"module"},r,o;typeof n==ki&&(n=n());try{r=new URL(n,t)}catch(a){r=n}if(al)try{o=new Worker(r)}catch(a){al=!1,o=new Worker(r,i)}else o=new Worker(r,i);return o.addEventListener(el,a=>sm(a,e)),o}function so(n,{worker:t,writer:e,onTaskFinished:i,transferStreams:r}){try{let{value:o,readable:a,writable:s}=n,l=[];if(o&&(n.value=o.buffer,l.push(n.value)),r&&sl?(a&&l.push(a),s&&l.push(s)):n.readable=n.writable=null,l.length)try{return t.postMessage(n,l),!0}catch(c){sl=!1,n.readable=n.writable=null,t.postMessage(n)}else t.postMessage(n)}catch(o){throw e&&e.releaseLock(),i(),o}}async function sm({data:n},t){let{type:e,value:i,messageId:r,result:o,error:a}=n,{reader:s,writer:l,resolveResult:c,rejectResult:p,onTaskFinished:m}=t;try{if(a){let{message:E,stack:v,code:d,name:f}=a,g=new Error(E);Object.assign(g,{stack:v,code:d,name:f}),y(g)}else{if(e==nl){let{value:E,done:v}=await s.read();so({type:ro,value:E,done:v,messageId:r},t)}e==ro&&(await l.ready,await l.write(new Uint8Array(i)),so({type:il,messageId:r},t)),e==rl&&y(null,o)}}catch(E){y(E)}function y(E,v){E?p(E):c(v),l&&l.releaseLock(),m()}}var zt=[],lo=[];var ll=0;async function pl(n,t){let{options:e,config:i}=t,{transferStreams:r,useWebWorkers:o,useCompressionStream:a,codecType:s,compressed:l,signed:c,encrypted:p}=e,{workerScripts:m,maxWorkers:y,terminateWorkerTimeout:E}=i;t.transferStreams=r||r===_e;let v=!l&&!c&&!p&&!t.transferStreams;t.useWebWorkers=!v&&(o||o===_e&&i.useWebWorkers),t.scripts=t.useWebWorkers&&m?m[s]:[],e.useCompressionStream=a||a===_e&&i.useCompressionStream;let d,f=zt.find(w=>!w.busy);if(f)cl(f),d=new gn(f,n,t,g);else if(zt.lengthlo.push({resolve:w,stream:n,workerOptions:t}));return d.run();function g(w){if(lo.length){let[{resolve:T,stream:A,workerOptions:D}]=lo.splice(0,1);T(new gn(w,A,D,g))}else w.worker?(cl(w),Number.isFinite(E)&&E>=0&&(w.terminateTimeout=setTimeout(()=>{zt=zt.filter(T=>T!=w),w.terminate()},E))):zt=zt.filter(T=>T!=w)}}function cl(n){let{terminateTimeout:t}=n;t&&(clearTimeout(t),n.terminateTimeout=null)}var lm="Writer iterator completed too soon";var cm="Content-Type";var pm=64*1024,ul="writable",zn=class{constructor(){this.size=0}init(){this.initialized=!0}},yn=class extends zn{get readable(){let t=this,{chunkSize:e=pm}=t,i=new ReadableStream({start(){this.chunkOffset=0},async pull(r){let{offset:o=0,size:a,diskNumberStart:s}=i,{chunkOffset:l}=this;r.enqueue(await be(t,o+l,Math.min(e,a-l),s)),l+e>a?r.close():this.chunkOffset+=e}});return i}};var St=class extends yn{constructor(t){super(),Object.assign(this,{blob:t,size:t.size})}async readUint8Array(t,e){let i=this,r=t+e,a=await(t||re&&(a=a.slice(t,r)),new Uint8Array(a)}},Gn=class extends zn{constructor(t){super();let e=this,i=new TransformStream,r=[];t&&r.push([cm,t]),Object.defineProperty(e,ul,{get(){return i.writable}}),e.blob=new Response(i.readable,{headers:r}).blob()}getData(){return this.blob}};var $i=class extends Gn{constructor(t){super(t),Object.assign(this,{encoding:t,utf8:!t||t.toLowerCase()=="utf-8"})}async getData(){let{encoding:t,utf8:e}=this,i=await super.getData();if(i.text&&e)return i.text();{let r=new FileReader;return new Promise((o,a)=>{Object.assign(r,{onload:({target:s})=>o(s.result),onerror:()=>a(r.error)}),r.readAsText(i,t)})}}};var co=class extends yn{constructor(t){super(),this.readers=t}async init(){let t=this,{readers:e}=t;t.lastDiskNumber=0,t.lastDiskOffset=0,await Promise.all(e.map(async(i,r)=>{await i.init(),r!=e.length-1&&(t.lastDiskOffset+=i.size),t.size+=i.size})),super.init()}async readUint8Array(t,e,i=0){let r=this,{readers:o}=this,a,s=i;s==-1&&(s=o.length-1);let l=t;for(;l>=o[s].size;)l-=o[s].size,s++;let c=o[s],p=c.size;if(l+e<=p)a=await be(c,l,e);else{let m=p-l;a=new Uint8Array(e),a.set(await be(c,l,m)),a.set(await r.readUint8Array(t+m,e-m,i),m)}return r.lastDiskNumber=Math.max(s,r.lastDiskNumber),a}},Bi=class extends zn{constructor(t,e=4294967295){super();let i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});let r,o,a,s=new WritableStream({async write(p){let{availableSize:m}=i;if(a)p.length>=m?(await l(p.slice(0,m)),await c(),i.diskOffset+=r.size,i.diskNumber++,a=null,await this.write(p.slice(m))):await l(p);else{let{value:y,done:E}=await t.next();if(E&&!y)throw new Error(lm);r=y,r.size=0,r.maxSize&&(i.maxSize=r.maxSize),i.availableSize=i.maxSize,await Vn(r),o=y.writable,a=o.getWriter(),await this.write(p)}},async close(){await a.ready,await c()}});Object.defineProperty(i,ul,{get(){return s}});async function l(p){let m=p.length;m&&(await a.ready,await a.write(p),r.size+=m,i.size+=m,i.availableSize-=m)}async function c(){o.size=r.size,await a.close()}}};async function Vn(n,t){n.init&&!n.initialized&&await n.init(t)}function fl(n){return Array.isArray(n)&&(n=new co(n)),n instanceof ReadableStream&&(n={readable:n}),n}function dl(n){n.writable===_e&&typeof n.next==ki&&(n=new Bi(n)),n instanceof WritableStream&&(n={writable:n});let{writable:t}=n;return t.size===_e&&(t.size=0),n instanceof Bi||Object.assign(n,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),n}function be(n,t,e,i){return n.readUint8Array(t,e,i)}var ml="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0 ".split(""),um=ml.length==256;function hl(n){if(um){let t="";for(let e=0;ethis[e]=t[e])}};var To="File format is not recognized",Cm="End of central directory not found",Im="End of Zip64 central directory not found",Fm="End of Zip64 central directory locator not found",Lm="Central directory header not found",Pm="Local file header not found",Mm="Zip64 extra field not found",$m="File contains encrypted entry",Bm="Encryption method not supported",Tl="Compression method not supported",Al="Split zip file",kl="utf-8",Nl="cp437",Um=[[ho,4294967295],[go,4294967295],[yo,4294967295],[ji,65535]],jm={[65535]:{getValue:ae,bytes:4},[4294967295]:{getValue:qi,bytes:8}},Vt=class{constructor(t,e={}){Object.assign(this,{reader:fl(t),options:e,config:Jr()})}async*getEntriesGenerator(t={}){let e=this,{reader:i}=e,{config:r}=e;if(await Vn(i),(i.size===_e||!i.readUint8Array)&&(i=new St(await new Response(i.readable).blob()),await Vn(i)),i.size<22)throw new Error(To);i.chunkSize=Ds(r);let o=await Ym(i,101010256,i.size,22,65535*16);if(!o){let O=await be(i,0,4),R=he(O);throw ae(R)==134695760?new Error(Al):new Error(Cm)}let a=he(o),s=ae(a,12),l=ae(a,16),c=o.offset,p=me(a,20),m=c+22+p,y=me(a,4),E=i.lastDiskNumber||0,v=me(a,6),d=me(a,8),f=0,g=0;if(l==4294967295||s==4294967295||d==65535||v==65535){let O=await be(i,o.offset-20,20),R=he(O);if(ae(R,0)!=117853008)throw new Error(Im);l=qi(R,8);let M=await be(i,l,56,-1),P=he(M),H=o.offset-20-56;if(ae(P,0)!=101075792&&l!=H){let Z=l;l=H,f=l-Z,M=await be(i,l,56,-1),P=he(M)}if(ae(P,0)!=101075792)throw new Error(Fm);y==65535&&(y=ae(P,16)),v==65535&&(v=ae(P,20)),d==65535&&(d=qi(P,32)),s==4294967295&&(s=qi(P,40)),l-=s}if(E!=y)throw new Error(Al);if(l<0||l>=i.size)throw new Error(To);let w=0,T=await be(i,l,s,v),A=he(T);if(s){let O=o.offset-s;if(ae(A,w)!=33639248&&l!=O){let R=l;l=O,f=l-R,T=await be(i,l,s,v),A=he(T)}}let D=o.offset-l-(i.lastDiskOffset||0);if(s!=D&&D>=0&&(s=D,T=await be(i,l,s,v),A=he(T)),l<0||l>=i.size)throw new Error(To);let _=Le(e,t,"filenameEncoding"),S=Le(e,t,"commentEncoding");for(let O=0;OR.getData(k,N,I),w=U;let{onprogress:b}=t;if(b)try{await b(O+1,d,new Kn(R))}catch(k){}yield N}let x=Le(e,t,"extractPrependedData"),C=Le(e,t,"extractAppendedData");return x&&(e.prependedData=g>0?await be(i,0,g):new Uint8Array),e.comment=p?await be(i,c+22,p):new Uint8Array,C&&(e.appendedData=m>>8&255:y>>>24&255),signature:y,compressed:c!=0,encrypted:A,useWebWorkers:Le(r,i,"useWebWorkers"),useCompressionStream:Le(r,i,"useCompressionStream"),transferStreams:Le(r,i,"transferStreams"),checkPasswordOnly:O},config:p,streamOptions:{signal:C,size:S,onstart:M,onprogress:P,onend:H}},F=0;try{({outputSize:F}=await pl({readable:x,writable:R},Z))}catch(ee){if(!O||ee.message!=pt)throw ee}finally{let ee=Le(r,i,"preventClose");R.size+=F,!ee&&!R.locked&&await R.getWriter().close()}return O?void 0:t.getData?t.getData():R}};function Rl(n,t,e){let i=n.rawBitFlag=me(t,e+2),r=(i&1)==1,o=ae(t,e+6);Object.assign(n,{encrypted:r,version:me(t,e),bitFlag:{level:(i&6)>>1,dataDescriptor:(i&8)==8,languageEncodingFlag:(i&2048)==2048},rawLastModDate:o,lastModDate:zm(o),filenameLength:me(t,e+22),extraFieldLength:me(t,e+24)})}async function Ol(n,t,e,i){let{rawExtraField:r}=t,o=t.extraField=new Map,a=he(new Uint8Array(r)),s=0;try{for(;st[r]==o);for(let r=0,o=0;r{if(n.data.length>=a+4){let c=ae(e,a);t[s]=n[s]=new Date(c*1e3);let p=o[l];n[p]=c}a+=4})}async function Ym(n,t,e,i,r){let o=new Uint8Array(4),a=he(o);Gm(a,0,t);let s=i+r;return await l(i)||await l(Math.min(s,e));async function l(c){let p=e-c,m=await be(n,p,c);for(let y=m.length-i;y>=0;y--)if(m[y]==o[0]&&m[y+1]==o[1]&&m[y+2]==o[2]&&m[y+3]==o[3])return{offset:p+y,buffer:m.slice(y,y+i).buffer}}}function Le(n,t,e){return t[e]===_e?n.options[e]:t[e]}function zm(n){let t=(n&4294901760)>>16,e=n&65535;try{return new Date(1980+((t&65024)>>9),((t&480)>>5)-1,t&31,(e&63488)>>11,(e&2016)>>5,(e&31)*2,0)}catch(i){}}function Ao(n){return new Date(Number(n/BigInt(1e4)-BigInt(116444736e5)))}function bn(n,t){return n.getUint8(t)}function me(n,t){return n.getUint16(t,!0)}function ae(n,t){return n.getUint32(t,!0)}function qi(n,t){return Number(n.getBigUint64(t,!0))}function Gm(n,t,e){n.setUint32(t,e,!0)}function he(n){return new DataView(n.buffer)}Ni({Inflate:Ss});var Kt=require("obsidian");function Dl(n){let t=()=>URL.createObjectURL(new Blob([`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){let e;const t=new S;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.U=new n(t.K[0])}reset(){const e=this;e.U=new e.M(e.K[0]),e.N=!1}update(e){this.N=!0,this.U.update(e)}digest(){const e=this,t=e.U.D(),n=new e.M(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues,V="Invalid password",P="Invalid signature",R="zipjs-abort-check-password";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:"PBKDF2"},K=t.assign({hash:{name:"HMAC"}},M),U=t.assign({iterations:1e3,hash:{name:"SHA-1"}},M),N=["deriveBits"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H="undefined",L="function",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return I.importKey(t);try{return await q.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,K,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,U.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,U.iterations,n)}})(t.assign({salt:o},U),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me="deflate-raw";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||(w=new z,d=ze(d,w)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new z,d=ze(d,w)),ve(this,d,(async()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce="data";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=be:s.startsWith("inflate")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:"pull",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.getWriter().close()}catch(e){}const{signature:a,size:l}=f;Ve({type:"close",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ke(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ue(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ke.ge=[0,1,2,3,4,5,6,7].concat(...Be([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ke.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Ke.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Ke.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ke.ze=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ke.Ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ke.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ue.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ue.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ue.Ee=new Ue(Ue.Ae,Ke.ze,257,286,15),Ue.Me=new Ue(Ue.Be,Ke.Ce,0,30,15),Ue.Ke=new Ue(null,Ke.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,K;const U=new Ke,N=new Ke,O=new Ke;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ue[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,K)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,K),o--),Y(16,K),X(o-3,2)):o>10?(Y(18,K),X(o-11,7)):(Y(17,K),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ke.ge[n]+256+1)]++,M[2*Ke.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ke.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ue.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.ne(e),N.ne(e),o=(()=>{let t;for(G(E,U.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===K[2*Ke._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ue.Ae,Ue.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(K[2*Ke._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(U.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],K=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,U.re=E,U.ie=Ue.Ee,N.re=M,N.ie=Ue.Me,O.re=K,O.ie=Ue.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ue=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Ue.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ue.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],tt=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],nt=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],rt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],st=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],it=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++kn[++A];)y-=n[A];if(D=1<1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.lengthc;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le="oversubscribed dynamic bit lengths tree":a!=Ze&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le="oversubscribed distance tree":h==Ze?(w.Le="incomplete distance tree",h=Ye):-4!=h&&(w.Le="empty distance tree with lengths",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le="need dictionary",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt}; +`],{type:"text/javascript"}));n({workerScripts:{inflate:[t],deflate:[t]}})}Dl(Ni);var K=Kt.Platform.isDesktopApp?window.require("node:original-fs"):null,Pe=Kt.Platform.isDesktopApp?K.promises:null,Xt=Kt.Platform.isDesktopApp?window.require("node:os"):null,q=Kt.Platform.isDesktopApp?window.require("node:path"):null,Xn=Kt.Platform.isDesktopApp?window.require("node:url"):null,Cl=Kt.Platform.isDesktopApp?window.require("node:zlib"):null;function Zi(n,t=0,e=n.byteLength){return n.buffer.slice(n.byteOffset+t,n.byteOffset+t+e)}var Me=class{constructor(t){this.type="file";this.filepath=t;let e=this.name=q.basename(t);this.fullpath=e;let i=q.extname(e);this.extension=i.substring(1).toLowerCase(),this.basename=q.basename(e,i)}async readText(){return Pe.readFile(this.filepath,"utf8")}async read(){let t=await Pe.readFile(this.filepath);return Zi(t)}async readZip(t){let e=null;try{e=await Pe.open(this.filepath,"r");let i=await e.stat();return await t(new Vt(new No(e,i.size)))}finally{await(e==null?void 0:e.close())}}createReadStream(){return K.createReadStream(this.filepath)}toString(){return this.filepath}},ut=class{constructor(t){this.type="folder";this.filepath=t,this.name=q.basename(t)}async list(){let{filepath:t}=this,e=await Pe.readdir(t,{withFileTypes:!0}),i=[];for(let r of e)r.isFile()?i.push(new Me(q.join(t,r.name))):r.isDirectory()&&i.push(new ut(q.join(t,r.name)));return i}toString(){return this.filepath}},Wi=class{constructor(t){this.type="file";this.file=t;let e=this.name=t.name;this.fullpath=e;let{basename:i,extension:r}=oe(e);this.basename=i,this.extension=r}readText(){let{file:t}=this;return t.text?t.text():new Promise((e,i)=>{let r=new FileReader;r.addEventListener("load",()=>e(r.result)),r.addEventListener("error",i),r.readAsText(this.file)})}async read(){let{file:t}=this;return t.arrayBuffer?t.arrayBuffer():new Promise((e,i)=>{let r=new FileReader;r.addEventListener("load",()=>e(r.result)),r.addEventListener("error",i),r.readAsArrayBuffer(this.file)})}async readZip(t){return t(new Vt(new St(this.file)))}toString(){return this.file.toString()}};async function So(n,t){let e=[];for(let i of n)try{i.type==="folder"?e.push(...await So(await i.list(),t)):i.type==="file"&&(!t||t(i))&&e.push(i)}catch(r){console.log("Skipping path: ",i.name,r)}return e}function oe(n){let t=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),e=n,i="";t>=0&&(e=n.substring(t+1),i=n.substring(0,t));let[r,o]=Ro(e);return{parent:i,name:e,basename:r,extension:o}}function Ro(n){let t=n.lastIndexOf("."),e=n,i="";return t>0&&(e=n.substring(0,t),i=n.substring(t+1).toLowerCase()),[e,i]}var No=class extends yn{constructor(e,i){super(e);this.fd=e,this.size=i}async readUint8Array(e,i){let r=Buffer.alloc(i),o=await this.fd.read(r,0,i,e);return new Uint8Array(Zi(r,0,o.bytesRead))}};var Il=require("obsidian"),Vm=/[\/\?<>\\:\*\|"]/g,Km=/[\x00-\x1f\x80-\x9f]/g,Xm=/^\.+$/,Jm=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Qm=/[\. ]+$/,eh=/^\./,th=/[\[\]#|^]/g;function Ze(n){return n.replace(Vm,"").replace(Km,"").replace(Xm,"").replace(Jm,"").replace(Qm,"").replace(eh,"").replace(th,"")}function xn(n){let t=[];for(let e=0;ea.setButtonText(i?"Choose files":"Choose file").onClick(async()=>{if(Re.Platform.isDesktopApp){let s=["openFile","dontAddToRecent"];i&&s.push("multiSelections");let l=window.electron.remote.dialog.showOpenDialogSync({title:"Pick files to import",properties:s,filters:[{name:t,extensions:e}]});l&&l.length>0&&(this.files=l.map(c=>new Me(c)),o())}else{let s=createEl("input");s.type="file",s.accept=e.map(l=>"."+l.toLowerCase()).join(","),s.addEventListener("change",()=>{if(!s.files)return;let l=Array.from(s.files);l.length>0&&(this.files=l.map(c=>new Wi(c)).filter(c=>e.contains(c.extension)),o())}),s.click()}}));i&&Re.Platform.isDesktopApp&&r.addButton(a=>a.setButtonText("Choose folders").onClick(async()=>{if(Re.Platform.isDesktopApp){let s=window.electron.remote.dialog.showOpenDialogSync({title:"Pick folders to import",properties:["openDirectory","multiSelections","dontAddToRecent"]});if(s&&s.length>0){r.setDesc("Reading folders...");let l=s.map(c=>new ut(c));this.files=await So(l,c=>e.contains(c.extension)),o()}}}));let o=()=>{let a=document.createDocumentFragment(),s=this.files.length,l=this.files.map(c=>c.name).join(", ");l.length>Fl&&(l=l.substring(0,Fl)+"..."),a.createEl("span",{text:`These ${s} files will be imported: `}),a.createEl("br"),a.createEl("span",{cls:"u-pop",text:l}),r.setDesc(a)}}addOutputLocationSetting(t){this.outputLocation=t,new Re.Setting(this.modal.contentEl).setName("Output folder").setDesc("Choose a folder in the vault to put the imported files. Leave empty to output to vault root.").addText(e=>e.setValue(t).onChange(i=>this.outputLocation=i))}async getOutputFolder(){let{vault:t}=this.app,e=this.outputLocation;e===""&&(e="/");let i=t.getAbstractFileByPath(e);return(i===null||!(i instanceof Re.TFolder))&&(await t.createFolder(e),i=t.getAbstractFileByPath(e)),i instanceof Re.TFolder?i:null}async createFolders(t){let e=t.split("/").map(o=>o.replace(/^\.+/,"")).join("/"),i=(0,Re.normalizePath)(e),r=this.vault.getAbstractFileByPathInsensitive(i);if(r&&r instanceof Re.TFolder)return r;if(await this.vault.createFolder(i),r=this.vault.getAbstractFileByPathInsensitive(i),!(r instanceof Re.TFolder))throw new Error(`Failed to create folder at "${t}"`);return r}async saveAsMarkdownFile(t,e,i){let r=Ze(e);return await this.app.fileManager.createNewMarkdownFile(t,r,i)}};var qp=ns(Ip());var ka=require("obsidian");var Fp=n=>{let e=gr.execSync(`${n} --version`).toString().toString().match(/(\d+)\.(\d+).(\d+)/);return(e==null?void 0:e[1])>3||(e==null?void 0:e[2])>32},Lp=n=>{let t=[];if(!n)return t;let e=[],i=0,r=-1,o={};for(;il>0),n.length-1);a=parseFloat(n.substring(i,s)),i=s}r==-1?e.push(a):(o[e[r]]=a,r++),(n[i]==` +`||e.length{let e=[n[0]],i=[e];for(let r=0;r",")),i.push(...t[r].length?t[r]:[""])):i.push(t[r]),e.push(n[r+1]));return i},$p=n=>new yr(n);var pi=(n,t)=>{let e="SQLITE_ERROR",i=new Error(e+": "+t);return i.code=e,n(i),""},Bp=(...n)=>$p(Pp(...n)),{from:hg}=Array,gg=/'/g,yg=n=>n.toString(16).padStart(2,"0"),bg=n=>`x'${hg(n,yg).join("")}'`,xg=n=>{switch(typeof n){case"string":return"'"+n.replace(gg,"''")+"'";case"number":if(!isFinite(n))return;case"boolean":return+n;case"object":case"undefined":switch(!0){case!n:return"NULL";case n instanceof Date:return"'"+n.toISOString()+"'";case n instanceof Buffer:case n instanceof ArrayBuffer:n=new Uint8Array(n);case n instanceof Uint8Array:case n instanceof Uint8ClampedArray:return bg(n)}}},_a=(n,t)=>{let[e,...i]=Mp(...t),r=[e[0]];for(let a=0;a{},Ag=(n,t,e,i,r,o)=>{let a=[],{stdout:s,stderr:l}=gr.spawn(i,r,o).on("close",p=>{if(c||p!==0){p!==0&&pi(t,"busy DB or query too slow");return}let m=a.join("").trim();if(e==="query")n(m);else{let y=jp(m||"[]");n(e==="get"&&Eg(y)?y.shift():y)}});s.on("data",p=>{a.push(p)});let c=!1;l.on("data",p=>{c=!0,pi(t,"".trim.call(p))})},kg=(n,t,e)=>{let i=Fp(n),r=i?wg:vg,{stdin:o,stdout:a,stderr:s}=gr.spawn(n,t);i?o.write(`.mode json +`):o.write(`.mode quote +.headers on +`),e&&o.write(`.timeout ${e} +`);let l=Promise.resolve();return(c,p,m,y,E)=>{m==="close"?(o.write(`.quit +`),l=null):l&&(l=l.then(()=>new Promise(v=>{let d="",f=T=>{d+=T;let A=!1;for(;d.endsWith(r);)A=!0,d=d.slice(0,-r.length);if(A){for(w();d.startsWith(r);)d=d.slice(r.length);if(m==="query")c(d);else{let D=i?jp(d||"[]"):Lp(d);c(m==="get"?D.shift():D)}}},g=T=>{w(),p(new Error(T))},w=()=>{v(),a.removeListener("data",f),s.removeListener("data",g)};a.on("data",f),s.once("data",g),o.write(`${E[E.length-1]}; +`),o.write(`SELECT '${Na}' as _; +`)})))}},Aa=(n,t,e,i,r)=>(...o)=>new Promise((a,s)=>{let l=_a(s,o);l.length&&(n==="get"&&/^SELECT\s+/i.test(l)&&!/\s+LIMIT\s+\d+$/i.test(l)&&(l+=" LIMIT 1"),e(a,s,n,t,i.concat(l),r))}),Up="";function Sa(n,t={}){n===":memory:"&&(n=Up||(Up=q.join(Xt.tmpdir(),randomUUID())));let e=t.timeout||0,i=t.bin||"sqlite3",r=[n,"-bail"],o={timeout:e};t.readonly&&r.push("-readonly"),e&&r.push("-cmd",".timeout "+e);let a=r.concat("-json"),s=t.exec||(t.persistent?kg(i,r,e):Ag);return{transaction(){let l=[];return _g((...c)=>{l.push(c)},"commit",{value(){return new Promise((c,p)=>{let m=["BEGIN TRANSACTION"];for(let y of l){let E=_a(p,y);if(!E.length)return;m.push(E)}m.push("COMMIT"),s(c,p,"query",i,r.concat(m.join(";")),o)})}})},query:Aa("query",i,s,r,o),get:Aa("get",i,s,a,o),all:Aa("all",i,s,a,o),close:t.persistent?()=>s(null,null,"close"):Tg,raw:Bp}}var Ra="Library/Group Containers/group.com.apple.notes",Hp="NoteStore.sqlite",Ng=978307200,br=class extends ce{constructor(){super(...arguments);this.owners={};this.resolvedAccounts={};this.resolvedFiles={};this.resolvedFolders={};this.multiAccount=!1;this.noteCount=0;this.parsedNotes=0;this.omitFirstLine=!0;this.importTrashed=!1;this.includeHandwriting=!1;this.trashFolders=[]}init(){if(!st.Platform.isMacOS||!st.Platform.isDesktop){this.modal.contentEl.createEl("p",{text:"Due to platform limitations, Apple Notes cannot be exported from this device. Open your vault on a Mac to export from Apple Notes."}),this.notAvailable=!0;return}this.addOutputLocationSetting("Apple Notes"),new st.Setting(this.modal.contentEl).setName("Import recently deleted notes").setDesc('Import notes in the "Recently Deleted" folder. Unlike in Apple Notes, they will not be automatically removed after a set amount of time.').addToggle(e=>e.setValue(!1).onChange(async i=>this.importTrashed=i)),new st.Setting(this.modal.contentEl).setName("Omit first line").setDesc("Don't include the first line in the text, since Apple Notes uses it as the title. It will still be used as the note name.").addToggle(e=>e.setValue(!0).onChange(async i=>this.omitFirstLine=i)),new st.Setting(this.modal.contentEl).setName("Include handwriting text").setDesc("When Apple Notes has detected handwriting in drawings, include it as text before the drawing.").addToggle(e=>e.setValue(!1).onChange(async i=>this.includeHandwriting=i))}async getNotesDatabase(){let e=q.join(Xt.homedir(),Ra),i=window.electron.remote.dialog.showOpenDialogSync({defaultPath:e,properties:["openDirectory"],message:'Select the "group.com.apple.notes" folder to allow Obsidian to read Apple Notes data.'});if(!(i!=null&&i.includes(e)))return new st.Notice("Data import failed. Ensure you have selected the correct Apple Notes data folder."),null;let r=q.join(e,Hp),o=q.join(Xt.tmpdir(),Hp);return await Pe.copyFile(r,o),await Pe.copyFile(r+"-shm",o+"-shm"),await Pe.copyFile(r+"-wal",o+"-wal"),new Sa(o,{readonly:!0,persistent:!0})}async import(e){if(this.ctx=e,this.protobufRoot=qp.Root.fromJSON(as),this.rootFolder=await this.getOutputFolder(),!this.rootFolder){new st.Notice("Please select a location to export to.");return}if(this.database=await this.getNotesDatabase(),!this.database)return;this.keys=Object.fromEntries((await this.database.all`SELECT z_ent, z_name FROM z_primarykey`).map(a=>[a.Z_NAME,a.Z_ENT]));let i=await this.database.all` + SELECT z_pk FROM ziccloudsyncingobject WHERE z_ent = ${this.keys.ICAccount} + `,r=await this.database.all` + SELECT z_pk, ztitle2 FROM ziccloudsyncingobject WHERE z_ent = ${this.keys.ICFolder} + `;for(let a of i)await this.resolveAccount(a.Z_PK);for(let a of r)try{await this.resolveFolder(a.Z_PK)}catch(s){this.ctx.reportFailed(a.ZTITLE2,s==null?void 0:s.message),console.error(s)}let o=await this.database.all` + SELECT + z_pk, zfolder, ztitle1 FROM ziccloudsyncingobject + WHERE + z_ent = ${this.keys.ICNote} + AND ztitle1 IS NOT NULL + AND zfolder NOT IN (${this.trashFolders}) + `;this.noteCount=o.length;for(let a of o)try{await this.resolveNote(a.Z_PK)}catch(s){this.ctx.reportFailed(a.ZTITLE1,s==null?void 0:s.message),console.error(s)}this.database.close()}async resolveAccount(e){!this.multiAccount&&Object.keys(this.resolvedAccounts).length&&(this.multiAccount=!0);let i=await this.database.get` + SELECT zname, zidentifier FROM ziccloudsyncingobject + WHERE z_ent = ${this.keys.ICAccount} AND z_pk = ${e} + `;this.resolvedAccounts[e]={name:i.ZNAME,uuid:i.ZIDENTIFIER,path:q.join(Xt.homedir(),Ra,"Accounts",i.ZIDENTIFIER)}}async resolveFolder(e){var a;if(e in this.resolvedFiles)return this.resolvedFolders[e];let i=await this.database.get` + SELECT ztitle2, zparent, zidentifier, zfoldertype, zowner + FROM ziccloudsyncingobject + WHERE z_ent = ${this.keys.ICFolder} AND z_pk = ${e} + `,r;if(i.ZFOLDERTYPE==3)return null;if(!this.importTrashed&&i.ZFOLDERTYPE==1)return this.trashFolders.push(e),null;if(i.ZPARENT!==null)r=((a=await this.resolveFolder(i.ZPARENT))==null?void 0:a.path)+"/";else if(this.multiAccount){let s=this.resolvedAccounts[i.ZOWNER].name;r=`${this.rootFolder.path}/${s}/`}else r=`${this.rootFolder.path}/`;i.ZIDENTIFIER.startsWith("DefaultFolder")||(r+=Ze(i.ZTITLE2));let o=await this.createFolders(r);return this.resolvedFolders[e]=o,this.owners[e]=i.ZOWNER,o}async resolveNote(e){if(e in this.resolvedFiles)return this.resolvedFiles[e];let i=await this.database.get` + SELECT + nd.z_pk, hex(nd.zdata) as zhexdata, zcso.ztitle1, zfolder, + zcreationdate1, zcreationdate2, zcreationdate3, zmodificationdate1, zispasswordprotected + FROM + zicnotedata AS nd, + (SELECT + *, NULL AS zcreationdate3, NULL AS zcreationdate2, + NULL AS zispasswordprotected FROM ziccloudsyncingobject + ) AS zcso + WHERE + zcso.z_pk = nd.znote + AND zcso.z_pk = ${e} + `;if(i.ZISPASSWORDPROTECTED)return this.ctx.reportSkipped(i.ZTITLE1,"note is password protected"),null;let r=this.resolvedFolders[i.ZFOLDER]||this.rootFolder,o=`${i.ZTITLE1}.md`,a=await this.saveAsMarkdownFile(r,o,"");this.ctx.status(`Importing note ${o}`),this.resolvedFiles[e]=a,this.owners[e]=this.owners[i.ZFOLDER];let s=this.decodeData(i.zhexdata,Wt);return this.vault.modify(a,await s.format(),{ctime:this.decodeTime(i.ZCREATIONDATE3||i.ZCREATIONDATE2||i.ZCREATIONDATE1),mtime:this.decodeTime(i.ZMODIFICATIONDATE1)}),this.parsedNotes++,this.ctx.reportProgress(this.parsedNotes,this.noteCount),a}async resolveAttachment(e,i){let r,o,a,s,l;switch(i){case"com.apple.paper.doc.scan":s=await this.database.get` + SELECT + zidentifier, zfallbackpdfgeneration, zcreationdate, zmodificationdate, znote + FROM + (SELECT *, NULL AS zfallbackpdfgeneration FROM ziccloudsyncingobject) + WHERE + z_ent = ${this.keys.ICAttachment} + AND z_pk = ${e} + `,r=q.join("FallbackPDFs",s.ZIDENTIFIER,s.ZFALLBACKPDFGENERATION||"","FallbackPDF.pdf"),o="Scan",a="pdf";break;case"com.apple.notes.gallery":s=await this.database.get` + SELECT + zidentifier, zsizeheight, zsizewidth, zcreationdate, zmodificationdate, znote + FROM ziccloudsyncingobject + WHERE + z_ent = ${this.keys.ICAttachment} + AND z_pk = ${e} + `,r=q.join("Previews",`${s.ZIDENTIFIER}-1-${s.ZSIZEWIDTH}x${s.ZSIZEHEIGHT}-0.jpeg`),o="Scan Page",a="jpg";break;case"com.apple.paper":s=await this.database.get` + SELECT + zidentifier, zfallbackimagegeneration, zcreationdate, zmodificationdate, + znote, zhandwritingsummary + FROM + (SELECT *, NULL AS zfallbackimagegeneration FROM ziccloudsyncingobject) + WHERE + z_ent = ${this.keys.ICAttachment} + AND z_pk = ${e} + `,s.ZFALLBACKIMAGEGENERATION?r=q.join("FallbackImages",s.ZIDENTIFIER,s.ZFALLBACKIMAGEGENERATION,"FallbackImage.png"):r=q.join("FallbackImages",`${s.ZIDENTIFIER}.jpg`),o="Drawing",a="png";break;default:s=await this.database.get` + SELECT + a.zidentifier, a.zfilename, + a.zgeneration1, b.zcreationdate, b.zmodificationdate, b.znote + FROM + (SELECT *, NULL AS zgeneration1 FROM ziccloudsyncingobject) AS a, + ziccloudsyncingobject AS b + WHERE + a.z_ent = ${this.keys.ICMedia} + AND a.z_pk = ${e} + AND a.z_pk = b.zmedia + `,r=q.join("Media",s.ZIDENTIFIER,s.ZGENERATION1||"",s.ZFILENAME),[o,a]=Ro(s.ZFILENAME);break}try{let c=await this.getAttachmentSource(this.resolvedAccounts[this.owners[s.ZNOTE]],r),p=await this.getAttachmentFolder(this.resolvedFiles[s.ZNOTE]),m=this.app.vault.getAvailablePath(`${p}/${o}`,a);l=await this.vault.createBinary(m,c,{ctime:this.decodeTime(s.ZCREATIONDATE),mtime:this.decodeTime(s.ZMODIFICATIONDATE)})}catch(c){return console.error(c),null}return this.resolvedFiles[e]=l,this.ctx.reportAttachmentSuccess(this.resolvedFiles[e].path),l}decodeData(e,i){let r=Cl.gunzipSync(Buffer.from(e,"hex")),o=this.protobufRoot.lookupType(i.protobufType).decode(r);return new i(this,o)}decodeTime(e){return!e||e<1?new Date().getTime():Math.floor((e+Ng)*1e3)}async getAttachmentSource(e,i){try{return await Pe.readFile(q.join(e.path,i))}catch(r){return await Pe.readFile(q.join(Xt.homedir(),Ra,i))}}async getAttachmentFolder(e){if(this.cachedAttachmentPath)return this.cachedAttachmentPath;let i=this.app.vault.getConfig("attachmentFolderPath"),r=oe(await this.app.vault.getAvailablePathForAttachments(e.basename,e.extension,e)).parent;return i.startsWith("./")||(r=q.join(i,`${this.outputLocation} Attachments`),this.cachedAttachmentPath=r),this.createFolders(r),r}};var fi=require("obsidian");var ui=class{constructor(t,e){this.type="file";this.entry=e,this.fullpath=t.fullpath+"/"+e.filename;let{parent:i,name:r,basename:o,extension:a}=oe(e.filename);this.parent=i,this.name=r,this.basename=o,this.extension=a}async readText(){return this.entry.getData(new $i)}async read(){return(await this.entry.getData(new Gn)).arrayBuffer()}get filepath(){return this.entry.filename}get size(){return this.entry.uncompressedSize}get ctime(){return this.entry.creationDate}get mtime(){return this.entry.lastModDate}async readZip(t){return t(new Vt(new St(new Blob([await this.read()]))))}};async function gt(n,t){await n.readZip(async e=>{let r=(await e.getEntries()).filter(o=>!o.directory&&!!o.getData).map(o=>new ui(n,o));return t(e,r)})}var xr=class extends ce{init(){this.addFileChooserSetting("Bear2bk",["bear2bk"]),this.addOutputLocationSetting("Bear")}async import(t){let{files:e}=this;if(e.length===0){new fi.Notice("Please pick at least one file to import.");return}let i=await this.getOutputFolder();if(!i){new fi.Notice("Please select a location to export to.");return}let r=i,o=await this.createFolders(`${i.path}/assets`),a=/!\[\]\(assets\//g,s=await this.createFolders(`${i.path}/archive`),l=await this.createFolders(`${i.path}/trash`);for(let c of e){if(t.isCancelled())return;t.status("Processing "+c.name),await gt(c,async(p,m)=>{let y=await this.collectMetadata(m);for(let E of m){if(t.isCancelled())return;let{fullpath:v,filepath:d,parent:f,name:g,extension:w}=E;if(g!=="info.json"){t.status("Processing "+g);try{if(w==="md"||w==="markdown"){let T=oe(f).basename;t.status("Importing note "+T);let A=await E.readText();A=this.removeMarkdownHeader(T,A),A.match(a)&&(A=A.replace(a,`![](${o.path}/`));let D=(0,fi.normalizePath)(T),_=y[f],S=r;_!=null&&_.archived?S=s:_!=null&&_.trashed&&(S=l);let x=await this.saveAsMarkdownFile(S,D,A);_!=null&&_.ctime&&(_!=null&&_.mtime)&&await this.modifFileTimestamps(_,x),t.reportNoteSuccess(T)}else if(d.match(/\/assets\//g)){t.status("Importing asset "+g);let T=`${o.path}/${g}`;if(this.vault.getAbstractFileByPath(T))t.reportSkipped(v,"asset with filename already exists");else{let D=await E.read();await this.vault.createBinary(T,D),t.reportAttachmentSuccess(v)}}else t.reportSkipped(v,"unknown type of file")}catch(T){t.reportFailed(v,T)}}}})}}async modifFileTimestamps(t,e){let i={ctime:t.ctime,mtime:t.mtime};await this.vault.append(e,"",i)}async collectMetadata(t){let e={};for(let i of t){if(i.name!=="info.json")continue;let r=await i.readText(),a=JSON.parse(r)["net.shinyfrog.bear"],s=Date.parse(a.creationDate),l=Date.parse(a.modificationDate);e[i.parent]={ctime:isNaN(s)?void 0:s,mtime:isNaN(l)?void 0:l,archived:a.archived===1,trashed:a.trashed===1}}return e}removeMarkdownHeader(t,e){if(!e.startsWith("# "))return e;let i=e.indexOf(` +`),r=i>0?e.substring(2,i):e.substring(2);return r=r.trim(),r!==t.trim()&&r!==""?e:i>0?e.substring(i+1):""}};var xi=require("obsidian");var Mf=require("obsidian");var Wp=require("obsidian");var Zp=n=>({...n,created:di(n.created),statusupdated:di(n.statusupdated),updated:di(n.updated),duedate:di(n.duedate),taskflag:n.taskflag==="true",reminderdate:n.reminder?di(n.reminder.reminderdate):void 0,sortweight:n.sortweight}),di=n=>n?(0,Wp.moment)(n,"YYYYMMDDThhmmssZ").toDate():void 0;var Yp=/highlight-(?:text|source)-([a-z0-9]+)/;function Sg(n){n.addRule("highlightedCodeBlock",{filter:function(t){var e=t.firstChild;return t.nodeName==="DIV"&&Yp.test(t.className)&&e&&e.nodeName==="PRE"},replacement:function(t,e,i){var r=e.className||"",o=(r.match(Yp)||[null,""])[1];return` + +`+i.fence+o+` +`+e.firstChild.textContent+` +`+i.fence+` + +`}})}function Rg(n){n.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(t){return"~"+t+"~"}})}var Og=Array.prototype.indexOf,Dg=Array.prototype.every,kn={};kn.tableCell={filter:["th","td"],replacement:function(n,t){return Da(Gp(t))?n:Oa(n,t)}};kn.tableRow={filter:"tr",replacement:function(n,t){let e=Gp(t);if(Da(e))return n;var i="",r={left:":--",right:"--:",center:":-:"};if(Cg(t)){let l=Vp(e);for(var o=0;o=t.childNodes.length?null:t.childNodes[o];var a="---",s=c?(c.getAttribute("align")||"").toLowerCase():"";s&&(a=r[s]||a),c?i+=Oa(a,t.childNodes[o]):i+=Oa(a,null,o)}}return` +`+n+(i?` +`+i:"")}};kn.table={filter:function(n){return n.nodeName==="TABLE"},replacement:function(n,t){if(Da(t))return n;n=n.replace(/\n+/g,` +`);var e=n.trim().split(` +`);e.length>=2&&(e=e[1]);var i=e.indexOf("| ---")===0,r=Vp(t),o="";return r&&!i&&(o="|"+" |".repeat(r)+` +|`+" --- |".repeat(r)),` + +`+o+n+` + +`}};kn.tableSection={filter:["thead","tbody","tfoot"],replacement:function(n){return n}};function Cg(n){var t=n.parentNode;return t.nodeName==="THEAD"||t.firstChild===n&&(t.nodeName==="TABLE"||Ig(t))&&Dg.call(n.childNodes,function(e){return e.nodeName==="TH"})}function Ig(n){var t=n.previousSibling;return n.nodeName==="TBODY"&&(!t||t.nodeName==="THEAD"&&/^\s*$/i.test(t.textContent))}function Oa(n,t=null,e=null){e===null&&(e=Og.call(t.parentNode.childNodes,t));var i=" ";e===0&&(i="| ");let r=n.trim().replace(/\n\r/g,"
").replace(/\n/g,"
");for(r=r.replace(/\|+/g,"\\|");r.length<3;)r+=" ";return t&&(r=Fg(r,t," ")),i+r+" |"}function zp(n){if(!n.childNodes)return!1;for(let t=0;tt&&(t=r)}return t}function Lg(n){n.keep(function(e){return e.nodeName==="TABLE"});for(var t in kn)n.addRule(t,kn[t])}function Pg(n){n.addRule("taskListItems",{filter:function(t){return t.type==="checkbox"&&t.parentNode.nodeName==="LI"},replacement:function(t,e){return(e.checked?"[x]":"[ ]")+" "}})}function Kp(n){n.use([Sg,Rg,Lg,Pg])}var ue=n=>{let t={get(e,i){return e[i]}};return new Proxy(n.attributes,t)};var Xp="\n```\n",Ca=n=>{let t=ue(n),e="-en-codeblock:true";return t.style&&t.style.value.indexOf(e)>=0},Mg=n=>{let t=ue(n),e="padding-left:",i=0;return t.style&&t.style.value.indexOf(e)>=0&&(i=Math.floor(t.style.value.split(e)[1].split("px")[0]/20)),i},Ia=n=>n.replace(/\\(.)/g,"$1"),Jp=(n,t)=>{let e=Mg(t);return n=`${" ".repeat(e)}${n}`,Ca(t)?(n=Ia(n),`${Xp}${n}${Xp}`):t.parentElement&&Ca(t.parentElement)&&t.parentElement.firstElementChild===t?`${n}`:t.parentElement&&Ca(t.parentElement)?` +${n}`:t.isBlock?` +${n} +`:n};var wr="\n```\n",$g="-en-codeblock:true",Bg=/\b(Courier|Mono|Consolas|Console|Inconsolata|Pitch|Monaco|monospace)\b/,Qp=n=>{var o,a;if(n.nodeType!==1)return null;let t=n.childNodes,e=t.length;if(e>1)return"mixed";if(e===1){let s=Qp(t[0]);if(s)return s}let i=ue(n);if(n.tagName==="FONT")return(o=i.face)==null?void 0:o.value;let r=(a=i.style)==null?void 0:a.value;if(r){let s=r.match(/font-family:([^;]+)/);if(s)return s[1]}return null},mi=n=>{var r;let e=(r=ue(n).style)==null?void 0:r.value;if(e&&e.includes($g))return!0;let i=Qp(n);return!!i&&Bg.test(i)},eu=(n,t)=>{if(mi(t)){let e=t.previousSibling,i=e&&e.tagName===t.tagName&&mi(e),r=t.nextSibling,o=r&&r.tagName===t.tagName&&mi(r);return i||o?(n=i?` +${n}`:`${wr}${n}`,n=o?`${n} +`:`${n}${wr}`,n):(n=Ia(n),n.trim()?`${wr}${n}${wr}`:n)}return t.parentElement&&mi(t.parentElement)&&t.parentElement.firstElementChild===t?n:t.parentElement&&mi(t.parentElement)?` +${n}`:t.isBlock?` +${n} +`:n};var qe=n=>t=>t.nodeName===n||t.nodeName.toLowerCase()===n;var tu={filter:qe("IMG"),replacement:(n,t)=>{let e=ue(t);if(!e.src)return"";let i=e.src.value,r=t.width||"",o=t.height||"",a=i;B.sanitizeResourceNameSpaces?a=a.replace(/ /g,B.replacementChar):B.urlEncodeFileNamesAndLinks&&(a=encodeURI(a));let s=r||o?` =${r}x${o}`:"";if(B.keepImageSize)return s=r||o?`|${r||0}x${o||0}`:"",a.startsWith("./")?`![[${a}${s}]]`:`![${s}](${a})`;if(!i.match(/^[a-z]+:/))return`![[${a}]]`;let l=e.src.value.split("/");return`![${l[l.length-1]}](${a})`}};var fe=class{constructor(){this.noteIdNameMap={},this.noteIdNameTOCMap={}}static getInstance(){return fe.instance||(fe.instance=new fe),fe.instance}addItemToMap(t){this.noteIdNameMap[t.url]={...this.noteIdNameMap[t.url],title:t.title,noteName:this.currentNoteName,notebookName:this.currentNotebookName,uniqueEnd:t.uniqueEnd}}addItemToTOCMap(t){this.noteIdNameTOCMap[t.url]={...this.noteIdNameMap[t.url],title:t.title,noteName:this.currentNoteName,notebookName:this.currentNotebookName,uniqueEnd:t.uniqueEnd}}getNoteIdNameMap(){return this.noteIdNameMap}getNoteIdNameTOCMap(){return this.noteIdNameTOCMap}getAllNoteIdNameMap(){return{...this.noteIdNameMap,...this.noteIdNameTOCMap}}getNoteIdNameMapByNoteTitle(t){return Object.values(this.getAllNoteIdNameMap()).filter(e=>e.title===t)}setCurrentNotebookName(t){this.currentNotebookName=t}getCurrentNotebookName(){return this.currentNotebookName}setCurrentNotebookFullpath(t){this.currentNotebookFullpath=t}setCurrentNoteName(t){this.currentNoteName=t}getCurrentNoteName(){return this.currentNoteName}getCurrentNotePath(){return this.currentNotePath}setCurrentNotePath(t){this.currentNotePath=t}getCurrentNotebookFullpath(){return this.currentNotebookFullpath}};var nu=require("obsidian");var Nn=n=>n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var Ug={"application/andrew-inset":"ez","application/applixware":"aw","application/atom+xml":"atom","application/atomcat+xml":"atomcat","application/atomdeleted+xml":"atomdeleted","application/atomsvc+xml":"atomsvc","application/atsc-dwd+xml":"dwd","application/atsc-held+xml":"held","application/atsc-rsat+xml":"rsat","application/bdoc":"bdoc","application/calendar+xml":"xcs","application/ccxml+xml":"ccxml","application/cdfx+xml":"cdfx","application/cdmi-capability":"cdmia","application/cdmi-container":"cdmic","application/cdmi-domain":"cdmid","application/cdmi-object":"cdmio","application/cdmi-queue":"cdmiq","application/cpl+xml":"cpl","application/cu-seeme":"cu","application/dash+xml":"mpd","application/dash-patch+xml":"mpp","application/davmount+xml":"davmount","application/docbook+xml":"dbk","application/dssc+der":"dssc","application/dssc+xml":"xdssc","application/ecmascript":"es","application/emma+xml":"emma","application/emotionml+xml":"emotionml","application/epub+zip":"epub","application/exi":"exi","application/express":"exp","application/fdt+xml":"fdt","application/font-tdpfr":"pfr","application/geo+json":"geojson","application/gml+xml":"gml","application/gpx+xml":"gpx","application/gxf":"gxf","application/gzip":"gz","application/hjson":"hjson","application/hyperstudio":"stk","application/inkml+xml":"ink","application/ipfix":"ipfix","application/its+xml":"its","application/java-archive":"jar","application/java-serialized-object":"ser","application/java-vm":"class","application/javascript":"js","application/json":"json","application/json5":"json5","application/jsonml+json":"jsonml","application/ld+json":"jsonld","application/lgr+xml":"lgr","application/lost+xml":"lostxml","application/mac-binhex40":"hqx","application/mac-compactpro":"cpt","application/mads+xml":"mads","application/manifest+json":"webmanifest","application/marc":"mrc","application/marcxml+xml":"mrcx","application/mathematica":"ma","application/mathml+xml":"mathml","application/mbox":"mbox","application/media-policy-dataset+xml":"mpf","application/mediaservercontrol+xml":"mscml","application/metalink+xml":"metalink","application/metalink4+xml":"meta4","application/mets+xml":"mets","application/mmt-aei+xml":"maei","application/mmt-usd+xml":"musd","application/mods+xml":"mods","application/mp21":"m21","application/mp4":"mp4s","application/msword":"doc","application/mxf":"mxf","application/n-quads":"nq","application/n-triples":"nt","application/node":"cjs","application/octet-stream":"bin","application/oda":"oda","application/oebps-package+xml":"opf","application/ogg":"ogx","application/omdoc+xml":"omdoc","application/onenote":"onetoc","application/oxps":"oxps","application/p2p-overlay+xml":"relo","application/patch-ops-error+xml":"xer","application/pdf":"pdf","application/pgp-encrypted":"pgp","application/pgp-keys":"asc","application/pgp-signature":"asc","application/pics-rules":"prf","application/pkcs10":"p10","application/pkcs7-mime":"p7m","application/pkcs7-signature":"p7s","application/pkcs8":"p8","application/pkix-attr-cert":"ac","application/pkix-cert":"cer","application/pkix-crl":"crl","application/pkix-pkipath":"pkipath","application/pkixcmp":"pki","application/pls+xml":"pls","application/postscript":"ai","application/provenance+xml":"provx","application/prs.cww":"cww","application/pskc+xml":"pskcxml","application/raml+yaml":"raml","application/rdf+xml":"rdf","application/reginfo+xml":"rif","application/relax-ng-compact-syntax":"rnc","application/resource-lists+xml":"rl","application/resource-lists-diff+xml":"rld","application/rls-services+xml":"rs","application/route-apd+xml":"rapd","application/route-s-tsid+xml":"sls","application/route-usd+xml":"rusd","application/rpki-ghostbusters":"gbr","application/rpki-manifest":"mft","application/rpki-roa":"roa","application/rsd+xml":"rsd","application/rss+xml":"rss","application/rtf":"rtf","application/sbml+xml":"sbml","application/scvp-cv-request":"scq","application/scvp-cv-response":"scs","application/scvp-vp-request":"spq","application/scvp-vp-response":"spp","application/sdp":"sdp","application/senml+xml":"senmlx","application/sensml+xml":"sensmlx","application/set-payment-initiation":"setpay","application/set-registration-initiation":"setreg","application/shf+xml":"shf","application/sieve":"siv","application/smil+xml":"smi","application/sparql-query":"rq","application/sparql-results+xml":"srx","application/srgs":"gram","application/srgs+xml":"grxml","application/sru+xml":"sru","application/ssdl+xml":"ssdl","application/ssml+xml":"ssml","application/swid+xml":"swidtag","application/tei+xml":"tei","application/thraud+xml":"tfi","application/timestamped-data":"tsd","application/toml":"toml","application/trig":"trig","application/ttml+xml":"ttml","application/ubjson":"ubj","application/urc-ressheet+xml":"rsheet","application/urc-targetdesc+xml":"td","application/vnd.1000minds.decision-model+xml":"1km","application/vnd.3gpp.pic-bw-large":"plb","application/vnd.3gpp.pic-bw-small":"psb","application/vnd.3gpp.pic-bw-var":"pvb","application/vnd.3gpp2.tcap":"tcap","application/vnd.3m.post-it-notes":"pwn","application/vnd.accpac.simply.aso":"aso","application/vnd.accpac.simply.imp":"imp","application/vnd.acucobol":"acu","application/vnd.acucorp":"atc","application/vnd.adobe.air-application-installer-package+zip":"air","application/vnd.adobe.formscentral.fcdt":"fcdt","application/vnd.adobe.fxp":"fxp","application/vnd.adobe.xdp+xml":"xdp","application/vnd.adobe.xfdf":"xfdf","application/vnd.age":"age","application/vnd.ahead.space":"ahead","application/vnd.airzip.filesecure.azf":"azf","application/vnd.airzip.filesecure.azs":"azs","application/vnd.amazon.ebook":"azw","application/vnd.americandynamics.acc":"acc","application/vnd.amiga.ami":"ami","application/vnd.android.package-archive":"apk","application/vnd.anser-web-certificate-issue-initiation":"cii","application/vnd.anser-web-funds-transfer-initiation":"fti","application/vnd.antix.game-component":"atx","application/vnd.apple.installer+xml":"mpkg","application/vnd.apple.keynote":"key","application/vnd.apple.mpegurl":"m3u8","application/vnd.apple.numbers":"numbers","application/vnd.apple.pages":"pages","application/vnd.apple.pkpass":"pkpass","application/vnd.aristanetworks.swi":"swi","application/vnd.astraea-software.iota":"iota","application/vnd.audiograph":"aep","application/vnd.balsamiq.bmml+xml":"bmml","application/vnd.blueice.multipass":"mpm","application/vnd.bmi":"bmi","application/vnd.businessobjects":"rep","application/vnd.chemdraw+xml":"cdxml","application/vnd.chipnuts.karaoke-mmd":"mmd","application/vnd.cinderella":"cdy","application/vnd.citationstyles.style+xml":"csl","application/vnd.claymore":"cla","application/vnd.cloanto.rp9":"rp9","application/vnd.clonk.c4group":"c4g","application/vnd.cluetrust.cartomobile-config":"c11amc","application/vnd.cluetrust.cartomobile-config-pkg":"c11amz","application/vnd.commonspace":"csp","application/vnd.contact.cmsg":"cdbcmsg","application/vnd.cosmocaller":"cmc","application/vnd.crick.clicker":"clkx","application/vnd.crick.clicker.keyboard":"clkk","application/vnd.crick.clicker.palette":"clkp","application/vnd.crick.clicker.template":"clkt","application/vnd.crick.clicker.wordbank":"clkw","application/vnd.criticaltools.wbs+xml":"wbs","application/vnd.ctc-posml":"pml","application/vnd.cups-ppd":"ppd","application/vnd.curl.car":"car","application/vnd.curl.pcurl":"pcurl","application/vnd.dart":"dart","application/vnd.data-vision.rdz":"rdz","application/vnd.dbf":"dbf","application/vnd.dece.data":"uvf","application/vnd.dece.ttml+xml":"uvt","application/vnd.dece.unspecified":"uvx","application/vnd.dece.zip":"uvz","application/vnd.denovo.fcselayout-link":"fe_launch","application/vnd.dna":"dna","application/vnd.dolby.mlp":"mlp","application/vnd.dpgraph":"dpg","application/vnd.dreamfactory":"dfac","application/vnd.ds-keypoint":"kpxx","application/vnd.dvb.ait":"ait","application/vnd.dvb.service":"svc","application/vnd.dynageo":"geo","application/vnd.ecowin.chart":"mag","application/vnd.enliven":"nml","application/vnd.epson.esf":"esf","application/vnd.epson.msf":"msf","application/vnd.epson.quickanime":"qam","application/vnd.epson.salt":"slt","application/vnd.epson.ssf":"ssf","application/vnd.eszigno3+xml":"es3","application/vnd.ezpix-album":"ez2","application/vnd.ezpix-package":"ez3","application/vnd.fdf":"fdf","application/vnd.fdsn.mseed":"mseed","application/vnd.fdsn.seed":"seed","application/vnd.flographit":"gph","application/vnd.fluxtime.clip":"ftc","application/vnd.framemaker":"fm","application/vnd.frogans.fnc":"fnc","application/vnd.frogans.ltf":"ltf","application/vnd.fsc.weblaunch":"fsc","application/vnd.fujitsu.oasys":"oas","application/vnd.fujitsu.oasys2":"oa2","application/vnd.fujitsu.oasys3":"oa3","application/vnd.fujitsu.oasysgp":"fg5","application/vnd.fujitsu.oasysprs":"bh2","application/vnd.fujixerox.ddd":"ddd","application/vnd.fujixerox.docuworks":"xdw","application/vnd.fujixerox.docuworks.binder":"xbd","application/vnd.fuzzysheet":"fzs","application/vnd.genomatix.tuxedo":"txd","application/vnd.geogebra.file":"ggb","application/vnd.geogebra.tool":"ggt","application/vnd.geometry-explorer":"gex","application/vnd.geonext":"gxt","application/vnd.geoplan":"g2w","application/vnd.geospace":"g3w","application/vnd.gmx":"gmx","application/vnd.google-apps.document":"gdoc","application/vnd.google-apps.presentation":"gslides","application/vnd.google-apps.spreadsheet":"gsheet","application/vnd.google-earth.kml+xml":"kml","application/vnd.google-earth.kmz":"kmz","application/vnd.grafeq":"gqf","application/vnd.groove-account":"gac","application/vnd.groove-help":"ghf","application/vnd.groove-identity-message":"gim","application/vnd.groove-injector":"grv","application/vnd.groove-tool-message":"gtm","application/vnd.groove-tool-template":"tpl","application/vnd.groove-vcard":"vcg","application/vnd.hal+xml":"hal","application/vnd.handheld-entertainment+xml":"zmm","application/vnd.hbci":"hbci","application/vnd.hhe.lesson-player":"les","application/vnd.hp-hpgl":"hpgl","application/vnd.hp-hpid":"hpid","application/vnd.hp-hps":"hps","application/vnd.hp-jlyt":"jlt","application/vnd.hp-pcl":"pcl","application/vnd.hp-pclxl":"pclxl","application/vnd.hydrostatix.sof-data":"sfd-hdstx","application/vnd.ibm.minipay":"mpy","application/vnd.ibm.modcap":"afp","application/vnd.ibm.rights-management":"irm","application/vnd.ibm.secure-container":"sc","application/vnd.iccprofile":"icc","application/vnd.igloader":"igl","application/vnd.immervision-ivp":"ivp","application/vnd.immervision-ivu":"ivu","application/vnd.insors.igm":"igm","application/vnd.intercon.formnet":"xpw","application/vnd.intergeo":"i2g","application/vnd.intu.qbo":"qbo","application/vnd.intu.qfx":"qfx","application/vnd.ipunplugged.rcprofile":"rcprofile","application/vnd.irepository.package+xml":"irp","application/vnd.is-xpr":"xpr","application/vnd.isac.fcs":"fcs","application/vnd.jam":"jam","application/vnd.jcp.javame.midlet-rms":"rms","application/vnd.jisp":"jisp","application/vnd.joost.joda-archive":"joda","application/vnd.kahootz":"ktz","application/vnd.kde.karbon":"karbon","application/vnd.kde.kchart":"chrt","application/vnd.kde.kformula":"kfo","application/vnd.kde.kivio":"flw","application/vnd.kde.kontour":"kon","application/vnd.kde.kpresenter":"kpr","application/vnd.kde.kspread":"ksp","application/vnd.kde.kword":"kwd","application/vnd.kenameaapp":"htke","application/vnd.kidspiration":"kia","application/vnd.kinar":"kne","application/vnd.koan":"skp","application/vnd.kodak-descriptor":"sse","application/vnd.las.las+xml":"lasxml","application/vnd.llamagraphics.life-balance.desktop":"lbd","application/vnd.llamagraphics.life-balance.exchange+xml":"lbe","application/vnd.lotus-1-2-3":"123","application/vnd.lotus-approach":"apr","application/vnd.lotus-freelance":"pre","application/vnd.lotus-notes":"nsf","application/vnd.lotus-organizer":"org","application/vnd.lotus-screencam":"scm","application/vnd.lotus-wordpro":"lwp","application/vnd.macports.portpkg":"portpkg","application/vnd.mapbox-vector-tile":"mvt","application/vnd.mcd":"mcd","application/vnd.medcalcdata":"mc1","application/vnd.mediastation.cdkey":"cdkey","application/vnd.mfer":"mwf","application/vnd.mfmp":"mfm","application/vnd.micrografx.flo":"flo","application/vnd.micrografx.igx":"igx","application/vnd.mif":"mif","application/vnd.mobius.daf":"daf","application/vnd.mobius.dis":"dis","application/vnd.mobius.mbk":"mbk","application/vnd.mobius.mqy":"mqy","application/vnd.mobius.msl":"msl","application/vnd.mobius.plc":"plc","application/vnd.mobius.txf":"txf","application/vnd.mophun.application":"mpn","application/vnd.mophun.certificate":"mpc","application/vnd.mozilla.xul+xml":"xul","application/vnd.ms-artgalry":"cil","application/vnd.ms-cab-compressed":"cab","application/vnd.ms-excel":"xls","application/vnd.ms-excel.addin.macroenabled.12":"xlam","application/vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","application/vnd.ms-excel.sheet.macroenabled.12":"xlsm","application/vnd.ms-excel.template.macroenabled.12":"xltm","application/vnd.ms-fontobject":"eot","application/vnd.ms-htmlhelp":"chm","application/vnd.ms-ims":"ims","application/vnd.ms-lrm":"lrm","application/vnd.ms-officetheme":"thmx","application/vnd.ms-outlook":"msg","application/vnd.ms-pki.seccat":"cat","application/vnd.ms-pki.stl":"stl","application/vnd.ms-powerpoint":"ppt","application/vnd.ms-powerpoint.addin.macroenabled.12":"ppam","application/vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","application/vnd.ms-powerpoint.slide.macroenabled.12":"sldm","application/vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","application/vnd.ms-powerpoint.template.macroenabled.12":"potm","application/vnd.ms-project":"mpp","application/vnd.ms-word.document.macroenabled.12":"docm","application/vnd.ms-word.template.macroenabled.12":"dotm","application/vnd.ms-works":"wps","application/vnd.ms-wpl":"wpl","application/vnd.ms-xpsdocument":"xps","application/vnd.mseq":"mseq","application/vnd.musician":"mus","application/vnd.muvee.style":"msty","application/vnd.mynfc":"taglet","application/vnd.neurolanguage.nlu":"nlu","application/vnd.nitf":"ntf","application/vnd.noblenet-directory":"nnd","application/vnd.noblenet-sealer":"nns","application/vnd.noblenet-web":"nnw","application/vnd.nokia.n-gage.ac+xml":"ac","application/vnd.nokia.n-gage.data":"ngdat","application/vnd.nokia.n-gage.symbian.install":"n-gage","application/vnd.nokia.radio-preset":"rpst","application/vnd.nokia.radio-presets":"rpss","application/vnd.novadigm.edm":"edm","application/vnd.novadigm.edx":"edx","application/vnd.novadigm.ext":"ext","application/vnd.oasis.opendocument.chart":"odc","application/vnd.oasis.opendocument.chart-template":"otc","application/vnd.oasis.opendocument.database":"odb","application/vnd.oasis.opendocument.formula":"odf","application/vnd.oasis.opendocument.formula-template":"odft","application/vnd.oasis.opendocument.graphics":"odg","application/vnd.oasis.opendocument.graphics-template":"otg","application/vnd.oasis.opendocument.image":"odi","application/vnd.oasis.opendocument.image-template":"oti","application/vnd.oasis.opendocument.presentation":"odp","application/vnd.oasis.opendocument.presentation-template":"otp","application/vnd.oasis.opendocument.spreadsheet":"ods","application/vnd.oasis.opendocument.spreadsheet-template":"ots","application/vnd.oasis.opendocument.text":"odt","application/vnd.oasis.opendocument.text-master":"odm","application/vnd.oasis.opendocument.text-template":"ott","application/vnd.oasis.opendocument.text-web":"oth","application/vnd.olpc-sugar":"xo","application/vnd.oma.dd2+xml":"dd2","application/vnd.openblox.game+xml":"obgx","application/vnd.openofficeorg.extension":"oxt","application/vnd.openstreetmap.data+xml":"osm","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/vnd.openxmlformats-officedocument.presentationml.slide":"sldx","application/vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","application/vnd.openxmlformats-officedocument.presentationml.template":"potx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","application/vnd.osgeo.mapguide.package":"mgp","application/vnd.osgi.dp":"dp","application/vnd.osgi.subsystem":"esa","application/vnd.palm":"pdb","application/vnd.pawaafile":"paw","application/vnd.pg.format":"str","application/vnd.pg.osasli":"ei6","application/vnd.picsel":"efif","application/vnd.pmi.widget":"wg","application/vnd.pocketlearn":"plf","application/vnd.powerbuilder6":"pbd","application/vnd.previewsystems.box":"box","application/vnd.proteus.magazine":"mgz","application/vnd.publishare-delta-tree":"qps","application/vnd.pvi.ptid1":"ptid","application/vnd.quark.quarkxpress":"qxd","application/vnd.rar":"rar","application/vnd.realvnc.bed":"bed","application/vnd.recordare.musicxml":"mxl","application/vnd.recordare.musicxml+xml":"musicxml","application/vnd.rig.cryptonote":"cryptonote","application/vnd.rim.cod":"cod","application/vnd.rn-realmedia":"rm","application/vnd.rn-realmedia-vbr":"rmvb","application/vnd.route66.link66+xml":"link66","application/vnd.sailingtracker.track":"st","application/vnd.seemail":"see","application/vnd.sema":"sema","application/vnd.semd":"semd","application/vnd.semf":"semf","application/vnd.shana.informed.formdata":"ifm","application/vnd.shana.informed.formtemplate":"itp","application/vnd.shana.informed.interchange":"iif","application/vnd.shana.informed.package":"ipk","application/vnd.simtech-mindmapper":"twd","application/vnd.smaf":"mmf","application/vnd.smart.teacher":"teacher","application/vnd.software602.filler.form+xml":"fo","application/vnd.solent.sdkm+xml":"sdkm","application/vnd.spotfire.dxp":"dxp","application/vnd.spotfire.sfs":"sfs","application/vnd.stardivision.calc":"sdc","application/vnd.stardivision.draw":"sda","application/vnd.stardivision.impress":"sdd","application/vnd.stardivision.math":"smf","application/vnd.stardivision.writer":"sdw","application/vnd.stardivision.writer-global":"sgl","application/vnd.stepmania.package":"smzip","application/vnd.stepmania.stepchart":"sm","application/vnd.sun.wadl+xml":"wadl","application/vnd.sun.xml.calc":"sxc","application/vnd.sun.xml.calc.template":"stc","application/vnd.sun.xml.draw":"sxd","application/vnd.sun.xml.draw.template":"std","application/vnd.sun.xml.impress":"sxi","application/vnd.sun.xml.impress.template":"sti","application/vnd.sun.xml.math":"sxm","application/vnd.sun.xml.writer":"sxw","application/vnd.sun.xml.writer.global":"sxg","application/vnd.sun.xml.writer.template":"stw","application/vnd.sus-calendar":"sus","application/vnd.svd":"svd","application/vnd.symbian.install":"sis","application/vnd.syncml+xml":"xsm","application/vnd.syncml.dm+wbxml":"bdm","application/vnd.syncml.dm+xml":"xdm","application/vnd.syncml.dmddf+xml":"ddf","application/vnd.tao.intent-module-archive":"tao","application/vnd.tcpdump.pcap":"pcap","application/vnd.tmobile-livetv":"tmo","application/vnd.trid.tpt":"tpt","application/vnd.triscape.mxs":"mxs","application/vnd.trueapp":"tra","application/vnd.ufdl":"ufd","application/vnd.uiq.theme":"utz","application/vnd.umajin":"umj","application/vnd.unity":"unityweb","application/vnd.uoml+xml":"uoml","application/vnd.vcx":"vcx","application/vnd.visio":"vsd","application/vnd.visionary":"vis","application/vnd.vsf":"vsf","application/vnd.wap.wbxml":"wbxml","application/vnd.wap.wmlc":"wmlc","application/vnd.wap.wmlscriptc":"wmlsc","application/vnd.webturbo":"wtb","application/vnd.wolfram.player":"nbp","application/vnd.wordperfect":"wpd","application/vnd.wqd":"wqd","application/vnd.wt.stf":"stf","application/vnd.xara":"xar","application/vnd.xfdl":"xfdl","application/vnd.yamaha.hv-dic":"hvd","application/vnd.yamaha.hv-script":"hvs","application/vnd.yamaha.hv-voice":"hvp","application/vnd.yamaha.openscoreformat":"osf","application/vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","application/vnd.yamaha.smaf-audio":"saf","application/vnd.yamaha.smaf-phrase":"spf","application/vnd.yellowriver-custom-menu":"cmp","application/vnd.zul":"zir","application/vnd.zzazz.deck+xml":"zaz","application/voicexml+xml":"vxml","application/wasm":"wasm","application/watcherinfo+xml":"wif","application/widget":"wgt","application/winhlp":"hlp","application/wsdl+xml":"wsdl","application/wspolicy+xml":"wspolicy","application/x-7z-compressed":"7z","application/x-abiword":"abw","application/x-ace-compressed":"ace","application/x-apple-diskimage":"dmg","application/x-arj":"arj","application/x-authorware-bin":"aab","application/x-authorware-map":"aam","application/x-authorware-seg":"aas","application/x-bcpio":"bcpio","application/x-bdoc":"bdoc","application/x-bittorrent":"torrent","application/x-blorb":"blb","application/x-bzip":"bz","application/x-bzip2":"bz2","application/x-cbr":"cbr","application/x-cdlink":"vcd","application/x-cfs-compressed":"cfs","application/x-chat":"chat","application/x-chess-pgn":"pgn","application/x-chrome-extension":"crx","application/x-cocoa":"cco","application/x-conference":"nsc","application/x-cpio":"cpio","application/x-csh":"csh","application/x-debian-package":"deb","application/x-dgc-compressed":"dgc","application/x-director":"dir","application/x-doom":"wad","application/x-dtbncx+xml":"ncx","application/x-dtbook+xml":"dtb","application/x-dtbresource+xml":"res","application/x-dvi":"dvi","application/x-envoy":"evy","application/x-eva":"eva","application/x-font-bdf":"bdf","application/x-font-ghostscript":"gsf","application/x-font-linux-psf":"psf","application/x-font-pcf":"pcf","application/x-font-snf":"snf","application/x-font-type1":"pfa","application/x-freearc":"arc","application/x-futuresplash":"spl","application/x-gca-compressed":"gca","application/x-glulx":"ulx","application/x-gnumeric":"gnumeric","application/x-gramps-xml":"gramps","application/x-gtar":"gtar","application/x-hdf":"hdf","application/x-httpd-php":"php","application/x-install-instructions":"install","application/x-iso9660-image":"iso","application/x-iwork-keynote-sffkey":"key","application/x-iwork-numbers-sffnumbers":"numbers","application/x-iwork-pages-sffpages":"pages","application/x-java-archive-diff":"jardiff","application/x-java-jnlp-file":"jnlp","application/x-keepass2":"kdbx","application/x-latex":"latex","application/x-lua-bytecode":"luac","application/x-lzh-compressed":"lzh","application/x-makeself":"run","application/x-mie":"mie","application/x-mobipocket-ebook":"prc","application/x-ms-application":"application","application/x-ms-shortcut":"lnk","application/x-ms-wmd":"wmd","application/x-ms-wmz":"wmz","application/x-ms-xbap":"xbap","application/x-msaccess":"mdb","application/x-msbinder":"obd","application/x-mscardfile":"crd","application/x-msclip":"clp","application/x-msdos-program":"exe","application/x-msdownload":"exe","application/x-msmediaview":"mvb","application/x-msmetafile":"wmf","application/x-msmoney":"mny","application/x-mspublisher":"pub","application/x-msschedule":"scd","application/x-msterminal":"trm","application/x-mswrite":"wri","application/x-netcdf":"nc","application/x-ns-proxy-autoconfig":"pac","application/x-nzb":"nzb","application/x-perl":"pl","application/x-pilot":"prc","application/x-pkcs12":"p12","application/x-pkcs7-certificates":"p7b","application/x-pkcs7-certreqresp":"p7r","application/x-rar-compressed":"rar","application/x-redhat-package-manager":"rpm","application/x-research-info-systems":"ris","application/x-sea":"sea","application/x-sh":"sh","application/x-shar":"shar","application/x-shockwave-flash":"swf","application/x-silverlight-app":"xap","application/x-sql":"sql","application/x-stuffit":"sit","application/x-stuffitx":"sitx","application/x-subrip":"srt","application/x-sv4cpio":"sv4cpio","application/x-sv4crc":"sv4crc","application/x-t3vm-image":"t3","application/x-tads":"gam","application/x-tar":"tar","application/x-tcl":"tcl","application/x-tex":"tex","application/x-tex-tfm":"tfm","application/x-texinfo":"texinfo","application/x-tgif":"obj","application/x-ustar":"ustar","application/x-virtualbox-hdd":"hdd","application/x-virtualbox-ova":"ova","application/x-virtualbox-ovf":"ovf","application/x-virtualbox-vbox":"vbox","application/x-virtualbox-vbox-extpack":"vbox-extpack","application/x-virtualbox-vdi":"vdi","application/x-virtualbox-vhd":"vhd","application/x-virtualbox-vmdk":"vmdk","application/x-wais-source":"src","application/x-web-app-manifest+json":"webapp","application/x-x509-ca-cert":"der","application/x-xfig":"fig","application/x-xliff+xml":"xlf","application/x-xpinstall":"xpi","application/x-xz":"xz","application/x-zmachine":"z1","application/xaml+xml":"xaml","application/xcap-att+xml":"xav","application/xcap-caps+xml":"xca","application/xcap-diff+xml":"xdf","application/xcap-el+xml":"xel","application/xcap-ns+xml":"xns","application/xenc+xml":"xenc","application/xhtml+xml":"xhtml","application/xliff+xml":"xlf","application/xml":"xml","application/xml-dtd":"dtd","application/xop+xml":"xop","application/xproc+xml":"xpl","application/xslt+xml":"xsl","application/xspf+xml":"xspf","application/xv+xml":"mxml","application/yang":"yang","application/yin+xml":"yin","application/zip":"zip","audio/3gpp":"3gpp","audio/adpcm":"adp","audio/amr":"amr","audio/basic":"au","audio/midi":"mid","audio/mobile-xmf":"mxmf","audio/mp3":"mp3","audio/mp4":"m4a","audio/mpeg":"mpga","audio/ogg":"oga","audio/s3m":"s3m","audio/silk":"sil","audio/vnd.dece.audio":"uva","audio/vnd.digital-winds":"eol","audio/vnd.dra":"dra","audio/vnd.dts":"dts","audio/vnd.dts.hd":"dtshd","audio/vnd.lucent.voice":"lvp","audio/vnd.ms-playready.media.pya":"pya","audio/vnd.nuera.ecelp4800":"ecelp4800","audio/vnd.nuera.ecelp7470":"ecelp7470","audio/vnd.nuera.ecelp9600":"ecelp9600","audio/vnd.rip":"rip","audio/wav":"wav","audio/wave":"wav","audio/webm":"weba","audio/x-aac":"aac","audio/x-aiff":"aif","audio/x-caf":"caf","audio/x-flac":"flac","audio/x-m4a":"m4a","audio/x-matroska":"mka","audio/x-mpegurl":"m3u","audio/x-ms-wax":"wax","audio/x-ms-wma":"wma","audio/x-pn-realaudio":"ram","audio/x-pn-realaudio-plugin":"rmp","audio/x-realaudio":"ra","audio/x-wav":"wav","audio/xm":"xm","chemical/x-cdx":"cdx","chemical/x-cif":"cif","chemical/x-cmdf":"cmdf","chemical/x-cml":"cml","chemical/x-csml":"csml","chemical/x-xyz":"xyz","font/collection":"ttc","font/otf":"otf","font/ttf":"ttf","font/woff":"woff","font/woff2":"woff2","image/aces":"exr","image/apng":"apng","image/avci":"avci","image/avcs":"avcs","image/avif":"avif","image/bmp":"bmp","image/cgm":"cgm","image/dicom-rle":"drle","image/emf":"emf","image/fits":"fits","image/g3fax":"g3","image/gif":"gif","image/heic":"heic","image/heic-sequence":"heics","image/heif":"heif","image/heif-sequence":"heifs","image/hej2k":"hej2","image/hsj2":"hsj2","image/ief":"ief","image/jls":"jls","image/jp2":"jp2","image/jpeg":"jpeg","image/jph":"jph","image/jphc":"jhc","image/jpm":"jpm","image/jpx":"jpx","image/jxr":"jxr","image/jxra":"jxra","image/jxrs":"jxrs","image/jxs":"jxs","image/jxsc":"jxsc","image/jxsi":"jxsi","image/jxss":"jxss","image/ktx":"ktx","image/ktx2":"ktx2","image/png":"png","image/prs.btif":"btif","image/prs.pti":"pti","image/sgi":"sgi","image/svg+xml":"svg","image/t38":"t38","image/tiff":"tif","image/tiff-fx":"tfx","image/vnd.adobe.photoshop":"psd","image/vnd.airzip.accelerator.azv":"azv","image/vnd.dece.graphic":"uvi","image/vnd.djvu":"djvu","image/vnd.dvb.subtitle":"sub","image/vnd.dwg":"dwg","image/vnd.dxf":"dxf","image/vnd.fastbidsheet":"fbs","image/vnd.fpx":"fpx","image/vnd.fst":"fst","image/vnd.fujixerox.edmics-mmr":"mmr","image/vnd.fujixerox.edmics-rlc":"rlc","image/vnd.microsoft.icon":"ico","image/vnd.ms-dds":"dds","image/vnd.ms-modi":"mdi","image/vnd.ms-photo":"wdp","image/vnd.net-fpx":"npx","image/vnd.pco.b16":"b16","image/vnd.tencent.tap":"tap","image/vnd.valve.source.texture":"vtf","image/vnd.wap.wbmp":"wbmp","image/vnd.xiff":"xif","image/vnd.zbrush.pcx":"pcx","image/webp":"webp","image/wmf":"wmf","image/x-3ds":"3ds","image/x-cmu-raster":"ras","image/x-cmx":"cmx","image/x-freehand":"fh","image/x-icon":"ico","image/x-jng":"jng","image/x-mrsid-image":"sid","image/x-ms-bmp":"bmp","image/x-pcx":"pcx","image/x-pict":"pic","image/x-portable-anymap":"pnm","image/x-portable-bitmap":"pbm","image/x-portable-graymap":"pgm","image/x-portable-pixmap":"ppm","image/x-rgb":"rgb","image/x-tga":"tga","image/x-xbitmap":"xbm","image/x-xpixmap":"xpm","image/x-xwindowdump":"xwd","message/disposition-notification":"disposition-notification","message/global":"u8msg","message/global-delivery-status":"u8dsn","message/global-disposition-notification":"u8mdn","message/global-headers":"u8hdr","message/rfc822":"eml","message/vnd.wfa.wsc":"wsc","model/3mf":"3mf","model/gltf+json":"gltf","model/gltf-binary":"glb","model/iges":"igs","model/mesh":"msh","model/mtl":"mtl","model/obj":"obj","model/step+xml":"stpx","model/step+zip":"stpz","model/step-xml+zip":"stpxz","model/stl":"stl","model/vnd.collada+xml":"dae","model/vnd.dwf":"dwf","model/vnd.gdl":"gdl","model/vnd.gtw":"gtw","model/vnd.mts":"mts","model/vnd.opengex":"ogex","model/vnd.parasolid.transmit.binary":"x_b","model/vnd.parasolid.transmit.text":"x_t","model/vnd.sap.vds":"vds","model/vnd.usdz+zip":"usdz","model/vnd.valve.source.compiled-map":"bsp","model/vnd.vtu":"vtu","model/vrml":"wrl","model/x3d+binary":"x3db","model/x3d+fastinfoset":"x3db","model/x3d+vrml":"x3dv","model/x3d+xml":"x3d","model/x3d-vrml":"x3dv","text/cache-manifest":"appcache","text/calendar":"ics","text/coffeescript":"coffee","text/css":"css","text/csv":"csv","text/html":"html","text/jade":"jade","text/jsx":"jsx","text/less":"less","text/markdown":"markdown","text/mathml":"mml","text/mdx":"mdx","text/n3":"n3","text/plain":"txt","text/prs.lines.tag":"dsc","text/richtext":"rtx","text/rtf":"rtf","text/sgml":"sgml","text/shex":"shex","text/slim":"slim","text/spdx":"spdx","text/stylus":"stylus","text/tab-separated-values":"tsv","text/troff":"t","text/turtle":"ttl","text/uri-list":"uri","text/vcard":"vcard","text/vnd.curl":"curl","text/vnd.curl.dcurl":"dcurl","text/vnd.curl.mcurl":"mcurl","text/vnd.curl.scurl":"scurl","text/vnd.dvb.subtitle":"sub","text/vnd.familysearch.gedcom":"ged","text/vnd.fly":"fly","text/vnd.fmi.flexstor":"flx","text/vnd.graphviz":"gv","text/vnd.in3d.3dml":"3dml","text/vnd.in3d.spot":"spot","text/vnd.sun.j2me.app-descriptor":"jad","text/vnd.wap.wml":"wml","text/vnd.wap.wmlscript":"wmls","text/vtt":"vtt","text/x-asm":"s","text/x-c":"c","text/x-component":"htc","text/x-fortran":"f","text/x-handlebars-template":"hbs","text/x-java-source":"java","text/x-lua":"lua","text/x-markdown":"mkd","text/x-nfo":"nfo","text/x-opml":"opml","text/x-org":"org","text/x-pascal":"p","text/x-processing":"pde","text/x-sass":"sass","text/x-scss":"scss","text/x-setext":"etx","text/x-sfv":"sfv","text/x-suse-ymp":"ymp","text/x-uuencode":"uu","text/x-vcalendar":"vcs","text/x-vcard":"vcf","text/xml":"xml","text/yaml":"yaml","video/3gpp":"3gp","video/3gpp2":"3g2","video/h261":"h261","video/h263":"h263","video/h264":"h264","video/iso.segment":"m4s","video/jpeg":"jpgv","video/jpm":"jpm","video/mj2":"mj2","video/mp2t":"ts","video/mp4":"mp4","video/mpeg":"mpeg","video/ogg":"ogv","video/quicktime":"qt","video/vnd.dece.hd":"uvh","video/vnd.dece.mobile":"uvm","video/vnd.dece.pd":"uvp","video/vnd.dece.sd":"uvs","video/vnd.dece.video":"uvv","video/vnd.dvb.file":"dvb","video/vnd.fvt":"fvt","video/vnd.mpegurl":"mxu","video/vnd.ms-playready.media.pyv":"pyv","video/vnd.uvvu.mp4":"uvu","video/vnd.vivo":"viv","video/webm":"webm","video/x-f4v":"f4v","video/x-fli":"fli","video/x-flv":"flv","video/x-m4v":"m4v","video/x-matroska":"mkv","video/x-mng":"mng","video/x-ms-asf":"asf","video/x-ms-vob":"vob","video/x-ms-wm":"wm","video/x-ms-wmv":"wmv","video/x-ms-wmx":"wmx","video/x-ms-wvx":"wvx","video/x-msvideo":"avi","video/x-sgi-movie":"movie","video/x-smv":"smv","x-conference/x-cooltalk":"ice"},jg=/^\s*([^;\s]*)(?:;|\s|$)/;function vr(n){if(!n||typeof n!="string")return"";let t=jg.exec(n);return t&&Ug[t[1].toLowerCase()]||""}var Sn=n=>Ze(n).replace(/[\[\]\#\^]/g,""),hi=(n,t)=>K.readdirSync(n).filter(i=>{let r=i.split(".").slice(0,-1).join("."),o=Nn(t),a=r.match(new RegExp(`${o}\\.\\d+`));return r===t||a}).length,iu=(n,t)=>{let e=B.useUniqueUnknownFileNames?"unknown_filename"+(Math.random().toString(16)+"0000000").slice(2,10):"unknown_filename",i=Wg(t),r=e;if(t["resource-attributes"]&&t["resource-attributes"]["file-name"]){let s=t["resource-attributes"]["file-name"].substr(0,50);r=oe(s).basename}r=r.replace(/[/\\?%*:|"<>\[\]\+]/g,"-"),B.sanitizeResourceNameSpaces&&(r=r.replace(/ /g,B.replacementChar));let o=hi(n,r);return{fileName:`${o>0?`${r}.${o}`:r}.${i}`,extension:i,index:o}},Fa=n=>Sn(n.title?`${n.title.toString()}`:"Untitled"),ru=(n,t,e="md")=>`${La(n,t)}.${e}`,Hg=n=>{if(!(n["resource-attributes"]&&n["resource-attributes"]["file-name"]))return"";let t=n["resource-attributes"]["file-name"].split(".");return t.length>1?t[t.length-1]:void 0},qg=n=>{let t=n.mime;return t&&vr(t)||""},Wg=n=>{let t="dat";return Hg(n)||qg(n)||t},Zg=(n,t)=>(0,nu.moment)(n.created).format("YYYYMMDDHHmm"),La=(n,t)=>{let e;if(B.isZettelkastenNeeded||B.useZettelIdAsFilename){let i=Zg(t,n),r=hi(n,i),o=" ";e=r!==0?`${i}.${r}`:i,B.useZettelIdAsFilename||(e+=Fa(t)!=="Untitled"?`${o}${Fa(t)}`:"")}else{let i=Fa(t),r=hi(n,i);e=r===0?i:`${i}.${r}`}return e};var ou=n=>n==="Table of Contents";var Yg=n=>n.replace(/\[|\]/g,""),zg=n=>n.replace(/\\/g,""),su={filter:qe("A"),replacement:(n,t)=>{let e=ue(t);if(!e.href)return"";let i=Er(B).turndown(Yg(t.innerHTML));i=zg(i);let r="",o=i.match(/^(#{1,6} )(.*)/);o&&(r=o[1],i=o[2]);let a=e.href.value,s=e.type?e.type.value:void 0,l=B.urlEncodeFileNamesAndLinks?encodeURI(a):a;if(s==="file")return`![[${l}]]`;if(a.match(/^(https?:|www\.|file:|ftp:|mailto:)/))return r+Kg(i,a);if(a.startsWith("evernote://")){let c=Sn(i),p=fe.getInstance(),m=xn(6);return ou(p.getCurrentNoteName())?p.addItemToTOCMap({url:a,title:c,uniqueEnd:m}):p.addItemToMap({url:a,title:c,uniqueEnd:m}),r+`[[${a}]]`}return r+`[[${l}${i===l?"":`|${i}`}]]`}},Gg={"&":"&","<":"<",">":">",""":'"',"'":"'"},lu=/&(?:amp|lt|gt|quot|#39);/g,Vg=RegExp(lu.source);function au(n){return n&&Vg.test(n)?n.replace(lu,t=>Gg[t]):n}var Kg=(n,t)=>!n||au(n)===au(t)?B.generateNakedUrls?t:`<${t}>`:`[${n}](${t})`;var xe={bold:"**",italic:"_",highlight:"==",strikethrough:"~~"};var Xg="-evernote-highlight:true;",Jg="--en-highlight",Qg="bold",e0="italic",cu={filter:qe("SPAN"),replacement:(n,t)=>{let e=ue(t);if(e.style&&n.trim()!==""){let i=e.style.value;if(n!==""){let r=i.includes(Qg),o=i.includes(e0);if(r&&!o)return`${xe.bold}${n}${xe.bold}`;if(!r&&o)return`${xe.italic}${n}${xe.italic}`;if(r&&o)return`${xe.italic}${xe.bold}${n}${xe.bold}${xe.italic}`}return i.includes(Xg)||i.includes(Jg)?`${xe.highlight}${n}${xe.highlight}`:n}return n}};var pu={filter:["del","s","strike"],replacement:n=>`${xe.strikethrough}${n}${xe.strikethrough}`};var uu={filter:qe("EN-TODO"),replacement:(n,t)=>{var r,o;let e=ue(t);return`${((o=(r=t.parentElement)==null?void 0:r.nodeName)==null?void 0:o.toUpperCase())==="LI"?"":"- "}${e.checked&&e.checked.value==="true"?"[x]":"[ ]"} ${n}`}};var fu={filter:qe("BR"),replacement:(n,t)=>""};var t0=n=>{let t=ue(n),e="--en-task-group:true";return t.style&&t.style.value.indexOf(e)>=0},n0=n=>{let t=ue(n),e="--en-id:";return t.style.value.split(e)[1].split(";")[0]},du={filter:qe("DIV"),replacement:(n,t)=>t0(t)?`${n0(t)}`:B.monospaceIsCodeBlock?eu(n,t):Jp(n,t)};var mu={filter:["i"],replacement:n=>n.trim()!==""?`${xe.italic}${n}${xe.italic}`:n};var _r="- [ ]",Tr="- [x]";var hu=" ",gu={filter:"li",replacement:(n,t,e)=>{let i=m=>{let y=ue(m),E="--en-checked:true;";return y.style&&y.style.value.indexOf(E)>=0},r=m=>{let y=ue(m),E="--en-checked:false;";return y.style&&y.style.value.indexOf(E)>=0},o=n.match(/^\n*/)[0].length||0,a=hu.repeat(o),s=n.replace(/^\n+/,"").replace(/\n+$/,` +`).replace(/\n/gm,` +${hu}`),l=o>0?a:i(t)?`${Tr} `:r(t)?`${_r} `:"* ",c=t.parentNode;if(c.nodeName==="OL"){let m=c.getAttribute("start"),y=Array.prototype.indexOf.call(c.children,t);l=`${m?Number(m)+y:y+1}. `}let p;return p=l+s+(t.nextSibling&&!/\n$/.test(s)?` +`:""),p}};var Er=n=>{let t=new window.TurndownService({br:"",...n.turndownOptions,blankReplacement:(e,i)=>i.isBlock?` + +`:"",keepReplacement:(e,i)=>i.isBlock?` +${i.outerHTML} +`:i.outerHTML,defaultReplacement:(e,i)=>i.isBlock?` +${e} +`:e});return t.use(Kp),t.addRule("span",cu),t.addRule("strikethrough",pu),t.addRule("evernote task items",uu),t.addRule("wikistyle links",su),t.addRule("images",tu),t.addRule("list",gu),t.addRule("italic",mu),n.keepMDCharactersOfENNotes&&(t.escape=e=>e),t.addRule("divBlock",du),n.keepOriginalAmountOfNewlines&&t.addRule("newline",fu),t};var yu=n=>{n.replaceWith(...Array.from(n.children))},bu=n=>{let t=n.parentElement;t.replaceWith(...Array.from(t.childNodes)),t.append(...Array.from(n.childNodes)),n.appendChild(t)},i0=n=>(Array.from(n.querySelectorAll("span>en-todo")).forEach(bu),Array.from(n.querySelectorAll("a>en-todo")).forEach(bu),n),r0=n=>{let t=n.replace(/

  • /g,"
  • ");return t=t.replace(/<\/li>/g,"
  • "),t=t.replace(/
  • (\s)*
    /g,"
  • "),t=t.replace(/<\/div>(\s)*<\/div><\/li>/g,"
  • "),t},o0=n=>{var o;let t=Array.from(n.getElementsByTagName("ul")),e=Array.from(n.getElementsByTagName("ol")),i=t.concat(e);i.forEach(a=>{a.parentElement.tagName==="LI"&&a.parentElement.replaceWith(a),a.previousElementSibling&&a.previousElementSibling.tagName==="LI"&&a.previousElementSibling.appendChild(a)});for(let a of i){let s=a.parentElement;(s==null?void 0:s.tagName)==="DIV"&&((o=s==null?void 0:s.parentElement)==null?void 0:o.tagName)==="UL"&&yu(s),((s==null?void 0:s.tagName)==="UL"||(s==null?void 0:s.tagName)==="OL")&&(s==null?void 0:s.childNodes.length)===1&&yu(s)}let r=Array.from(n.getElementsByTagName("li"));for(let a of r){let s=a.firstElementChild;if(s&&s.tagName==="DIV"){let l=Array.from(s.childNodes);s.replaceWith(...l)}}return n},xu=(n,{htmlContent:t})=>{let e=t.replace(/]*>/,"").replace(/(]*)\/>/,"$1>").replace(//g,""),i=new DOMParser().parseFromString(r0(e),"text/html").getElementsByTagName("en-note").item(0),r=Er(n).turndown(i0(o0(i))),o=new RegExp("","g");return r=r.replace(o,""),r&&r!=="undefined"?{content:r}:{content:""}};var uf=ns(require("crypto"));var yt=require("obsidian");var wu=(n,t)=>({createdAt:a0(n),updatedAt:s0(n),sourceUrl:l0(n),location:c0(n),reminderTime:p0(n),reminderOrder:u0(n),reminderDoneTime:f0(n),notebookName:t});var a0=n=>!B.skipCreationTime&&n.created?(0,yt.moment)(n.created).format(B.dateFormat):"",s0=n=>!B.skipUpdateTime&&n.updated?(0,yt.moment)(n.updated).format(B.dateFormat):"",l0=n=>!B.skipSourceUrl&&n["note-attributes"]?n["note-attributes"]["source-url"]:"",c0=n=>!B.skipLocation&&n["note-attributes"]&&n["note-attributes"].longitude?`${n["note-attributes"].latitude},${n["note-attributes"].longitude}`:"",p0=n=>!B.skipReminderTime&&n["note-attributes"]&&n["note-attributes"]["reminder-time"]?(0,yt.moment)(n["note-attributes"]["reminder-time"]).format(B.dateFormat):"",u0=n=>!B.skipReminderOrder&&n["note-attributes"]&&n["note-attributes"]["reminder-order"]?n["note-attributes"]["reminder-order"]:"",f0=n=>!B.skipReminderDoneTime&&n["note-attributes"]&&n["note-attributes"]["reminder-done-time"]?(0,yt.moment)(n["note-attributes"]["reminder-done-time"]).format(B.dateFormat):"",vu=n=>({tags:d0(n)}),d0=n=>{if(!B.skipTags&&n.tag){let t=Array.isArray(n.tag)?n.tag:[n.tag],e=B.nestedTags;return t.map(r=>{let o=r.toString().replace(/^#/,"");e&&(o=o.replace(new RegExp(Nn(e.separatorInEN),"g"),e.replaceSeparatorWith));let a=e&&e.replaceSpaceWith||"-";return o=o.replace(/ /g,a),`${B.useHashTags?"#":""}${o}`}).join(" ")}return""},Pa;try{Pa=window.require("btime")}catch(n){}var Ar=(n,t)=>{let e=(0,yt.moment)(t.created).valueOf();e>0&&Pa&&Pa.btime(n,e);let r=(0,yt.moment)(t.updated).valueOf()/1e3;try{K.utimesSync(n,r,r)}catch(o){}},Eu=n=>n["resource-attributes"]&&n["resource-attributes"].timestamp?(0,yt.moment)(n["resource-attributes"].timestamp):(0,yt.moment)();var _u=(n,t,e)=>{let i=n.lastIndexOf(t);return i<0?n:n.substring(0,i)+e+n.substring(i+t.length)};var Ae={mdPath:"",resourcePath:""},Nr=249,Tu=(n,t)=>La(n,t).replace(/\s/g,"_"),Au=(n,t)=>{if(n.length<=11)throw Error("FATAL: note folder directory path exceeds the OS limitation. Please pick a destination closer to the root folder.");return`${$a()}${q.sep}${n}`.length{let r=fe.getInstance().getNoteIdNameMapByNoteTitle(Sn(n.title))[0]||{uniqueEnd:xn(6)};if(t.length<=11)throw Error("FATAL: note folder directory path exceeds the OS limitation. Please pick a destination closer to the root folder.");return`${e.slice(0,Nr-11)}_${r.uniqueEnd}.md`},h0=(n,t,e)=>{let i=ru(n,t,e),r=`${n}${q.sep}${Sn(i)}`;return r.lengthh0(Ae.mdPath,n,"md");var g0=n=>{K.existsSync(n)&&(K.rmSync?K.rmSync(n,{recursive:!0,force:!0}):K.rmdirSync(n,{recursive:!0})),K.mkdirSync(n)},Nu=n=>{let t=`${q.sep}${B.resourcesDir}`;return B.haveGlobalResources?`..${t}`:B.haveEnexLevelResources?`.${t}`:`.${t}${q.sep}${Tu(Ae.mdPath,n)}.resources`},Ma=n=>B.haveGlobalResources?q.resolve(Ae.resourcePath,"..","..",B.resourcesDir):B.haveEnexLevelResources?Ae.resourcePath:`${Ae.resourcePath}${q.sep}${Tu(Ae.mdPath,n)}.resources`,kr=new Map,Su=n=>{let t=Ma(n);kr.has(t)||kr.set(t,0);let e=kr.get(t)||0;(B.haveEnexLevelResources||B.haveGlobalResources)&&e>=1||(g0(t),kr.set(t,e+1))},Ru=n=>{let t=n.split("@@@"),e=t.pop();return e||(e=n),{notebookName:e,notebookFolderNames:t}},Ou=n=>{if(!(n instanceof Me))throw new Error("Evernote import currently only works on desktop");let{notebookName:t}=Ru(n.basename);return{fullpath:_u(n.fullpath,n.basename,t||n.basename),basename:t}},Du=(n,t)=>{let{notebookFolderNames:e}=Ru(n.basename);return K.mkdirSync(q.join(t.outputDir,...e),{recursive:!0}),[t.outputDir,...e].join(t.pathSeparator)},Cu=(n,t)=>{let e=n.basename;Fu(e,t)},Iu=(n,t)=>{let e=n.basename;Fu(e,t)},Fu=(n,t)=>{let e=q.isAbsolute(t.outputDir)?t.outputDir:`${process.cwd()}${q.sep}${t.outputDir}`;Ae.mdPath=`${e}${q.sep}`,Ae.resourcePath=`${e}${q.sep}${t.resourcesDir}`,t.skipEnexFileNameFromOutputPath||(Ae.mdPath=`${Ae.mdPath}${n}`,Ae.resourcePath=`${e}${q.sep}${n}${q.sep}${t.resourcesDir}`),K.mkdirSync(Ae.mdPath,{recursive:!0}),!t.haveEnexLevelResources&&!t.haveGlobalResources&&K.mkdirSync(Ae.resourcePath,{recursive:!0}),console.log(`path ${Ae.mdPath} created`)},$a=()=>Ae.mdPath;var Lu=n=>!!n.resource,Pu=n=>n["note-attributes"]&&(n["note-attributes"]["source-application"]==="webclipper.evernote"||n["note-attributes"].source==="web.clip7");var Ba={};Se(Ba,{CONTENT_PLACEHOLDER:()=>y0,END_BLOCK:()=>x0,START_BLOCK:()=>b0});var y0="{content}",b0="{content-block}",x0="{end-content-block}";var Pt=({template:n,check:t,startBlockPlaceholder:e,endBlockPlaceholder:i,valuePlaceholder:r,value:o})=>{if(o&&t())return n.replace(new RegExp(`${e}`,"g"),"").replace(new RegExp(`${i}`,"g"),"").replace(new RegExp(`${r}`,"g"),o);let a=`${e}([\\d\\D])(?:.|(\r +|\r| +))*?(?=${i})${i}`;return n.replace(new RegExp(a,"g"),"")};var Mt=(n,t,e,i)=>({template:n,check:t,startBlockPlaceholder:e.START_BLOCK,endBlockPlaceholder:e.END_BLOCK,valuePlaceholder:e.CONTENT_PLACEHOLDER,value:i});var Mu=(n,t,e)=>{let i=Mt(t,e,Ba,n.content);return Pt(i)};var gi={};Se(gi,{CONTENT_PLACEHOLDER:()=>w0,END_BLOCK:()=>E0,START_BLOCK:()=>v0});var w0="{tags}",v0="{tags-block}",E0="{end-tags-block}";var $u=(n,t,e)=>{let i=Mt(t,e,gi,n.tags);return Pt(i)};var Ua={};Se(Ua,{CONTENT_PLACEHOLDER:()=>_0,END_BLOCK:()=>A0,START_BLOCK:()=>T0});var _0="{title}",T0="{title-block}",A0="{end-title-block}";var Bu=(n,t,e)=>{let i=Mt(t,e,Ua,n.title);return Pt(i)};var rn={};Se(rn,{CONTENT_PLACEHOLDER:()=>k0,END_BLOCK:()=>S0,START_BLOCK:()=>N0});var k0="{created-at}",N0="{created-at-block}",S0="{end-created-at-block}";var ve=(n,t,e)=>n.replace(new RegExp(`${t.CONTENT_PLACEHOLDER}`,"g"),e||"").replace(new RegExp(`${t.START_BLOCK}`,"g"),"").replace(new RegExp(`${t.END_BLOCK}`,"g"),"");var Uu=(n,t)=>ve(t,rn,n.createdAt);var on={};Se(on,{CONTENT_PLACEHOLDER:()=>R0,END_BLOCK:()=>D0,START_BLOCK:()=>O0});var R0="{updated-at}",O0="{updated-at-block}",D0="{end-updated-at-block}";var ju=(n,t)=>ve(t,on,n.updatedAt);var an={};Se(an,{CONTENT_PLACEHOLDER:()=>C0,END_BLOCK:()=>F0,START_BLOCK:()=>I0});var C0="{source-url}",I0="{source-url-block}",F0="{end-source-url-block}";var Hu=(n,t)=>ve(t,an,n.sourceUrl);var sn={};Se(sn,{CONTENT_PLACEHOLDER:()=>L0,END_BLOCK:()=>M0,START_BLOCK:()=>P0});var L0="{location}",P0="{location-block}",M0="{end-location-block}";var qu=(n,t)=>ve(t,sn,n.location);var ln={};Se(ln,{CONTENT_PLACEHOLDER:()=>$0,END_BLOCK:()=>U0,START_BLOCK:()=>B0});var $0="{notebook}",B0="{notebook-block}",U0="{end-notebook-block}";var Wu=(n,t)=>ve(t,ln,n.notebookName);var Rn={};Se(Rn,{CONTENT_PLACEHOLDER:()=>j0,END_BLOCK:()=>q0,START_BLOCK:()=>H0});var j0="{reminder-time}",H0="{reminder-time-block}",q0="{end-reminder-time-block}";var Zu=(n,t)=>ve(t,Rn,n.reminderTime);var On={};Se(On,{CONTENT_PLACEHOLDER:()=>W0,END_BLOCK:()=>Y0,START_BLOCK:()=>Z0});var W0="{reminder-order}",Z0="{reminder-order-block}",Y0="{end-reminder-order-block}";var Yu=(n,t)=>ve(t,On,n.reminderOrder);var Dn={};Se(Dn,{CONTENT_PLACEHOLDER:()=>z0,END_BLOCK:()=>V0,START_BLOCK:()=>G0});var z0="{reminder-done-time}",G0="{reminder-done-time-block}",V0="{end-reminder-done-time-block}";var zu=(n,t)=>ve(t,Dn,n.reminderDoneTime);var yi={};Se(yi,{CONTENT_PLACEHOLDER:()=>K0,END_BLOCK:()=>J0,START_BLOCK:()=>X0});var K0="{tags-yaml-list}",X0="{tags-yaml-list-block}",J0="{end-tags-yaml-list-block}";var Gu=(n,t,e)=>{let i;n.tags&&(i=` +`+n.tags.split(" ").map(o=>` - ${o.replace(/^#/,"")}`).join(` +`));let r=Mt(t,e,yi,i);return Pt(r)};var ja="{metadata-block}",Ha="{end-metadata-block}";var Vu=`\r? +?`;var de=(n,t)=>n.replace(new RegExp(`${t.START_BLOCK}(?<=${t.START_BLOCK})(.*)(?=${t.END_BLOCK})${t.END_BLOCK}${Vu}`,"g"),"");var Ku=n=>de(n,rn);var Xu=n=>de(n,on);var Ju=n=>de(n,an);var Qu=n=>de(n,ln);var ef=n=>de(n,sn);var Sr={};Se(Sr,{CONTENT_PLACEHOLDER:()=>ey,END_BLOCK:()=>ny,START_BLOCK:()=>ty});var ey="{link-to-original}",ty="{link-to-original-block}",ny="{end-link-to-original-block}";var tf=n=>de(n,Sr);var nf=n=>de(n,Rn);var rf=n=>de(n,Dn);var of=n=>de(n,On);var af=(n,t)=>{let e=t.currentTemplate;return e=Bu(n,e,()=>n.title),e=$u(n,e,()=>!t.skipTags),e=Gu(n,e,()=>!t.skipTags),e=Mu(n,e,()=>n.content),e=tf(e),e=!t.skipCreationTime&&n.createdAt?Uu(n,e):Ku(e),e=!t.skipUpdateTime&&n.updatedAt?ju(n,e):Xu(e),e=!t.skipSourceUrl&&n.sourceUrl?Hu(n,e):Ju(e),e=!t.skipLocation&&n.location?qu(n,e):ef(e),e=t.isNotebookNameNeeded&&n.notebookName?Wu(n,e):Qu(e),e=!t.skipReminderTime&&n.reminderTime?Zu(n,e):nf(e),e=!t.skipReminderOrder&&n.reminderOrder?Yu(n,e):of(e),e=!t.skipReminderDoneTime&&n.reminderDoneTime?zu(n,e):rf(e),e=e.replace(ja,"").replace(Ha,""),e};var sf=(n,t,e)=>{try{K.writeFileSync(n,t),Ar(n,e)}catch(i){throw console.error("Cannot write file ",i),i}};var lf=(n,t)=>{let e=ku(t);fe.getInstance().setCurrentNotePath(e),sf(e,n,t),console.log(`Note saved to ${e}`)};var ff=n=>{let t=new RegExp(`\\${q.sep}`,"g"),e=Nu(n).replace(t,B.pathSeparator||"/");return{absoluteResourceWorkDir:Ma(n),relativeResourceWorkDir:e}},df=n=>{let t={},e=n.content,{absoluteResourceWorkDir:i,relativeResourceWorkDir:r}=ff(n);if(console.log(`relative resource work dir: ${r}`),console.log(`absolute resource work dir: ${i}`),Su(n),Array.isArray(n.resource))for(let o of n.resource)t={...t,...pf(i,o)};else t={...t,...pf(i,n.resource)};for(let o of Object.keys(t))e=iy(e,t,o,r);return e},iy=(n,t,e,i)=>{let r=`${i}${B.pathSeparator}${t[e].fileName.replace(/ /g," ")}`;console.log(`mediaReference src ${r} added`);let o,a=`]*)hash="${e}".([^>]*)>`,s=new RegExp(a,"g"),l=n.match(s),c=l&&l.length>0&&l[0].split("type=");if(c&&c.length>1&&c[1].startsWith('"image')){let p=l[0].match(/width="(\w+)"/),m=p?` width="${p[1]}"`:"",y=l[0].match(/height="(\w+)"/),E=y?` height="${y[1]}"`:"";o=n.replace(s,`${t[e].fileName}`)}else o=n.replace(s,`${t[e].fileName}`);return o},pf=(n,t)=>{let e={},i=t.data.$text,r=Eu(t),a=iu(n,t).fileName,s=`${n}${q.sep}${a}`;console.log(t),console.log(i);let l=Buffer.from(i,"base64");K.writeFileSync(s,l);let c=r.valueOf()/1e3;try{K.utimesSync(s,c,c)}catch(p){}if(t.recognition&&a){let p=t.recognition.match(/[a-f0-9]{32}/);console.log(`resource ${a} added with hash ${p}`),e[p]={fileName:a,alreadyUsed:!1}}else{let p=uf.default.createHash("md5");p.update(l);let m=p.digest("hex");e[m]={fileName:a,alreadyUsed:!1}}return e},mf=(n,t)=>{if(t.indexOf('src="data:')<0)return t;let{absoluteResourceWorkDir:e,relativeResourceWorkDir:i}=ff(n);return K.mkdirSync(e,{recursive:!0}),t.replace(/src="data:([^;,]*)(;base64)?,([^"]*)"/g,(r,o,a,s)=>{let l=ry(o,a===";base64",s,e,n);return`src="${`${i}${B.pathSeparator}${l}`}"`})},ry=(n,t,e,i,r)=>{let o="embedded",a=oy(n)||".dat",s=hi(i,o),l=s<1?`${o}.${a}`:`${o}.${s}.${a}`,c=`${i}${q.sep}${l}`;return t||(e=decodeURIComponent(e)),K.writeFileSync(c,e,t?"base64":void 0),Ar(c,r),console.log(`data url resource ${l} added`),l},oy=n=>n.split("/").pop().split("+")[0];var hf=(n,t)=>{let e=new Date;fe.getInstance().setCurrentNoteName(n.title),Array.isArray(n.content)&&(n.content=n.content.join(""));let r={title:n.title,content:n.content,htmlContent:n.content,originalContent:n.content};console.log(`Converting for note "${r.title}" started at ${e}...`);try{Lu(n)&&(r.htmlContent=df(n)),r.htmlContent=mf(n,r.htmlContent),r={...r,...xu(B,r)},r={...r,...wu(n,t)},r={...r,...vu(n)};let o=af(r,B);lf(o,n)}catch(o){throw console.error(`Failed to convert note: ${r.title}`,o),o}finally{let o=new Date,a=(o.getTime()-e.getTime())/1e3;console.log(`Conversion for note "${r.title}" finished at ${o}. Took ${a} seconds`)}};var bf=require("obsidian");var gf=n=>n.taskstatus==="open"?_r:Tr;var ay="\u{1F53C}",sy="\u{1F53D}",ly="\u{1F4C5}",cy="\u23F3",xf=(n,t)=>{let e=gf(n),i=n.title?` ${n.title}`:"",r=B.obsidianTaskTag!==""?` ${B.obsidianTaskTag}`:"",o=n.duedate&&!isNaN(n.duedate.getTime())?` ${ly} ${yf(n.duedate)}`:"",a=n.reminderdate?` ${cy} ${yf(n.reminderdate)}`:"",s=n.taskflag?` ${ay}`:` ${sy}`;return`${e}${r}${i}${o}${a}${s}`},yf=n=>(0,bf.moment)(n).format("YYYY-MM-DD").toString();var Wa=(n,t,e)=>{let i=K.readdirSync(n);return t=t||[],i.forEach(r=>{K.statSync(`${n}${q.sep}${r}`).isDirectory()?t=Wa(`${n}${q.sep}${r}`,t,e):(e&&q.extname(r)==`.${e}`||!e)&&t.push(q.join(n,"/",r))}),t};var wf=(n,t)=>{let i=fe.getInstance().getAllNoteIdNameMap(),r=Object.entries(i);if(r.length===0)return;console.log("About to update links...");let o=[];for(let a of t)Wa(a,o,"");for(let a of t){console.log(`Notebook: ${a}`);let l=K.readdirSync(a).filter(c=>q.extname(c).toLowerCase()===".md");console.log(`${l.length} files to check for links`);for(let c of l){let p=q.join(a,c),m=K.readFileSync(p,"utf8"),y=m;for(let[E,v]of r){let d=v.uniqueEnd,f=v.title;o.find(D=>D.includes(d))&&(f=Au(f,d));let g=v.notebookName,w=n.urlEncodeFileNamesAndLinks?encodeURI(f):f,T=w;g&&!a.endsWith(g)&&(T=`${g}/${w}`);let A=new RegExp(Nn(E),"g");y=y.replace(A,T)}m!==y&&(console.log(`File written: ${p}`),K.writeFileSync(p,y))}}console.log("Link update complete.")};var vf=n=>cn(rn,n);var Ef=n=>cn(sn,n),_f=n=>cn(ln,n);var Tf=n=>cn(an,n),Af=n=>cn(gi,n)||cn(yi,n);var kf=n=>cn(on,n),cn=(n,t)=>t.includes(n.START_BLOCK)&&t.includes(n.CONTENT_PLACEHOLDER)&&t.includes(n.END_BLOCK);var Nf=`--- +`,py=`{source-url-block}source: {source-url}{end-source-url-block} +`,uy=`{tags-yaml-list-block} +tags: {tags-yaml-list} + +{end-tags-yaml-list-block}`,fy=`{content-block}{content}{end-content-block} +`,Sf=Nf+uy+py+Nf+fy;var Sy=Mf.Platform.isDesktopApp?Pf():null,Dr={enexSources:[],currentTemplate:"",outputDir:"./mdNotes",isMetadataNeeded:!1,isNotebookNameNeeded:!1,isZettelkastenNeeded:!1,useZettelIdAsFilename:!1,plainTextNotesOnly:!1,skipWebClips:!1,useHashTags:!0,nestedTags:{separatorInEN:"_",replaceSeparatorWith:"/",replaceSpaceWith:"-"},obsidianTaskTag:"",urlEncodeFileNamesAndLinks:!1,sanitizeResourceNameSpaces:!1,replacementChar:"_",pathSeparator:"/",resourcesDir:"_resources",turndownOptions:{headingStyle:"atx"}},Ry="@@@",B={...Dr};function Oy(n){return n==null?n:JSON.parse(JSON.stringify(n))}function $f(n,...t){for(let e of t)for(let i of Object.keys(e)){let r=e[i],o=n[i];!Array.isArray(r)&&typeof r=="object"&&!Array.isArray(o)&&typeof o=="object"?n[i]=$f({},o,r):n[i]=Oy(r)}return n}var Dy=n=>{B=$f({},Dr,n);let t=B.templateFile?K.readFileSync(B.templateFile,"utf-8"):Sf;t=B.currentTemplate?B.currentTemplate:t,B.skipCreationTime=!vf(t),B.skipLocation=!Ef(t),B.skipSourceUrl=!Tf(t),B.skipTags=!Af(t),B.skipUpdateTime=!kf(t),B.isNotebookNameNeeded=_f(t),B.currentTemplate=t,console.log(`Current config is: ${JSON.stringify(B,null,4)}`),console.log(`Path separator:${q.sep}`)},Cy=async(n,t,e)=>{if(!(t instanceof Me))throw new Error("Evernote import currently only works on desktop");let i=fe.getInstance();e.status("Processing "+t.name),console.log(`Getting stream from ${t}`);let r=t.createReadStream(),o={},a=i.getCurrentNotebookName();return new Promise((s,l)=>{let c=y=>(e.reportFailed(i.getCurrentNotebookFullpath(),y),l(y)),p=Sy(r),m=null;p.on("tag:note-attributes",y=>{m=y}),p.on("tag:note",y=>{if(e.isCancelled()){r.close();return}if(n.skipWebClips&&Pu(y))e.reportSkipped(y.title);else{e.status("Importing note "+y.title),m&&(y["note-attributes"]=m);try{hf(y,a),e.reportNoteSuccess(a+"/"+y.title)}catch(v){return e.reportFailed(y.title||t,v),s()}}m=null;let E=i.getCurrentNotePath();if(E)for(let v of Object.keys(o)){let d=`${v}`,f=K.readFileSync(E,"utf8"),g=new Map([...o[v]].sort()),w=f.replace(d,[...g.values()].join(` +`));K.writeFileSync(E,w)}}),p.on("tag:task",y=>{let E=Zp(y);o[E.taskgroupnotelevelid]||(o[E.taskgroupnotelevelid]=new Map),o[E.taskgroupnotelevelid].set(E.sortweight,xf(E,a))}),p.on("end",s),p.on("error",c),r.on("error",c)})};async function Bf(n,t){Dy(n);let e=[],i=n.outputDir;for(let r of n.enexSources){if(t.isCancelled())return;let o,a=fe.getInstance();r.basename.includes(Ry)?(n.outputDir=Du(r,n),o=Ou(r),Iu(o,n),a.setCurrentNotebookName(o.basename),a.setCurrentNotebookFullpath(o.fullpath)):(Cu(r,n),a.setCurrentNotebookName(r.basename),a.setCurrentNotebookFullpath(r.fullpath)),await Cy(n,r,t),e.push($a()),n.outputDir=i}t.isCancelled()||await wf(n,e)}var Cr=class extends ce{init(){this.addFileChooserSetting("Evernote",["enex"],!0),this.addOutputLocationSetting("Evernote")}async import(t){let{files:e}=this;if(e.length===0){new xi.Notice("Please pick at least one file to import.");return}let i=await this.getOutputFolder();if(!i){new xi.Notice("Please select a location to export to.");return}let{app:r}=this,o=r.vault.adapter;if(!(o instanceof xi.FileSystemAdapter))return;let a={...Dr,enexSources:e,outputDir:q.join(o.getBasePath(),i.path)};await Bf(a,t)}};var ke=require("obsidian");var Ir=class extends ce{init(){this.addFileChooserSetting("HTML",["htm","html"],!0),this.addAttachmentSizeLimit(0),this.addMinimumImageSize(65),this.addOutputLocationSetting("HTML import")}addAttachmentSizeLimit(e){this.attachmentSizeLimit=e*10**6,new ke.Setting(this.modal.contentEl).setName("Attachment size limit (MB)").setDesc("Set 0 to disable.").addText(i=>i.then(({inputEl:r})=>{r.type="number",r.step="0.1"}).setValue(e.toString()).onChange(r=>{let o=["+","-"].includes(r)?0:Number(r);if(Number.isNaN(o)||o<0){i.setValue((this.attachmentSizeLimit/10**6).toString());return}this.attachmentSizeLimit=o*10**6}))}addMinimumImageSize(e){this.minimumImageSize=e,new ke.Setting(this.modal.contentEl).setName("Minimum image size (px)").setDesc("Set 0 to disable.").addText(i=>i.then(({inputEl:r})=>r.type="number").setValue(e.toString()).onChange(r=>{let o=["+","-"].includes(r)?0:Number(r);if(!Number.isInteger(o)||o<0){i.setValue(this.minimumImageSize.toString());return}this.minimumImageSize=o}))}async import(e){let{files:i}=this;if(i.length===0){new ke.Notice("Please pick at least one file to import.");return}let r=await this.getOutputFolder();if(!r){new ke.Notice("Please select a location to export to.");return}let o=new Map;e.reportProgress(0,i.length);for(let c=0;c{s=c});a.onCleanCache(async()=>{for(let[c,{file:p,tFile:m}]of o){if(e.isCancelled())break;try{let y=await this.app.vault.cachedRead(m),E=a.computeMetadataAsync?await a.computeMetadataAsync(Oo(y)):a.getFileCache(m);if(!E)continue;let v=[];if(E.links)for(let{link:d,position:f,displayText:g}of E.links){let{path:w,subpath:T}=(0,ke.parseLinktext)(d),A;if(Xn){let _=new URL(encodeURI(w),c);_.hash="",_.search="",A=decodeURIComponent(_.href)}else A=oe(w.replace(/#/gu,"%23")).name;let D=o.get(A);if(D){let _=this.app.fileManager.generateMarkdownLink(D.tFile,m.path,T,g);v.push({from:f.start.offset,to:f.end.offset,text:_})}}v.sort((d,f)=>f.from-d.from);for(let d of v)y=y.substring(0,d.from)+d.text+y.substring(d.to);await this.vault.modify(m,y)}catch(y){e.reportFailed(p.fullpath,y)}}s()}),await l}async processFile(e,i,r){e.status("Processing "+r.name);try{let o=await r.readText(),a=ft(o);Iy(a);let s=r instanceof Me?Xn.pathToFileURL(r.filepath):void 0,l=new Map,c=new Map;for(let y of a.findAll("img, audio, video")){if(e.isCancelled())return;let E=y.getAttribute("src");if(E)try{let v=new URL(E.startsWith("//")?`https:${E}`:E,s),d=v.href,f=l.get(d);l.has(d)||(e.status("Downloading attachment for "+r.name),f=await this.downloadAttachment(i,y,v),l.set(d,f),f?(c.set(f.path,f),e.reportAttachmentSuccess(f.name)):e.reportSkipped(E)),f&&(y.setAttribute("src",f.path.replace(/ /g,"%20")),y instanceof HTMLImageElement||y.replaceWith(createEl("img",{attr:{src:f.path.replace(/ /g,"%20"),alt:y.getAttr("alt")}})))}catch(v){e.reportFailed(E,v)}}let p=(0,ke.htmlToMarkdown)(a),m=await this.saveAsMarkdownFile(i,r.basename,p);if(!Object.isEmpty(l)){let{metadataCache:y}=this.app,E;y.computeMetadataAsync?E=await y.computeMetadataAsync(Oo(p)):E=await new Promise(d=>{let f=y.getFileCache(m);if(f)return d(f);let g=y.on("changed",(w,T,A)=>{w===m&&(y.offref(g),d(A))})});let v=[];if(E.embeds){for(let{link:d,position:f}of E.embeds)if(c.has(d)){let g=this.app.fileManager.generateMarkdownLink(c.get(d),m.path);v.push({from:f.start.offset,to:f.end.offset,text:g})}}v.sort((d,f)=>f.from-d.from);for(let d of v)p=p.substring(0,d.from)+d.text+p.substring(d.to);await this.vault.modify(m,p)}return e.reportNoteSuccess(r.fullpath),m}catch(o){e.reportFailed(r.fullpath,o)}return null}async downloadAttachment(e,i,r){let o="",a="",s;switch(r.protocol){case"file:":let p=Xn.fileURLToPath(r.href);({basename:o,extension:a}=oe(p)),s=Zi(await Pe.readFile(p));break;case"https:":case"http:":let m=await Ly(r),y=Fy(r);o=y.basename,s=m.data,a=vr(m.mime)||y.extension;break;default:throw new Error(r.href)}if(!this.filterAttachmentSize(s)||i instanceof HTMLImageElement&&!await this.filterImageSize(s))return null;if(!a)if(i instanceof HTMLImageElement)a="png";else if(i instanceof HTMLAudioElement)a="mp3";else if(i instanceof HTMLVideoElement)a="mp4";else return null;let l=await this.createFolders((0,ke.normalizePath)(e.path+"/Attachments")),c=await this.vault.getAvailablePath(l.getParentPrefix()+o,a);return await this.vault.createBinary(c,s)}filterAttachmentSize(e){let{byteLength:i}=e;return!this.attachmentSizeLimit||i<=this.attachmentSizeLimit}async filterImageSize(e){if(!this.minimumImageSize)return!0;let i;try{i=await Py(e)}catch(a){return!0}let{height:r,width:o}=i;return o>=this.minimumImageSize&&r>=this.minimumImageSize}};function Uf(n,t){let e=n.getAttribute(t);e!==null&&n.setAttribute(t,e.replace(/ /gu,"%20"))}function Iy(n){n.findAll("a").forEach(t=>Uf(t,"href")),n.findAll("audio, img, video").forEach(t=>Uf(t,"src"))}function Fy(n){return oe((0,ke.normalizePath)(decodeURIComponent(n.pathname)))}async function Ly(n){var e,i;try{let r=await fetch(n,{mode:"cors",referrerPolicy:"no-referrer"});if(r.ok)return{data:await r.arrayBuffer(),mime:(e=r.headers.get("Content-Type"))!=null?e:""}}catch(r){}let t=await(0,ke.requestUrl)(n.href);return{data:t.arrayBuffer,mime:(i=t.headers["Content-Type"])!=null?i:""}}async function Py(n){let t=new Image,e=URL.createObjectURL(new Blob([n]));try{return await new Promise((i,r)=>{t.addEventListener("error",({error:o})=>r(o),{once:!0,passive:!0}),t.addEventListener("load",()=>i({height:t.naturalHeight,width:t.naturalWidth}),{once:!0,passive:!0}),t.src=e})}finally{URL.revokeObjectURL(e)}}var In=require("obsidian");var My=/(#[^ ^#]*)/g,$y=/[\\:*?<>\"|!@#$%^&()+=\`\'~;,.]/g;function za(n){let t=n.replace($y,"");return t=t.split(" ").join("-"),isNaN(t[0])||(t="_"+t),t}function Ga(n){return n.replace(My,t=>"#"+za(t))}function jf(n){return n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()}var By=["zip"],Uy=["json"],jy=["html","txt"],Fr=class extends ce{constructor(){super(...arguments);this.importArchived=!1;this.importTrashed=!1}init(){this.addFileChooserSetting("Notes & attachments",[...By,...Uy,...Fn],!0),this.importArchivedSetting=new In.Setting(this.modal.contentEl).setName("Import archived notes").setDesc("If imported, files archived in Google Keep will be tagged as archived.").addToggle(e=>{e.setValue(this.importArchived),e.onChange(async i=>{this.importArchived=i})}),this.importTrashedSetting=new In.Setting(this.modal.contentEl).setName("Import deleted notes").setDesc("If imported, files deleted in Google Keep will be tagged as deleted. Deleted notes will only exist in your Google export if deleted recently.").addToggle(e=>{e.setValue(this.importTrashed),e.onChange(async i=>{this.importTrashed=i})}),this.addOutputLocationSetting("Google Keep")}async import(e){let{files:i}=this;if(i.length===0){new In.Notice("Please pick at least one file to import.");return}let r=await this.getOutputFolder();if(!r){new In.Notice("Please select a location to import your files to.");return}let o=`${r.path}/Assets`;for(let a of i){if(e.isCancelled())return;await this.handleFile(a,r,o,e)}}async handleFile(e,i,r,o){let{fullpath:a,name:s,extension:l}=e;o.status("Processing "+s);try{l==="zip"?await this.readZipEntries(e,i,r,o):l==="json"?await this.importKeepNote(e,i,o):Fn.contains(l)?(o.status("Importing attachment "+s),await this.copyFile(e,r),o.reportAttachmentSuccess(a)):!(e instanceof ui)&&!jy.contains(l)&&o.reportSkipped(a)}catch(c){o.reportFailed(a,c)}}async readZipEntries(e,i,r,o){await gt(e,async(a,s)=>{for(let l of s){if(o.isCancelled())return;await this.handleFile(l,i,r,o)}})}async importKeepNote(e,i,r){let{fullpath:o,basename:a}=e;r.status("Importing note "+a);let s=await e.readText(),l=JSON.parse(s);if(!l||!l.userEditedTimestampUsec||!l.createdTimestampUsec){r.reportFailed(o,"Invalid Google Keep JSON");return}if(l.isArchived&&!this.importArchived){r.reportSkipped(o,"Archived note");return}if(l.isTrashed&&!this.importTrashed){r.reportSkipped(o,"Deleted note");return}await this.convertKeepJson(l,i,a),r.reportNoteSuccess(o)}async copyFile(e,i){let r=await this.createFolders(i),o=await e.read();await this.vault.createBinary(`${r.path}/${e.name}`,o)}async convertKeepJson(e,i,r){let o=[],a={};if(e.title){let c=e.title.split(` +`).filter(p=>p!==r);c.length>0&&(a.aliases=c)}let s=[];if(e.color&&e.color!=="DEFAULT"){let c=e.color.toLowerCase();c=jf(c),s.push(`Keep/Color/${c}`)}if(e.isPinned&&s.push("Keep/Pinned"),e.attachments&&s.push("Keep/Attachment"),e.isArchived&&s.push("Keep/Archived"),e.isTrashed&&s.push("Keep/Deleted"),e.labels)for(let c of e.labels)s.push(`Keep/Label/${c.name}`);if(s.length>0&&(a.tags=s.map(c=>za(c))),o.push(Yi(a)),e.textContent&&(o.push(` +`),o.push(Ga(e.textContent))),e.listContent){let c=[];for(let p of e.listContent){if(!p.text)continue;let m=`- [${p.isChecked?"X":" "}] ${p.text}`;c.push(Ga(m))}o.push(` + +`),o.push(c.join(` +`))}if(e.attachments){o.push(` + +`);for(let c of e.attachments)o.push(`![[${c.filePath}]]`)}let l=await this.saveAsMarkdownFile(i,r,o.join(""));await this.vault.append(l,"",{ctime:e.createdTimestampUsec/1e3,mtime:e.userEditedTimestampUsec/1e3})}};var xt=require("obsidian");var Va=require("obsidian");function Hf({info:n,vault:t,targetFolderPath:e,parentsInSubfolders:i}){let r=t.getAllLoadedFiles(),o=new Set,a=new Set(r.map(s=>s.name));i&&qy(n),Hy({info:n,pathDuplicateChecks:o,titleDuplicateChecks:a}),Wy({info:n,loadedFiles:r,titleDuplicateChecks:a,targetFolderPath:e})}function Hy({info:n,pathDuplicateChecks:t,titleDuplicateChecks:e}){for(let i of Object.values(n.idsToFileInfo)){let r=n.getPathForFile(i);if(t.has(`${r}${i.title}`)){let o=2;for(i.title=i.title+" "+o;t.has(`${r}${i.title}`);)o++,i.title=`${i.title.replace(/ \d+$/,"")} ${o}`}e.has(i.title+".md")&&(i.fullLinkPathNeeded=!0),t.add(`${r}${i.title}`),e.add(i.title+".md")}}function qy(n){let t=new Set(Object.values(n.idsToFileInfo).map(e=>e.parentIds).concat(Object.values(n.pathsToAttachmentInfo).map(e=>e.parentIds)).map(e=>e.length>0?e[e.length-1]:""));for(let e of Object.keys(n.idsToFileInfo))t.has(e)&&n.idsToFileInfo[e].parentIds.push(e)}function Wy({info:n,loadedFiles:t,titleDuplicateChecks:e,targetFolderPath:i}){var l;let r=new Set(t.filter(c=>!c.path.endsWith(".md")).map(c=>c.path)),o=n.attachmentPath,a=/^\.\//.test(o),s=(l=o.match(/\.\/(.*)/))==null?void 0:l[1];for(let c of Object.values(n.pathsToAttachmentInfo)){e.has(c.nameWithExtension)&&(c.fullLinkPathNeeded=!0);let p="";if(a?p=(0,Va.normalizePath)(`${i}${n.getPathForFile(c)}${s!=null?s:""}`):p=(0,Va.normalizePath)(o+"/"),p.endsWith("/")||(p+="/"),r.has(p+c.nameWithExtension)){let m=2,{basename:y,extension:E}=oe(c.path);for(;r.has(`${p}${y} ${m}.${E}`);)m++;c.nameWithExtension=`${y} ${m}.${E}`}c.targetParentFolder=p,r.add(p+c.nameWithExtension),e.add(c.nameWithExtension)}}var Ln=require("obsidian");var qf=n=>n.replace(/-/g,"").replace(/[ -]?[a-z0-9]{32}(\.|$)/,"$1"),bt=n=>{var t;return(t=n.replace(/-/g,"").match(/([a-z0-9]{32})(\?|\.|$)/))==null?void 0:t[1]},Ka=n=>{let{parent:t}=oe(n);return t.split("/").map(e=>bt(e)).filter(e=>e)};function Xa(n){return n.hour()===0&&n.minute()===0?n.format("YYYY-MM-DD"):n.format("YYYY-MM-DDTHH:mm")}function Wf(n){return n.replace(/^(\.\.\/)+/,"")}function Zf(n){let t=/#[a-z0-9\-]+/gi;if(!t.test(n))return n;let e=n.split(` +`);for(let i=0;i tbody");if(s){let y=zf(n,s);Qf(n,y,!1),i1(s);for(let E of Array.from(s.rows)){let v=Zy(E);v&&(v.title=="Tags"&&(v.title="tags",typeof v.content=="string"?v.content=v.content.replace(/ /g,"-"):v.content instanceof Array&&(v.content=v.content.map(d=>d.replace(/ /g,"-")))),a[v.title]=v.content)}}Gf(r,"strong"),Gf(r,"em"),Ky(r),Vy(r),e1(r),Qy(r),nd(r),zy(r),Xf(r,"div.indented"),Xf(r,"details"),t1(r),Jf(r,"ul"),Jf(r,"ol"),n1(r),Jy(r),Xy(r);let l=r.innerHTML;Vf(l,"strong"),Vf(l,"em");let c=(0,Ln.htmlToMarkdown)(l);n.singleLineBreaks&&(c=c.replace(/\n\n(?!>)/g,` +`)),c=Zf(c),c=Yy(c);let p=(m=i.find("p[class*=page-description]"))==null?void 0:m.textContent;return p&&(c=p+` + +`+c),Yi(a)+c}var Yf={checkbox:["checkbox"],date:["created_time","last_edited_time","date"],list:["file","multi_select","relation"],number:["number","auto_increment_id"],text:["email","person","phone_number","text","url","status","select","formula","rollup","last_edited_by","created_by"]};function Zy(n){var a,s,l,c,p,m;let t=(a=n.className.match(/property-row-(.*)/))==null?void 0:a[1];if(!t)throw new Error("property type not found for: "+n);let e=(0,Ln.htmlToMarkdown)((s=n.cells[0].textContent)!=null?s:""),i=n.cells[1],r=Object.keys(Yf).find(y=>Yf[y].includes(t));if(!r)throw new Error("type not found for: "+i);let o="";switch(r){case"checkbox":o=i.innerHTML.includes("checkbox-on");break;case"number":if(o=Number(i.textContent),isNaN(o))return;break;case"date":nd(i);let y=i.getElementsByTagName("time");if(y.length===0)o="";else if(y.length===1)o=Xa((0,Ln.moment)((l=y.item(0))==null?void 0:l.textContent));else{let d=[];for(let f=0;fl.includes(o));a&&o.endsWith(".html")?e.push({type:"relation",a:r,id:a}):s&&e.push({type:"attachment",a:r,path:s})}return e}function Yy(n){let t=/\[\[[^\]]*(\\\\)\|[^\]]*\]\]/,e=n.match(new RegExp(t,"g"));return e==null||e.forEach(i=>{n=n.replace(i,i.replace(/\\\\\|/g,"\\|"))}),n}function zy(n){let t=n.findAll(".katex");for(let e of t){let i=e.find("annotation");i&&(i.setText(`$${i.textContent}$`),e.replaceWith(i))}}function Gy(n){var e;let t=(e=n.match(/^[^\.\?\!\n]*[\.\?\!]?/))==null?void 0:e[0];return t!=null?t:""}function td(n){var t;return!!/callout|bookmark/.test((t=n.getAttribute("class"))!=null?t:"")}function Vy(n){for(let t of n.findAll("figure.callout")){let i=`> [!important] +> ${t.children[1].textContent} +`;t.nextElementSibling&&td(t.nextElementSibling)&&(i+=` +`),t.replaceWith(i)}}function Ky(n){var t,e,i;for(let r of n.findAll("a.bookmark.source")){let o=r.getAttribute("href"),a=(t=r.find("div.bookmark-title"))==null?void 0:t.textContent,s=Gy((i=(e=r.find("div.bookmark-description"))==null?void 0:e.textContent)!=null?i:""),l=`> [!info] ${a} +> ${s} +> [${o}](${o}) +`;r.nextElementSibling&&td(r.nextElementSibling)&&(l+=` +`),r.replaceWith(l)}}function Xy(n){var t,e,i;for(let r of n.findAll("span[class=user]"))r.innerText=(t=r.textContent)!=null?t:"";for(let r of n.findAll("td div[class*=checkbox]")){let o=createSpan();o.setText(r.hasClass("checkbox-on")?"X":""),r.replaceWith(o)}for(let r of n.findAll("table span[class*=selected-value]"))((e=r.parentElement)==null?void 0:e.lastElementChild)!==r&&r.setText(r.textContent+", ");for(let r of n.findAll("a[href]"))if(!/^(https?:\/\/|www\.)/.test(r.href)){let o=createSpan();o.setText((i=r.textContent)!=null?i:""),r.replaceWith(o)}}function Gf(n,t){for(let e of n.findAll(t)){if(!e.parentElement||e.parentElement.tagName===t.toUpperCase())continue;let i=e.find(t);for(;i;)Ja(i),i=e.find(t)}}function Vf(n,t){let e=n.match(new RegExp(`<${t}>(.| +)*`));if(e)for(let i of e.filter(r=>r.contains("
    ")))n=n.replace(i,i.split("
    ").join(`
    <${i}>`))}function Jy(n){var e;let t=n.findAll("a[href*=\\#]");for(let i of t)(e=i.getAttribute("href"))!=null&&e.startsWith("#")&&i.setAttribute("href","#"+i.textContent)}function Qy(n){n.innerHTML=n.innerHTML.replace(/\n/g,"
    ");for(let t of n.findAll("code"))for(let e of t.findAll("br"))e.replaceWith(` +`)}function e1(n){var t;for(let e of n.findAll("link"))e.innerText=(t=e.textContent)!=null?t:""}function nd(n){var t,e;for(let i of n.findAll("time"))i.textContent=(e=(t=i.textContent)==null?void 0:t.replace(/@/g,""))!=null?e:""}var Kf={"1.875em":"h1","1.5em":"h2","1.25em":"h3"};function t1(n){var e;let t=n.findAll("summary");for(let i of t){let r=i.getAttribute("style");if(r){for(let o of Object.keys(Kf))if(r.includes(o)){i.replaceWith(createEl(Kf[o],{text:(e=i.textContent)!=null?e:""}));break}}}}function Xf(n,t){let e=n.findAll(t);for(let i of e)Ja(i)}function Jf(n,t){for(let e of n.findAll(t)){let i=[],r=[],o=e;for(;o.tagName===t.toUpperCase();){i.push(o);for(let s=0;ss.remove())}}function n1(n){for(let t of n.findAll(".checkbox.checkbox-on"))t.replaceWith("[x] ");for(let t of n.findAll(".checkbox.checkbox-off"))t.replaceWith("[ ] ")}function i1(n){var e;let t=n.findAll("a");if(t.length===0)return n;for(let i of t){let r=createSpan();r.setText((e=i.getAttribute("href"))!=null?e:""),i.replaceWith(r)}}function Qf(n,t,e){var i;for(let r of t){let o=createSpan(),a;switch(r.type){case"relation":let s=n.idsToFileInfo[r.id];if(s){let c=r.a.closest("table");a=`[[${s.fullLinkPathNeeded?`${n.getPathForFile(s)}${s.title}${c?"\\":""}|${s.title}`:s.title}]]`}else{console.warn("missing relation data for id: "+r.id);let{basename:c}=oe(decodeURI((i=r.a.getAttribute("href"))!=null?i:""));a=`[[${qf(c)}]]`}break;case"attachment":let l=n.pathsToAttachmentInfo[r.path];if(!l){console.warn("missing attachment data for: "+r.path);continue}a=`${e?"!":""}[[${l.fullLinkPathNeeded?l.targetParentFolder+l.nameWithExtension+"|"+l.nameWithExtension:l.nameWithExtension}]]`;break}o.setText(a),r.a.replaceWith(o)}}var Lr=class{constructor(t,e){this.idsToFileInfo={};this.pathsToAttachmentInfo={};this.attachmentPath=t,this.singleLineBreaks=e}getPathForFile(t){let{idsToFileInfo:e}=this,i=t.path.split("/");return t.parentIds.map(r=>{var o,a,s;return(s=(o=e[r])==null?void 0:o.title)!=null?s:(a=i.find(l=>l.contains(r)))==null?void 0:a.replace(` ${r}`,"")}).filter(r=>r).map(r=>r.replace(/[\. ]+$/,"")).join("/")+"/"}};async function rd(n,t){var i,r;let{filepath:e}=t;if(t.extension==="html"){let o=await t.readText(),a=ft(o),l=a.find("body").children,c;for(let v=0;ve.setValue(this.parentsInSubfolders).onChange(i=>this.parentsInSubfolders=i)),new xt.Setting(this.modal.contentEl).setName("Single line breaks").setDesc("Separate Notion blocks with only one line break (default is 2).").addToggle(e=>e.setValue(this.singleLineBreaks).onChange(i=>{this.singleLineBreaks=i}))}async import(e){var E;let{vault:i,parentsInSubfolders:r,files:o}=this;if(o.length===0){new xt.Notice("Please pick at least one file to import.");return}let a=await this.getOutputFolder();if(!a){new xt.Notice("Please select a location to export to.");return}let s=a.path;s=(0,xt.normalizePath)(s),s!=null&&s.endsWith("/")||(s+="/");let l=new Lr((E=i.getConfig("attachmentFolderPath"))!=null?E:"",this.singleLineBreaks);e.status("Looking for files to import");let c=0;if(await Qa(e,o,async v=>{try{await rd(l,v),c=Object.keys(l.idsToFileInfo).length+Object.keys(l.pathsToAttachmentInfo).length,e.reportProgress(0,c)}catch(d){e.reportSkipped(v.fullpath)}}),e.isCancelled())return;e.status("Resolving links and de-duplicating files"),Hf({vault:i,info:l,targetFolderPath:s,parentsInSubfolders:r});let p=new Set([s]),m=Object.values(l.idsToFileInfo).map(v=>s+l.getPathForFile(v)).concat(Object.values(l.pathsToAttachmentInfo).map(v=>v.targetParentFolder));for(let v of m)p.add(v);for(let v of p){if(e.isCancelled())return;await this.createFolders(v)}let y=0;e.status("Starting import"),await Qa(e,o,async v=>{y++,e.reportProgress(y,c);try{if(v.extension==="html"){let d=bt(v.name);if(!d)throw new Error("ids not found for "+v.filepath);let f=l.idsToFileInfo[d];if(!f)throw new Error("file info not found for "+v.filepath);e.status(`Importing note ${f.title}`);let g=await ed(l,v),w={};f.ctime&&(w.ctime=f.ctime.getTime(),w.mtime=f.ctime.getTime()),f.mtime&&(w.mtime=f.mtime.getTime());let T=`${s}${l.getPathForFile(f)}${f.title}.md`;await i.create(T,g,w),e.reportNoteSuccess(v.fullpath)}else{let d=l.pathsToAttachmentInfo[v.filepath];if(!d)throw new Error("attachment info not found for "+v.filepath);e.status(`Importing attachment ${v.name}`);let f=await v.read();await i.createBinary(`${d.targetParentFolder}${d.nameWithExtension}`,f),e.reportAttachmentSuccess(v.fullpath)}}catch(d){if(d.message==="page body was not found"){e.reportSkipped(v.fullpath,"page body was not found");return}e.reportFailed(v.fullpath,d)}})}};async function Qa(n,t,e){for(let i of t){if(n.isCancelled())return;try{await gt(i,async(r,o)=>{for(let a of o){if(n.isCancelled())return;if(a.extension==="md"&&bt(a.name))throw new xt.Notice("Notion Markdown export detected. Please export Notion data to HTML instead."),n.cancel(),new Error("Notion importer uses only HTML exports. Please use the correct format.");if(!(a.extension==="csv"&&bt(a.name))&&a.name!=="index.html")if(a.extension==="zip"&&a.parent==="")try{await Qa(n,[a],e)}catch(s){n.reportFailed(a.fullpath)}else await e(a)}})}catch(r){n.reportFailed(i.fullpath)}}}var Ee=require("obsidian");var od="66553851-08fa-44f2-8bb1-1436f121a73d",ad=["user.read","notes.read"],a1=/<(object|iframe)([^>]*)\/>/g,sd=/(<\/p>)\s*(]*>)|\n \n/g,s1=5,Mr=class extends ce{constructor(){super(...arguments);this.useDefaultAttachmentFolder=!0;this.importIncompatibleAttachments=!1;this.selectedIds=[];this.notebooks=[];this.graphData={state:xn(32),accessToken:""}}init(){this.addOutputLocationSetting("OneNote"),new Ee.Setting(this.modal.contentEl).setName("Use the default attachment folder").setDesc("If disabled, attachments will be stored in the export folder in the OneNote Attachments folder.").addToggle(e=>e.setValue(!0).onChange(i=>this.useDefaultAttachmentFolder=i)),new Ee.Setting(this.modal.contentEl).setName("Import incompatible attachments").setDesc("Imports incompatible attachments which cannot be embedded in Obsidian, such as .exe files.").addToggle(e=>e.setValue(!1).onChange(i=>this.importIncompatibleAttachments=i)),this.microsoftAccountSetting=new Ee.Setting(this.modal.contentEl).setName("Sign in with your Microsoft account").setDesc("You need to sign in to import your OneNote data.").addButton(e=>e.setCta().setButtonText("Sign in").onClick(()=>{this.registerAuthCallback(this.authenticateUser.bind(this));let i=new URLSearchParams({client_id:od,scope:ad.join(" "),response_type:"code",redirect_uri:$r,response_mode:"query",state:this.graphData.state});window.open(`https://login.microsoftonline.com/common/oauth2/v2.0/authorize?${i.toString()}`)})),this.contentArea=this.modal.contentEl.createEl("div")}async authenticateUser(e){try{if(e.state!==this.graphData.state)throw new Error(`An incorrect state was returned. +Expected state: ${this.graphData.state} +Returned state: ${e.state}`);let i=new URLSearchParams({client_id:od,scope:ad.join(" "),code:e.code,redirect_uri:$r,grant_type:"authorization_code"}),r=await(0,Ee.requestUrl)({method:"POST",url:"https://login.microsoftonline.com/common/oauth2/v2.0/token",contentType:"application/x-www-form-urlencoded",body:i.toString()}).json;if(!r.access_token)throw new Error(`Unexpected data was returned instead of an access token. Error details: ${r}`);this.graphData.accessToken=r.access_token,this.selectedIds=[];let o=await this.fetchResource("https://graph.microsoft.com/v1.0/me","json");this.microsoftAccountSetting.setDesc(`Signed in as ${o.displayName} (${o.mail}). If that's not the correct account, sign in again.`),await this.showSectionPickerUI()}catch(i){console.error("An error occurred while we were trying to sign you in. Error details: ",i),this.modal.contentEl.createEl("div",{text:"An error occurred while trying to sign you in."}).createEl("details",{text:i}).createEl("summary",{text:"Click here to show error details"})}}async showSectionPickerUI(){var o,a;let e="https://graph.microsoft.com/v1.0/me/onenote/notebooks",i=new URLSearchParams({$expand:"sections($select=id,displayName),sectionGroups($expand=sections,sectionGroups)",$select:"id,displayName,lastModifiedDateTime",$orderby:"lastModifiedDateTime DESC"}),r=`${e}?${i.toString()}`;this.notebooks=(await this.fetchResource(r,"json")).value,this.contentArea.empty(),this.contentArea.createEl("h4",{text:"Choose data to import"});for(let s of this.notebooks){if(((o=s.sectionGroups)==null?void 0:o.length)!==0)for(let c of s.sectionGroups)await this.fetchNestedSectionGroups(c);let l=this.contentArea.createDiv();new Ee.Setting(l).setName(s.displayName).setDesc(`Last edited on: ${Ee.moment.utc(s.lastModifiedDateTime).format("Do MMMM YYYY")}. Contains ${(a=s.sections)==null?void 0:a.length} sections.`).addButton(c=>c.setCta().setButtonText("Select all").onClick(()=>{l.querySelectorAll('input[type="checkbox"]:not(:checked)').forEach(p=>p.click())})),this.renderHierarchy(s,l)}}async fetchNestedSectionGroups(e){if(e.sectionGroups=(await this.fetchResource(e.sectionGroupsUrl+"?$expand=sectionGroups($expand=sections),sections","json")).value,e.sectionGroups)for(let i=0;i{if(l.checked)this.selectedIds.push(o.id);else{let c=this.selectedIds.findIndex(p=>p===o.id);c!==-1&&this.selectedIds.splice(c,1)}})}}}async import(e){if(this.outputFolder=await this.getOutputFolder(),!this.outputFolder){new Ee.Notice("Please select a location to export to.");return}if(!this.graphData.accessToken){new Ee.Notice("Please sign in to your Microsoft Account.");return}e.status("Starting OneNote import");let i=0,r=0;for(let o of this.selectedIds){e.reportProgress(r,i);let a=`https://graph.microsoft.com/v1.0/me/onenote/sections/${o}/pages`,s=new URLSearchParams({$select:"id,title,createdDateTime,lastModifiedDateTime,level,order,contentUrl",$orderby:"order",pagelevel:"true"}),l=`${a}?${s.toString()}`,c=(await this.fetchResource(l,"json")).value;i+=c.length,this.insertPagesToSection(c,o),e.reportProgress(r,i);for(let p=0;psetTimeout(y,7500)),this.processFile(e,await this.fetchResource(`https://graph.microsoft.com/v1.0/me/onenote/pages/${m.id}/content?includeInkML=true`,"text"),m),r++,e.reportProgress(r,i)}catch(y){e.reportFailed(m.title,y.toString())}}}}insertPagesToSection(e,i,r){if(!r){for(let o of this.notebooks)this.insertPagesToSection(e,i,o);return}if(r.sectionGroups){let o=r.sectionGroups;for(let a of o)this.insertPagesToSection(e,i,a)}if(r.sections){let o=r;for(let a of o.sections)a.id===i&&(a.pages=e)}}async processFile(e,i,r){try{let o=this.convertFormat(i),a=this.getEntityPathNoParent(r.id,this.outputFolder.name),s;await this.vault.adapter.exists(a)?s=this.vault.getAbstractFileByPath(a):s=await this.vault.createFolder(a);let l=this.convertTags(ft(o.html)),c=this.getAllAttachments(l.replace(sd,"
    ")),p=this.styledElementToHTML(c.html);p=this.convertInternalLinks(p),p=this.convertDrawings(p);let m=(0,Ee.htmlToMarkdown)(p).trim().replace(sd," "),y=await this.saveAsMarkdownFile(s,r.title,m);await this.fetchAttachmentQueue(e,y,this.outputFolder,c.queue);let E={ctime:r!=null&&r.lastModifiedDateTime?Date.parse(r.lastModifiedDateTime.toString()):r!=null&&r.createdDateTime?Date.parse(r.createdDateTime.toString()):Date.now(),mtime:r!=null&&r.lastModifiedDateTime?Date.parse(r.lastModifiedDateTime.toString()):r!=null&&r.createdDateTime?Date.parse(r.createdDateTime.toString()):Date.now()};await this.vault.append(y,"",E),e.reportNoteSuccess(r.title)}catch(o){e.reportFailed(r.title,o)}}convertFormat(e){let i={html:"",inkml:""},r=e.split(` +`,1)[0];e.slice(0,-2);let o=e.split(r);if(o.shift(),o.length===2)for(let a of o){let l=a.split(` +`).find(p=>p.includes("Content-Type")).split(";")[0].split(":")[1].trim(),c=a.split(` +`).slice(2).join(` +`).trim();l==="text/html"?i.html=c:l==="application/inkml+xml"&&(i.inkml=c)}else throw new Error("The input string is incorrect and may be missing data. Inputted string: "+e);return i}convertTags(e){var r,o;let i=Array.from(e.querySelectorAll("[data-tag]"));for(let a of i)if((r=a.getAttribute("data-tag"))!=null&&r.contains("to-do")){let l=a.getAttribute("data-tag")==="to-do:completed"?"[x]":"[ ]";a.innerHTML=`- ${l} ${a.innerHTML}`}else{let s=(o=a.getAttribute("data-tag"))==null?void 0:o.split(",");s==null||s.forEach(l=>{a.innerHTML=a.innerHTML+` #${l.replace(":","-")} `})}return e.outerHTML}convertInternalLinks(e){let i=e.findAll("a");for(let r of i)if(r.href.startsWith("onenote:")){let o=r.href.indexOf("#")+1,a=r.href.indexOf("&",o);r.href=r.href.slice(o,a)}return e}getEntityPathNoParent(e,i){for(let r of this.notebooks){let o=this.getEntityPath(e,`${i}/${r.displayName}`,r);if(o)return o}return null}getEntityPath(e,i,r){let o=null;if("sectionGroups"in r&&r.sectionGroups){let a=this.searchSectionGroups(e,i,r.sectionGroups);a!==null&&(o=a)}if("sections"in r&&r.sections){let a=this.searchSectionGroups(e,i,r.sections);a!==null&&(o=a)}if("pages"in r&&r.pages){let a=this.searchPages(e,i,r);a!==null&&(o=a)}return o}searchPages(e,i,r){var a;let o=null;for(let s=0;s=0;p--)if(r.pages[p].level===l.level-1){o+="/"+r.pages[p].title;break}}break}}return o}searchSectionGroups(e,i,r){let o=null;for(let a of r)if(a.id===e)o=`${i}/${a.displayName}`;else{let s=this.getEntityPath(e,`${i}/${a.displayName}`,a);if(s){o=s;break}}return o}getAllAttachments(e){var l,c,p;let i=ft(e.replace(a1,"<$1$2>")),r=i.findAll("object"),o=i.findAll("img"),a=i.findAll("iframe"),s=[];for(let m of r){let y=m.getAttribute("data-attachment").split("."),E=y[y.length-1];if(!(!Fn.contains(E)&&!this.importIncompatibleAttachments)){s.push({name:m.getAttribute("data-attachment"),contentLocation:m.getAttribute("data")});let v=document.createElement("p");v.innerText=`![[${m.getAttribute("data-attachment")}]]`,(l=m.parentNode)==null||l.replaceChild(v,m)}}for(let m=0;m=1){let a=r.path+"/OneNote Attachments";this.useDefaultAttachmentFolder&&(a=await this.app.vault.getAvailablePathForAttachments(i.basename,i.extension,i));try{this.vault.createFolder(a)}catch(s){}for(let s=0;ssetTimeout(c,7500)),await this.vault.adapter.exists(`${a}/${l.name}`))e.reportSkipped(l.name);else{let c=await this.fetchResource(l.contentLocation,"file");await this.app.vault.createBinary(a+"/"+l.name,c)}}catch(c){e.reportFailed(l.name,c)}}}}styledElementToHTML(e){let i={"font-weight:bold":"b","font-style:italic":"i","text-decoration:underline":"u","text-decoration:line-through":"s","background-color":"mark"};e.findAll("cite").forEach(l=>l.innerHTML="> "+l.innerHTML+"
    ");let o=!1,a=document.createElement("pre");return e.querySelectorAll("*").forEach(l=>{let c=l.getAttribute("style")||"",p=Object.keys(i).find(m=>c.includes(m));if(c!=null&&c.contains("font-family:Consolas"))o?a.innerHTML=a.innerHTML.slice(0,-3)+l.innerHTML+"\n```":(o=!0,l.replaceWith(a),a.innerHTML="```\n"+l.innerHTML+"\n```");else if(l.nodeName==="BR"&&o)a.innerHTML=a.innerHTML.slice(0,-3)+"\n```";else if(p){let m=i[p],y=document.createElement(m);y.innerHTML=l.innerHTML,l.replaceWith(y)}}),e}convertDrawings(e){var o;let i=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),r=!1;for(;i.nextNode();)((o=i.currentNode.nodeValue)==null?void 0:o.trim())==="InkNode is not supported"&&(r=!0);if(r){let a=document.createTextNode("> [!caution] This page contained a drawing which was not converted.");e.insertBefore(a,e.firstChild)}else for(let a=0;asetTimeout(c,l)),this.fetchResource(e,i,r+1);throw new Error("Exceeded maximum retry attempts")}}return a}catch(o){throw console.error(`An internal error occurred while trying to fetch '${e}'. Error details: `,o),o}}};var Ut=require("obsidian");var ld=require("obsidian"),l1=/[\?<>\\:\*\|"]/g,c1=/[\x00-\x1f\x80-\x9f]/g,p1=/^\.+$/,u1=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,f1=/[\. ]+$/,d1=/^\./,m1=/\[/g,h1=/\]/g;function Br(n){return n.replace(l1,"").replace(c1,"").replace(p1,"").replace(u1,"").replace(f1,"").replace(m1,"").replace(h1,"").replace(d1,"")}function Ur(n,t){let e="MMMM Do, YYYY",i=(0,ld.moment)(n,e);return i.format(e)!==n?n:i.isValid()?i.format(t):n}var jr=require("obsidian"),g1=["POMO","word-count","date","slider","encrypt","TaoOfRoam","orphans","count","character-count","comment-button","query","streak","attr-table","mentions","search","roam/render","calc"],y1=new RegExp(`\\{\\{(\\[\\[)?(${g1.join("|")})(\\]\\])?.*?\\}\\}(\\})?`,"g"),b1=/{{pdf:|{{\[\[pdf|{{\[\[audio|{{audio:|{{video:|{{\[\[video/,cd=/https:\/\/firebasestorage(.*?)\?alt(.*?)\)/,x1=/https:\/\/firebasestorage(.*?)\?alt(.*?)/,w1=/(?<=\(\()\b(.*?)\b(?=\)\))/g,Hr=class extends ce{constructor(){super(...arguments);this.downloadAttachments=!1;this.fileDateYAML=!1;this.titleYAML=!1;this.newestTimestamp=0;this.oldestTimestamp=0}init(){this.addFileChooserSetting("Roam (.json)",["json"]),this.addOutputLocationSetting("Roam"),this.userDNPFormat=this.getUserDNPFormat(),new Ut.Setting(this.modal.contentEl).setName("Import settings").setHeading(),new Ut.Setting(this.modal.contentEl).setName("Download all attachments").setDesc("If enabled, all attachments uploaded to Roam will be downloaded to your attachments folder.").addToggle(e=>{e.setValue(this.downloadAttachments),e.onChange(async i=>{this.downloadAttachments=i})}),new Ut.Setting(this.modal.contentEl).setName("Add YAML created/update date").setDesc("If enabled, notes will have the create-time and edit-time from Roam added as properties.").addToggle(e=>{e.setValue(this.fileDateYAML),e.onChange(async i=>{this.fileDateYAML=i})}),new Ut.Setting(this.modal.contentEl).setName("Add YAML title").setDesc("If enabled, notes will have the full title added as a property (regardless of illegal file name characters).").addToggle(e=>{e.setValue(this.titleYAML),e.onChange(async i=>{this.titleYAML=i})})}async import(e){this.progress=e;let{files:i}=this;if(i.length===0){new Ut.Notice("Please pick at least one file to import.");return}let r=await this.getOutputFolder();if(!r){new Ut.Notice("Please select a location to export to.");return}for(let o of i){if(e.isCancelled())return;let a=Ze(o.basename),s=`${r.path}/${a}`,l=`${r.path}/${a}/Attachments`;await this.createFolders(s),await this.createFolders(l);let c=await o.readText(),p=JSON.parse(c),[m,y]=this.preprocess(p),E=new Map;for(let g in p){let w=p[g],T=Ur(Br(w.title),this.userDNPFormat).trim();if(T===""){e.reportFailed(w.uid,"Title is empty"),console.error("Cannot import data with an empty title",w);continue}let A=`${s}/${T}.md`,D=this.titleYAML?w.title:"",_=0,S=0;if(this.fileDateYAML){let C=w["create-time"],O=w["edit-time"];typeof C=="number"&&(_=C),typeof O=="number"&&(S=O)}let x=await this.jsonToMarkdown(s,l,w,"",!1,D,_,S);E.set(A,x)}for(let g of y.values()){let w=await this.roamMarkupScrubber(s,l,g.blockString,!0),T=await this.extractAndProcessBlockReferences(E,m,s,w),A=`${s}/${g.pageName}.md`,D=E.get(A);if(D){let _=D.split(` +`),S=_.findIndex(x=>x.contains("* "+w));S!==-1&&(_[S]=_[S].replace(w,T)),E.set(A,_.join(` +`))}}let{vault:v}=this,d=E.size,f=1;for(let[g,w]of E.entries()){if(e.isCancelled())return;try{let{parent:T}=oe(g);await this.createFolders(T);let A=v.getAbstractFileByPath(g);A?await v.modify(A,w):await v.create(g,w),e.reportNoteSuccess(g),e.reportProgress(f,d)}catch(T){console.error("Error saving Markdown to file:",g,T),e.reportFailed(g)}f++}}}getUserDNPFormat(){let e=this.app.internalPlugins.getPluginById("daily-notes").instance;return e?e.options.format||"YYYY-MM-DD":(console.log('Daily note plugin is not enabled. Roam import defaulting to "YYYY-MM-DD" format.'),"YYYY-MM-DD")}preprocess(e){let i=new Map,r=new Map,o=this.userDNPFormat;function a(s,l){if(l.uid){let c=new Date(s.uid);if(!isNaN(c.getTime())){let y=Ur(s.title,o);s.title=y}let p={pageName:Br(s.title),blockString:l.string};/.*?(\(\(.*?\)\)).*?/g.test(l.string)&&r.set(l.uid,p),i.set(l.uid,p)}if(l.children)for(let c of l.children)a(s,c)}for(let s of e)if(s.children)for(let l of s.children)a(s,l);return[i,r]}async roamMarkupScrubber(e,i,r,o=!1){return r=r.replace(y1,""),r.substring(0,8)==":hiccup "&&r.includes(":hr")?"---":(r=r.replace(/\[\[(.*?)\]\]/g,(a,s)=>`[[${Ur(Br(s),this.userDNPFormat)}]]`),r=r.replace(/\[\[(.*\/.*)\]\]/g,(a,s)=>`[[${e}/${s}|${s}]]`),r=r.replace(/\[.+?\]\((\(.+?\)\))\)/g,"$1"),r=r.replace(/\[(.+?)\]\(\[\[(.+?)\]\]\)/g,"[[$2|$1]]"),r=r.replace(/\[\[>\]\]/g,">"),r=r.replace(/{{TODO}}|{{\[\[TODO\]\]}}/g,"[ ]"),r=r.replace(/{{DONE}}|{{\[\[DONE\]\]}}/g,"[x]"),r=r.replace("::",":"),r=r.replace(/{{.*?\bvideo\b.*?(\bhttp.*?\byoutu.*?)}}/g,"![]($1)"),r=r.replace(/(https?:\/\/twitter\.com\/(?:#!\/)?\w+\/status\/\d+(?:\?[\w=&-]+)?)/g,"![]($1)"),r=r.replace(/\_\_(.+?)\_\_/g,"*$1*"),r=r.replace(/\^\^(.+?)\^\^/g,"==$1=="),r=r.replace(/{{\[{0,2}embed.*?(\(\(.*?\)\)).*?}}/g,"$1"),r=r.replace(/{{\[{0,2}embed.*?(\[\[.*?\]\]).*?}}/g,"$1"),this.downloadAttachments&&!o&&r.includes("firebasestorage")&&(r=await this.downloadFirebaseFile(r,i)),r)}async jsonToMarkdown(e,i,r,o="",a=!1,s,l,c){let p=[],m=[],y=r["edit-time"],E=r["create-time"];if(this.newestTimestampy?c:y,E!==void 0?l>10?this.oldestTimestamp=Math.min(l,E):this.oldestTimestamp=E:this.oldestTimestamp=l,"string"in r&&r.string){let v=r.heading?"#".repeat(r.heading)+" ":"",d=await this.roamMarkupScrubber(e,i,r.string);p.push(`${a?o+"* ":o}${v}${d}`)}if(r.children)for(let v of r.children)p.push(await this.jsonToMarkdown(e,i,v,o+" ",!0,"",this.oldestTimestamp,this.newestTimestamp));if((this.fileDateYAML||this.titleYAML)&&!a){let v=this.oldestTimestamp;if(m.push("---"),this.titleYAML&&m.push(`title: "${s}"`),this.fileDateYAML){let d="YYYY-MM-DD HH:mm:ss",f=this.newestTimestamp?(0,jr.moment)(this.newestTimestamp).format(d):(0,jr.moment)(new Date).format(d),g=v?(0,jr.moment)(v).format(d):f;m.push("created: "+g),m.push("updated: "+f)}m.push("---"),p.unshift(m.join(` +`))}return p.join(` +`)}async modifySourceBlockString(e,i,r,o){if(!i.blockString.endsWith("^"+o)){let a=`${r}/${i.pageName}.md`,s=e.get(a);if(s){let l=s.split(` +`),c=l.findIndex(p=>p.contains("* "+i.blockString));if(c!==-1){let p=i.blockString+" ^"+o;l[c]=l[c].replace(i.blockString,p),i.blockString=i.blockString+" ^"+o}e.set(a,l.join(` +`))}}}async extractAndProcessBlockReferences(e,i,r,o){let a=o.match(w1);if(!a)return o;let s=[];for(let p of a)try{let m=i.get(p);if(!m){s.push(p);continue}let y=m.blockString.replace(/\[\[|\]\]/g,""),E=`[[${r}/${m.pageName}#^${p}|${y}]]`;await this.modifySourceBlockString(e,m,r,p),s.push(E)}catch(m){s.push(p)}let l=0;return o.replace(/\(\(\b.*?\b\)\)/g,()=>s[l++])}async downloadFirebaseFile(e,i){let{progress:r,vault:o}=this,a="";try{let s,l;if(b1.test(e)?(s=e.match(/https:\/\/firebasestorage(.*?)\?alt(.*?)\}/),l=e.match(/{{.*https:\/\/firebasestorage.*?alt=media&.*?(?=\s|$)/)):cd.test(e)?(s=e.match(cd),l=e.match(/!\[.*https:\/\/firebasestorage.*?alt=media&.*?(?=\s|$)/)):(s=e.match(x1),l=e.match(/https:\/\/firebasestorage.*?alt=media&.*?(?=\s|$)/)),s&&l){let c="https://firebasestorage"+s[1],p=decodeURIComponent(c.split("/").last()||"");if(p){let d=p.split("/");d.length>1&&(d.splice(-1,1),this.createFolders(`${i}/${d.join("/")}`))}else{let d=Math.floor(Date.now()/1e3),f=c.slice(-5).match(/(.*?)\.(.+)/);if(!f)return r.reportSkipped(s[1],"Unexpected file extension"),e;p=`${d}.${f[2]}`}let m=`${i}/${p}`;if(o.getAbstractFileByPath(m))return r.reportSkipped(s[1],"File already exists"),e;a=s[0].slice(0,-1);let v=await(await fetch(a,{})).arrayBuffer();return await o.createBinary(m,v),r.reportAttachmentSuccess(a),e.replace(l[0],`![[${m}]]`)}}catch(s){console.error(s),r.reportFailed(a,s)}return e}};var jt=require("obsidian");var pd=/!\[\]\(assets\/([^)]*)\)/g,qr=class extends ce{init(){jt.Platform.isMacOS||this.modal.contentEl.createEl("p",{text:"Due to platform limitations, only textpack and zip files can be imported from this device. Open your vault on a Mac to import textbundle files."});let e=jt.Platform.isMacOS?["textbundle","textpack","zip"]:["textpack","zip"];this.addFileChooserSetting("Textbundle",e,!0),this.addOutputLocationSetting("Textbundle")}async import(e){let{files:i}=this;if(i.length===0){new jt.Notice("Please pick at least one file to import.");return}let r=await this.getOutputFolder();if(!r){new jt.Notice("Please select a location to export to.");return}this.outputFolder=r,this.attachmentsFolderPath=await this.createFolders(`${r.path}/assets`);for(let o of i)if(o.extension==="textpack")await gt(o,async(a,s)=>{await this.process(e,o.name,s)});else if(o.extension==="zip")await gt(o,async(a,s)=>{let l=this.groupFilesByTextbundle(o.name,s);for(let c of l)await this.process(e,o.name,c)});else{let s=await new ut(`${o.toString()}/`).list();await this.process(e,o.name,s)}}groupFilesByTextbundle(e,i){let r={},o=e+"/",a=".textbundle";for(let s of i){if(!s.fullpath.startsWith(o)){console.log("Skipping",s.fullpath);continue}let l=s.fullpath.slice(o.length);if(l.startsWith("._")||l.startsWith("__MACOSX")){console.log("Skipping",s.fullpath);continue}let c=l.indexOf(a);if(c===-1){console.log("Skipping",s.fullpath);continue}let p=l.slice(0,c)+".textbundle";if(l.slice(c+a.length+1).startsWith("._")){console.log("Skipping",s.fullpath);continue}p in r?r[p].push(s):r[p]=[s]}return Object.values(r)}async process(e,i,r){let o=r.find(a=>a.name==="info.json");if(o){let a=await o.readText(),s=JSON.parse(a);if(s.hasOwnProperty("type")&&s.type!=="net.daringfireball.markdown"){e.reportSkipped(i,"The textbundle does not contain markdown");return}}for(let a of r)if(!a.name.startsWith("._"))try{if(a.type==="file"&&(a.extension==="md"||a.extension==="markdown")){let s="parent"in a?a.parent:i;s=s.replace(/.textbundle$/,"");let l=await a.readText();l.match(pd)&&(l=l.replace(pd,`![[${this.attachmentsFolderPath.path}/$1]]`));let c=(0,jt.normalizePath)(s);await this.saveAsMarkdownFile(this.outputFolder,c,l),e.reportNoteSuccess(s)}else if(a.type==="file"&&a.fullpath.contains("assets/"))await this.importAsset(e,a);else if(a.type==="folder"){let{basename:s}=oe(a.toString());if(s!=="assets")continue;let c=await new ut(`${a.toString()}/`).list();for(let p of c)await this.importAsset(e,p)}else a.name!=="info.json"&&e.reportSkipped(a.name,"the file is not a media or markdown file.")}catch(s){e.reportFailed(a.name,s)}}async importAsset(e,i){if(i.type==="folder"){e.reportSkipped(i.name);return}let r=`${this.attachmentsFolderPath.path}/${i.name}`;this.vault.getAbstractFileByPath(r)&&e.reportSkipped(i.name,"the file already exists.");let a=await i.read();await this.vault.createBinary(r,a),e.reportAttachmentSuccess(i.name)}};var $r="obsidian://importer-auth/",Fn=["png","webp","jpg","jpeg","gif","bmp","svg","mpg","m4a","webm","wav","ogv","3gp","mov","mp4","mkv","pdf"],Wr=class{constructor(t){this.notes=0;this.attachments=0;this.skipped=[];this.failed=[];this.maxFileNameLength=100;this.cancelled=!1;this.el=t,t.empty(),this.statusEl=t.createDiv("importer-status"),this.progressBarEl=t.createDiv("importer-progress-bar",e=>{this.progressBarInnerEl=e.createDiv("importer-progress-bar-inner")}),t.createDiv("importer-stats-container",e=>{e.createDiv("importer-stat mod-imported",i=>{this.importedCountEl=i.createDiv({cls:"importer-stat-count",text:"0"}),i.createDiv({cls:"importer-stat-name",text:"imported"})}),e.createDiv("importer-stat mod-attachments",i=>{this.attachmentCountEl=i.createDiv({cls:"importer-stat-count",text:"0"}),i.createDiv({cls:"importer-stat-name",text:"attachments"})}),e.createDiv("importer-stat mod-remaining",i=>{this.remainingCountEl=i.createDiv({cls:"importer-stat-count",text:"0"}),i.createDiv({cls:"importer-stat-name",text:"remaining"})}),e.createDiv("importer-stat mod-skipped",i=>{this.skippedCountEl=i.createDiv({cls:"importer-stat-count",text:"0"}),i.createDiv({cls:"importer-stat-name",text:"skipped"})}),e.createDiv("importer-stat mod-failed",i=>{this.failedCountEl=i.createDiv({cls:"importer-stat-count",text:"0"}),i.createDiv({cls:"importer-stat-name",text:"failed"})})}),this.importLogEl=t.createDiv("importer-log"),this.importLogEl.hide()}status(t){this.statusEl.setText(t.trim()+"...")}reportNoteSuccess(t){this.notes++,this.importedCountEl.setText(this.notes.toString())}reportAttachmentSuccess(t){this.attachments++,this.attachmentCountEl.setText(this.attachments.toString())}reportSkipped(t,e){let{importLogEl:i}=this;this.skipped.push(t),this.skippedCountEl.setText(this.skipped.length.toString()),console.log("Import skipped",t,e),this.importLogEl.createDiv("list-item",r=>{r.createSpan({cls:"importer-error",text:"Skipped: "}),r.createSpan({text:`"${Jn(t,this.maxFileNameLength)}"`+(e?` because ${Jn(String(e),this.maxFileNameLength)}`:"")})}),i.scrollTop=i.scrollHeight,i.show()}reportFailed(t,e){let{importLogEl:i}=this;this.failed.push(t),this.failedCountEl.setText(this.failed.length.toString()),console.log("Import failed",t,e),this.importLogEl.createDiv("list-item",r=>{r.createSpan({cls:"importer-error",text:"Failed: "}),r.createSpan({text:`"${Jn(t,this.maxFileNameLength)}"`+(e?` because ${Jn(String(e),this.maxFileNameLength)}`:"")})}),i.scrollTop=i.scrollHeight,i.show()}reportProgress(t,e){e<=0||(console.log("Current progress:",(100*t/e).toFixed(1)+"%"),this.remainingCountEl.setText((e-t).toString()),this.importedCountEl.setText(t.toString()),this.progressBarInnerEl.style.width=(100*t/e).toFixed(1)+"%")}cancel(){this.cancelled=!0,this.progressBarEl.hide(),this.statusEl.hide()}hideStatus(){this.progressBarEl.hide(),this.statusEl.hide()}isCancelled(){return this.cancelled}},Zr=class extends Ht.Plugin{async onload(){this.importers={"apple-notes":{name:"Apple Notes",optionText:"Apple Notes",importer:br,helpPermalink:"import/apple-notes"},bear:{name:"Bear",optionText:"Bear (.bear2bk)",importer:xr,helpPermalink:"import/bear"},evernote:{name:"Evernote",optionText:"Evernote (.enex)",importer:Cr,helpPermalink:"import/evernote"},keep:{name:"Google Keep",optionText:"Google Keep (.zip/.json)",importer:Fr,helpPermalink:"import/google-keep"},html:{name:"HTML files",optionText:"HTML (.html)",importer:Ir,helpPermalink:"import/html"},onenote:{name:"Microsoft OneNote",optionText:"Microsoft OneNote",importer:Mr,helpPermalink:"import/onenote"},notion:{name:"Notion",optionText:"Notion (.zip)",importer:Pr,helpPermalink:"import/notion",formatDescription:"Export your Notion workspace to HTML format."},"roam-json":{name:"Roam Research",optionText:"Roam Research (.json)",importer:Hr,helpPermalink:"import/roam",formatDescription:"Export your Roam Research workspace to JSON format."},textbundle:{name:"Textbundle files",optionText:"Textbundle (.textbundle, .textpack)",importer:qr,helpPermalink:"import/textbundle"}},this.addRibbonIcon("lucide-import","Open Importer",()=>{new wi(this.app,this).open()}),this.addCommand({id:"open-modal",name:"Open importer",callback:()=>{new wi(this.app,this).open()}}),this.registerObsidianProtocolHandler("importer-auth",e=>{if(this.authCallback){this.authCallback(e),this.authCallback=void 0;return}new Ht.Notice("Unexpected auth event. Please restart the auth process.")})}onunload(){}registerAuthCallback(e){this.authCallback=e}},wi=class extends Ht.Modal{constructor(e,i){super(e);this.current=null;this.plugin=i,this.titleEl.setText("Import data into Obsidian"),this.modalEl.addClass("mod-importer");let r=Object.keys(i.importers);r.length>0&&(this.selectedId=r[0],this.updateContent())}updateContent(){let{contentEl:e,selectedId:i}=this,r=this.plugin.importers,o=r[i];e.empty();let a=new DocumentFragment;if(a.createSpan({text:"The format to be imported."}),o.formatDescription&&(a.createEl("br"),a.createSpan({text:o.formatDescription})),a.createEl("br"),a.createEl("a",{text:`Learn more about importing from ${o.name}.`,href:`https://help.obsidian.md/${o.helpPermalink}`}),new Ht.Setting(e).setName("File format").setDesc(a).addDropdown(s=>{for(let l in r)r.hasOwnProperty(l)&&s.addOption(l,r[l].optionText);s.onChange(l=>{r.hasOwnProperty(l)&&(this.selectedId=l,this.updateContent())}),s.setValue(this.selectedId)}),i&&r.hasOwnProperty(i)){let s=this.importer=new o.importer(this.app,this);if(s.notAvailable)return;e.createDiv("modal-button-container",l=>{l.createEl("button",{cls:"mod-cta",text:"Import"},c=>{c.addEventListener("click",async()=>{this.current&&this.current.cancel(),e.empty();let p=e.createDiv(),m=this.current=new Wr(p),y=e.createDiv("modal-button-container"),E=y.createEl("button",{cls:"mod-danger",text:"Stop"},v=>{v.addEventListener("click",()=>{m.cancel(),E.detach()})});try{await s.import(m)}finally{this.current===m&&(this.current=null),E.detach(),y.createEl("button",{cls:"mod-cta",text:"Done"},v=>{v.addEventListener("click",()=>this.close())}),y.createEl("button",{text:"Back"},v=>{v.addEventListener("click",()=>this.updateContent())}),m.hideStatus()}})})})}}onClose(){let{contentEl:e,current:i}=this;e.empty(),i&&i.cancel()}}; +/*! Bundled license information: + +sax/lib/sax.js: + (*! http://mths.be/fromcodepoint v0.1.0 by @mathias *) +*/ diff --git a/.obsidian/plugins/obsidian-importer/manifest.json b/.obsidian/plugins/obsidian-importer/manifest.json new file mode 100644 index 0000000..ee98996 --- /dev/null +++ b/.obsidian/plugins/obsidian-importer/manifest.json @@ -0,0 +1,10 @@ +{ + "id": "obsidian-importer", + "name": "Importer", + "version": "1.6.4", + "minAppVersion": "0.15.0", + "description": "Import data from Notion, Evernote, Apple Notes, Microsoft OneNote, Google Keep, Bear, Roam, and HTML files.", + "author": "Obsidian", + "authorUrl": "https://obsidian.md", + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/obsidian-importer/styles.css b/.obsidian/plugins/obsidian-importer/styles.css new file mode 100644 index 0000000..6f9b809 --- /dev/null +++ b/.obsidian/plugins/obsidian-importer/styles.css @@ -0,0 +1,87 @@ +.modal.mod-importer { + max-height: var(--modal-height); + padding: var(--size-4-4) 0 0 0; + position: relative; + overflow: hidden; +} +.modal.mod-importer .modal-title { + padding: 0 var(--size-4-4); +} +.modal.mod-importer .modal-content { + overflow: auto; + padding: var(--size-4-4); + margin-bottom: calc(var(--input-height) + var(--size-4-8)); + border-top: var(--border-width) solid var(--background-modifier-border); +} +.modal.mod-importer .modal-button-container { + margin: 0 0 0 calc(var(--size-4-4) * -1); + padding: var(--size-4-4); + gap: var(--size-4-2); + position: absolute; + bottom: 0; + background-color: var(--background-primary); + border-top: var(--border-width) solid var(--background-modifier-border); + width: 100%; +} + +.importer-progress-bar { + width: 100%; + height: 8px; + background-color: var(--background-secondary); + overflow: hidden; + box-shadow: inset 0px 0px 0px 1px var(--background-modifier-border); + border-radius: var(--radius-s); +} + +.importer-progress-bar-inner { + width: 0; + height: 100%; + background-color: var(--interactive-accent); +} + +.importer-status { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding: var(--size-4-2) 0; +} + +.importer-stats-container { + display: flex; + justify-content: space-evenly; + margin-top: var(--size-4-5); + margin-bottom: var(--size-4-5); +} + +.importer-stat { + text-align: center; +} + +.importer-stat-count { + font-size: var(--font-ui-large); +} + +.importer-log { + overflow: auto; + flex-grow: 1; + font-family: var(--font-monospace); + font-size: var(--font-ui-smaller); + color: var(--text-muted); + border: 1px solid var(--background-modifier-border); + padding: var(--size-4-4); + background-color: var(--background-secondary); + border-radius: var(--radius-s); + max-height: 300px; + user-select: text; +} + +.importer-log .list-item { + display: inline-block; + line-height: var(--line-height-normal); + white-space: pre; + margin: var(--size-2-1); +} + +.importer-error { + color: var(--text-error); +} diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 59adf39..248c168 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -35,11 +35,9 @@ "id": "1ac72aa6ecff8db5", "type": "leaf", "state": { - "type": "markdown", + "type": "image", "state": { - "file": "2024-08-08 (Thursday).md", - "mode": "source", - "source": false + "file": "Paper Moving off the Map.md/Exported image 20240808113929-0.png" } } } @@ -110,7 +108,7 @@ "state": { "type": "backlink", "state": { - "file": "2024-08-08 (Thursday).md", + "file": "Paper Moving off the Map.md/Exported image 20240808113929-0.png", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -127,7 +125,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "2024-08-08 (Thursday).md", + "file": "Paper Moving off the Map.md/Exported image 20240808113929-0.png", "linksCollapsed": false, "unlinkedCollapsed": false } @@ -150,12 +148,12 @@ "state": { "type": "outline", "state": { - "file": "2024-08-08 (Thursday).md" + "file": "Paper Moving off the Map.md/Exported image 20240808113929-0.png" } } } ], - "currentTab": 1 + "currentTab": 2 } ], "direction": "horizontal", @@ -168,26 +166,59 @@ "canvas:Create new canvas": false, "daily-notes:Open today's daily note": false, "templates:Insert template": false, - "command-palette:Open command palette": false + "command-palette:Open command palette": false, + "obsidian-importer:Open Importer": false } }, "active": "1ac72aa6ecff8db5", "lastOpenFiles": [ - "Logos re-platforming.md", - "Private Equity thoughts.md", - "2024-08-08 (Thursday).md", - "2024-08-07 (Wednesday).md", - "2024-08-06 (Tuesday).md", - "Untitled.canvas", - "2024-08-05 (Monday).md", - "2024-08-05 Duplicate billing profile bug hunting (BEN-1564).canvas", - "2024-08-02 (Friday).md", + "OneNote/Ben's Notebook/Topical studies/Vaccinations/Autism and Vaccines Research, Funding, Support Autism Science Foundation.md", + "OneNote/Ben's Notebook/Quick Notes/Baby sitters.md", + "What is Scrumban Definition, Overview, and Examples.md/Exported image 20240808113924-0.png", + "What is Scrumban Definition, Overview, and Examples.md/Exported image 20240808113924-1.png", + "What is a Boy.md/Exported image 20240808113917-0.jpeg", + "Valley shower faucet cartridge replacement.md/Exported image 20240808114111-2.jpeg", + "Valley shower faucet cartridge replacement.md/Exported image 20240808114111-1.jpeg", + "Valley shower faucet cartridge replacement.md/Exported image 20240808114111-0.jpeg", + "A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-0.png", + "Edulinq Jon Skeet's coding blog.md/Exported image 20240808113923-0.png", "Book club notes/Excellence Wins.md", - "Book club notes", - "2024-08-02 Order-level discounting email response to Dan.md", - "2024-08-01 (Thursday).md", - "Welcome.md", - "create a link.md", - "2024-08" + "Kitchen grout.md/Exported image 20240808114112-0.jpeg", + "OneNote/Ben's Notebook/Recipes/Marinated Smoked Goose Breast Recipe.md", + "OneNote/Ben's Notebook/Recipes/Are You Game Smoked Goose Breasts Ducks Unlimited.md", + "OneNote/Ben's Notebook/Recipes/Pancakes.md", + "OneNote/Ben's Notebook/Topical studies/Leaving a church/When is it right to leave a church.md", + "OneNote/Ben's Notebook/Topical studies/Leaving a church/Scriptural Reasons for Leaving a Church.md", + "OneNote/Ben's Notebook/Topical studies/Leaving a church/How To Leave a Church BiblicalEldership.com.md", + "OneNote/Ben's Notebook/Bible Study/Galatians Observation.md", + "OneNote/Ben's Notebook/Bible Study/1 Thessalonians Observation.md", + "OneNote/Ben's Notebook/Bible Study/1 Thessalonians Outline.md", + "OneNote/Ben's Notebook/Bible Study/1 Peter Outline.md", + "OneNote/Ben's Notebook/Bible Study/1 Peter Observation.md", + "OneNote/Ben's Notebook/Bible Study/1 Peter Flow Outline.md", + "Are You Game Smoked Goose Breasts Ducks Unlimited.md/Exported image 20240808113834-1.jpeg", + "Untitled note 1.md/305e82da0687bc4fb7ab116f2a3407cf.pdf", + "Untitled note 1.md/p4028.pdf", + "OneNote/Ben's Notebook/Reading/Read Later/Real World Recommendation System – Part 1.md", + "Logos re-platforming.md", + "OneNote/Ben's Notebook/Reading Movies/The Bookshop.md", + "How to read a movie.md", + "OneNote/Ben's Notebook/Reading Movies/How to read a movie.md", + "OneNote/Ben's Notebook/Reading Movies", + "OneNote/Ben's Notebook/Quick Notes/Aldi.md", + "OneNote/Ben's Notebook/Quick Notes/Jeremy Bassett, Burundi work prayer requests.md", + "OneNote/Ben's Notebook/Quick Notes/Next book club.md", + "2002 Coachman Clipper 106 Sport Pop-Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN 1TC1C510X35002745 - Mayo Auction & Realty.md", + "OneNote/Ben's Notebook/Quick Notes/2002 Coachman Clipper 106 Sport Pop-Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN 1TC1C510X35002745 - Mayo Auction & Realty.md", + "OneNote/Ben's Notebook/Quick Notes/Prayer requests 3272024.md", + "OneNote/Ben's Notebook/Quick Notes", + "OneNote/Ben's Notebook/Prayer Meetings", + "OneNote/Ben's Notebook/Messages", + "OneNote/Ben's Notebook/Home Projects", + "OneNote/Ben's Notebook/Home Maintenance", + "OneNote/Ben's Notebook/Chapel", + "OneNote/Ben's Notebook/Bible Study", + "Untitled.canvas", + "2024-08-05 Duplicate billing profile bug hunting (BEN-1564).canvas" ] } \ No newline at end of file diff --git a/2002 Coachman Clipper 106 Sport Pop-Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN 1TC1C510X35002745 - Mayo Auction & Realty.md/Exported image 20240808114234-0.jpeg b/2002 Coachman Clipper 106 Sport Pop-Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN 1TC1C510X35002745 - Mayo Auction & Realty.md/Exported image 20240808114234-0.jpeg new file mode 100644 index 0000000..dc3fdf6 Binary files /dev/null and b/2002 Coachman Clipper 106 Sport Pop-Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN 1TC1C510X35002745 - Mayo Auction & Realty.md/Exported image 20240808114234-0.jpeg differ diff --git a/2020-01-31 Tech Talk - Michael Sterling - Royalties - Faithlife Coders - Amber.md/Exported image 20240808113925-0.png b/2020-01-31 Tech Talk - Michael Sterling - Royalties - Faithlife Coders - Amber.md/Exported image 20240808113925-0.png new file mode 100644 index 0000000..81df52f Binary files /dev/null and b/2020-01-31 Tech Talk - Michael Sterling - Royalties - Faithlife Coders - Amber.md/Exported image 20240808113925-0.png differ diff --git a/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-0.png b/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-0.png new file mode 100644 index 0000000..0312820 Binary files /dev/null and b/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-0.png differ diff --git a/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-1.png b/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-1.png new file mode 100644 index 0000000..0698be7 Binary files /dev/null and b/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-1.png differ diff --git a/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-2.png b/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-2.png new file mode 100644 index 0000000..5ace94f Binary files /dev/null and b/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-2.png differ diff --git a/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-3.png b/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-3.png new file mode 100644 index 0000000..0357dd6 Binary files /dev/null and b/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-3.png differ diff --git a/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-4.gif b/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-4.gif new file mode 100644 index 0000000..6762b8a Binary files /dev/null and b/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md/Exported image 20240808113913-4.gif differ diff --git a/A Non-Technical Explanation of ChatGPT - Parand.md/Exported image 20240808113915-0.png b/A Non-Technical Explanation of ChatGPT - Parand.md/Exported image 20240808113915-0.png new file mode 100644 index 0000000..c3b2a14 Binary files /dev/null and b/A Non-Technical Explanation of ChatGPT - Parand.md/Exported image 20240808113915-0.png differ diff --git a/A Non-Technical Explanation of ChatGPT - Parand.md/Exported image 20240808113915-1.png b/A Non-Technical Explanation of ChatGPT - Parand.md/Exported image 20240808113915-1.png new file mode 100644 index 0000000..8dca742 Binary files /dev/null and b/A Non-Technical Explanation of ChatGPT - Parand.md/Exported image 20240808113915-1.png differ diff --git a/AcademicDesk integration to Salesforce.md b/AcademicDesk integration to Salesforce.md new file mode 100644 index 0000000..90ca448 --- /dev/null +++ b/AcademicDesk integration to Salesforce.md @@ -0,0 +1,19 @@ +#academic-desk #subscriptions #salesforce + +[[2024-08-08 (Thursday)]] + +Luke and Josh are talking about AcademicDesk housing academic subscriptions data. This is news to me. Is the Academic team planning on their own subscriptions engine? + +- [ ] Verify that this is _not_ the case and that they are using vanilla subscriptions API engine stuff + +Luke showed me what he's working on Salesforce: +- A group account will have a License info tab that shows: + - Subscriptions for the group with, supposedly, information that comes from AcademicDesk: number of seats, the type of subscription (various checkboxes), etc + - The claimed licenses: this is simply a list of SF person accounts tied to the SF group account that have a subscription where the Group ID on the subscription ist he same as the Faithlife Group ID of the SF group account + +Request from Justin Ullestad: https://docs.google.com/document/d/14WEYQO0QW7PuIu1re2p2kh5X0KJz_zv4o3e-NBQwRX8/edit?usp=sharing + +For this to work, it looks like we need: +- [ ] Are group subscriptions integrating to Salesforce? +- [ ] If so, is the group ID being populated on subscriptions? +- [ ] \ No newline at end of file diff --git a/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md/Exported image 20240808113930-0.png b/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md/Exported image 20240808113930-0.png new file mode 100644 index 0000000..2543374 Binary files /dev/null and b/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md/Exported image 20240808113930-0.png differ diff --git a/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md/Exported image 20240808113930-1.png b/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md/Exported image 20240808113930-1.png new file mode 100644 index 0000000..1b2e63e Binary files /dev/null and b/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md/Exported image 20240808113930-1.png differ diff --git a/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md/Exported image 20240808113930-2.png b/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md/Exported image 20240808113930-2.png new file mode 100644 index 0000000..b99e53e Binary files /dev/null and b/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md/Exported image 20240808113930-2.png differ diff --git a/Are You Game Smoked Goose Breasts Ducks Unlimited.md/Exported image 20240808113834-0.jpeg b/Are You Game Smoked Goose Breasts Ducks Unlimited.md/Exported image 20240808113834-0.jpeg new file mode 100644 index 0000000..7ec974f Binary files /dev/null and b/Are You Game Smoked Goose Breasts Ducks Unlimited.md/Exported image 20240808113834-0.jpeg differ diff --git a/Are You Game Smoked Goose Breasts Ducks Unlimited.md/Exported image 20240808113834-1.jpeg b/Are You Game Smoked Goose Breasts Ducks Unlimited.md/Exported image 20240808113834-1.jpeg new file mode 100644 index 0000000..429c190 Binary files /dev/null and b/Are You Game Smoked Goose Breasts Ducks Unlimited.md/Exported image 20240808113834-1.jpeg differ diff --git a/Edulinq Jon Skeet's coding blog.md/Exported image 20240808113923-0.png b/Edulinq Jon Skeet's coding blog.md/Exported image 20240808113923-0.png new file mode 100644 index 0000000..ed1223a Binary files /dev/null and b/Edulinq Jon Skeet's coding blog.md/Exported image 20240808113923-0.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-0.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-0.png new file mode 100644 index 0000000..4fa0a35 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-0.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-1.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-1.png new file mode 100644 index 0000000..df04d03 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-1.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-10.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-10.png new file mode 100644 index 0000000..451b46f Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-10.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-11.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-11.png new file mode 100644 index 0000000..6a13cc6 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-11.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-12.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-12.png new file mode 100644 index 0000000..4a3b9da Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-12.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-13.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-13.png new file mode 100644 index 0000000..681ec37 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-13.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-14.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-14.png new file mode 100644 index 0000000..991564b Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-14.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-15.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-15.png new file mode 100644 index 0000000..88d434c Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-15.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-16.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-16.png new file mode 100644 index 0000000..e684d20 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-16.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-17.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-17.png new file mode 100644 index 0000000..9aa99a6 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-17.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-18.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-18.png new file mode 100644 index 0000000..f761100 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-18.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-19.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-19.png new file mode 100644 index 0000000..6b3e43e Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-19.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-2.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-2.png new file mode 100644 index 0000000..cec888e Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-2.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-20.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-20.png new file mode 100644 index 0000000..1c16b42 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-20.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-21.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-21.png new file mode 100644 index 0000000..250007a Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-21.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-22.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-22.png new file mode 100644 index 0000000..7b38f4c Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-22.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-23.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-23.png new file mode 100644 index 0000000..66d5f56 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-23.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-24.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-24.png new file mode 100644 index 0000000..161c874 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-24.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-3.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-3.png new file mode 100644 index 0000000..a9b35bb Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-3.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-4.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-4.png new file mode 100644 index 0000000..954f578 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-4.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-5.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-5.png new file mode 100644 index 0000000..6ac99e4 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-5.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-6.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-6.png new file mode 100644 index 0000000..722e216 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-6.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-7.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-7.png new file mode 100644 index 0000000..10e54a4 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-7.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-8.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-8.png new file mode 100644 index 0000000..dff2157 Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-8.png differ diff --git a/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-9.png b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-9.png new file mode 100644 index 0000000..b487f4d Binary files /dev/null and b/Embrace Complexity; Tighten Your Feedback Loops.md/Exported image 20240808113916-9.png differ diff --git a/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-0.jpeg b/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-0.jpeg new file mode 100644 index 0000000..5fbcbfc Binary files /dev/null and b/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-0.jpeg differ diff --git a/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-1.png b/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-1.png new file mode 100644 index 0000000..aadb8c7 Binary files /dev/null and b/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-1.png differ diff --git a/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-2.png b/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-2.png new file mode 100644 index 0000000..28245a5 Binary files /dev/null and b/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-2.png differ diff --git a/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-3.png b/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-3.png new file mode 100644 index 0000000..7d5af85 Binary files /dev/null and b/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-3.png differ diff --git a/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-4.png b/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-4.png new file mode 100644 index 0000000..53cca60 Binary files /dev/null and b/How AsyncAwait Really Works in C - .NET Blog.md/Exported image 20240808113926-4.png differ diff --git a/How to read a movie.md/Exported image 20240808114239-0.jpeg b/How to read a movie.md/Exported image 20240808114239-0.jpeg new file mode 100644 index 0000000..b1e8254 Binary files /dev/null and b/How to read a movie.md/Exported image 20240808114239-0.jpeg differ diff --git a/JAMA Network JAMA Time Trends in Autism and in MMR Immunization Coverage in California.md/Exported image 20240808113939-0.png b/JAMA Network JAMA Time Trends in Autism and in MMR Immunization Coverage in California.md/Exported image 20240808113939-0.png new file mode 100644 index 0000000..eecf0e4 Binary files /dev/null and b/JAMA Network JAMA Time Trends in Autism and in MMR Immunization Coverage in California.md/Exported image 20240808113939-0.png differ diff --git a/Kitchen grout.md/Exported image 20240808114112-0.jpeg b/Kitchen grout.md/Exported image 20240808114112-0.jpeg new file mode 100644 index 0000000..49282ea Binary files /dev/null and b/Kitchen grout.md/Exported image 20240808114112-0.jpeg differ diff --git a/Logos re-platforming.md b/Logos re-platforming.md index 0661e93..1f80d8c 100644 --- a/Logos re-platforming.md +++ b/Logos re-platforming.md @@ -1,3 +1,5 @@ +#replatform #celigo #builderio #algolia #vercel #nextjs #bigcommerce + Re-platforming efforts: 1. Algolia to replace in-house elastic search implementation 2. Builder.io to replace in-house built ContentAdmin CMS diff --git a/Marinated Smoked Goose Breast Recipe.md/Exported image 20240808113833-0.jpeg b/Marinated Smoked Goose Breast Recipe.md/Exported image 20240808113833-0.jpeg new file mode 100644 index 0000000..e69de29 diff --git a/Marinated Smoked Goose Breast Recipe.md/Exported image 20240808113833-1.jpeg b/Marinated Smoked Goose Breast Recipe.md/Exported image 20240808113833-1.jpeg new file mode 100644 index 0000000..0532dbe Binary files /dev/null and b/Marinated Smoked Goose Breast Recipe.md/Exported image 20240808113833-1.jpeg differ diff --git a/Marinated Smoked Goose Breast Recipe.md/Exported image 20240808113833-2.png b/Marinated Smoked Goose Breast Recipe.md/Exported image 20240808113833-2.png new file mode 100644 index 0000000..7e50961 Binary files /dev/null and b/Marinated Smoked Goose Breast Recipe.md/Exported image 20240808113833-2.png differ diff --git a/OneNote/Ben's Notebook/Bible Study/1 Peter Flow Outline.md b/OneNote/Ben's Notebook/Bible Study/1 Peter Flow Outline.md new file mode 100644 index 0000000..44b2e9b --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/1 Peter Flow Outline.md @@ -0,0 +1,118 @@ +Peter, +an apostle of Jesus Christ, +To those who are +elect +exiles +of the Dispersion in Pontus, Galatia, Cappadocia, Asia, and Bithynia, + +according to the foreknowledge of God the Father, +in the sanctification of the Spirit, +for +obedience to Jesus Christ and for +sprinkling with his blood: +May grace and peace be multiplied to you. + +Blessed be the God and Father of our Lord Jesus Christ! +According to his great mercy, +he has caused us to be born again +to a living hope +through the resurrection of Jesus Christ from the dead, +to an inheritance that is +imperishable, +undefiled, and +unfading, +kept in heaven for you, +who +by God’s power +are being guarded +through faith +for a salvation ready to be revealed in the last time. + +In this you rejoice, though +now for a little while, +if necessary, +you have been grieved by various trials, +so that the tested genuineness of your faith— +more precious than gold that perishes though it is tested by fire— +may be found to result in +praise and +glory and +honor +at the revelation of Jesus Christ. + +Though you have not seen him, you love him. +Though you do not now see him, +you +believe in him and +rejoice with joy that is +inexpressible and +filled with glory, +obtaining the outcome of your faith, the salvation of your souls. + +Concerning this salvation, the prophets who +prophesied about the grace that was to be yours +searched and inquired carefully, inquiring what +person or time +the Spirit of Christ in them was indicating +when he predicted +the sufferings of Christ and +the subsequent glories. +It was revealed to them +that they were serving +not themselves +but you, +in the things +that have now been announced to you +through those who preached the good news to you +by the Holy Spirit sent from heaven, +things into which angels long to look. + +Therefore, +preparing your minds for action, +and being sober-minded, +**set your hope fully** on the grace that will be brought to you at the revelation of Jesus Christ. + +As obedient children, +**do not be conformed** to the passions of your former ignorance, + +but as he who called you is holy, +you also **be holy** in all your conduct, +since it is written, “You shall be holy, for I am holy.” + +And if you call on him as Father who judges impartially according to each one’s deeds, +**conduct yourselves with fear** throughout the time of your exile, +knowing that you were ransomed from the futile ways inherited from your forefathers, +not with perishable things such as silver or gold, +but with the precious blood of Christ, +like that of a lamb without blemish or spot. +He was foreknown before the foundation of the world but was made manifest in the last times for the sake of you +who through him are believers in God, +who raised him from the dead and gave him glory, +so that your faith and hope are in God. + +Having purified your souls +by your obedience to the truth +for a sincere brotherly love, +**love one another** earnestly from a pure heart, +since you have been born again, +not of perishable seed but of imperishable, +through the living and abiding word of God; +for “All flesh is like grass and all its glory like the flower of grass. The grass withers, and the flower falls, but the word of the Lord remains forever.” And this word is the good news that was preached to you. + +So put away all malice and all deceit and hypocrisy and envy and all slander. + +Like newborn infants, +**long for the pure spiritual milk**, +that by it you may grow up into salvation— +if indeed you have tasted that the Lord is good. + +As you come to him, +a living stone rejected by men +but in the sight of God +chosen and +precious, +you yourselves like living stones are being built up as a spiritual house, +to be a holy priesthood, +to offer spiritual sacrifices acceptable to God through Jesus Christ. + +For it stands in Scripture: “Behold, I am laying in Zion a stone, a cornerstone chosen and precious, and whoever believes in him will not be put to shame.” So the honor is for you who believe, but for those who do not believe, “The stone that the builders rejected has become the cornerstone,” and “A stone of stumbling, and a rock of offense.” They stumble because they disobey the word, as they were destined to do. But you are a chosen race, a royal priesthood, a holy nation, a people for his own possession, that you may proclaim the excellencies of him who called you out of darkness into his marvelous light. Once you were not a people, but now you are God’s people; once you had not received mercy, but now you have received mercy. Beloved, I urge you as sojourners and exiles to abstain from the passions of the flesh, which wage war against your soul. Keep your conduct among the Gentiles honorable, so that when they speak against you as evildoers, they may see your good deeds and glorify God on the day of visitation. Be subject for the Lord’s sake to every human institution, whether it be to the emperor as supreme, or to governors as sent by him to punish those who do evil and to praise those who do good. For this is the will of God, that by doing good you should put to silence the ignorance of foolish people. Live as people who are free, not using your freedom as a cover-up for evil, but living as servants of God. Honor everyone. Love the brotherhood. Fear God. Honor the emperor. Servants, be subject to your masters with all respect, not only to the good and gentle but also to the unjust. For this is a gracious thing, when, mindful of God, one endures sorrows while suffering unjustly. For what credit is it if, when you sin and are beaten for it, you endure? But if when you do good and suffer for it you endure, this is a gracious thing in the sight of God. For to this you have been called, because Christ also suffered for you, leaving you an example, so that you might follow in his steps. He committed no sin, neither was deceit found in his mouth. When he was reviled, he did not revile in return; when he suffered, he did not threaten, but continued entrusting himself to him who judges justly. He himself bore our sins in his body on the tree, that we might die to sin and live to righteousness. By his wounds you have been healed. For you were straying like sheep, but have now returned to the Shepherd and Overseer of your souls. Likewise, wives, be subject to your own husbands, so that even if some do not obey the word, they may be won without a word by the conduct of their wives, when they see your respectful and pure conduct. Do not let your adorning be external—the braiding of hair and the putting on of gold jewelry, or the clothing you wear— but let your adorning be the hidden person of the heart with the imperishable beauty of a gentle and quiet spirit, which in God’s sight is very precious. For this is how the holy women who hoped in God used to adorn themselves, by submitting to their own husbands, as Sarah obeyed Abraham, calling him lord. And you are her children, if you do good and do not fear anything that is frightening. Likewise, husbands, live with your wives in an understanding way, showing honor to the woman as the weaker vessel, since they are heirs with you of the grace of life, so that your prayers may not be hindered. Finally, all of you, have unity of mind, sympathy, brotherly love, a tender heart, and a humble mind. Do not repay evil for evil or reviling for reviling, but on the contrary, bless, for to this you were called, that you may obtain a blessing. For “Whoever desires to love life and see good days, let him keep his tongue from evil and his lips from speaking deceit; let him turn away from evil and do good; let him seek peace and pursue it. For the eyes of the Lord are on the righteous, and his ears are open to their prayer. But the face of the Lord is against those who do evil.” Now who is there to harm you if you are zealous for what is good? But even if you should suffer for righteousness’ sake, you will be blessed. Have no fear of them, nor be troubled, but in your hearts honor Christ the Lord as holy, always being prepared to make a defense to anyone who asks you for a reason for the hope that is in you; yet do it with gentleness and respect, having a good conscience, so that, when you are slandered, those who revile your good behavior in Christ may be put to shame. For it is better to suffer for doing good, if that should be God’s will, than for doing evil. For Christ also suffered once for sins, the righteous for the unrighteous, that he might bring us to God, being put to death in the flesh but made alive in the spirit, in which he went and proclaimed to the spirits in prison, because they formerly did not obey, when God’s patience waited in the days of Noah, while the ark was being prepared, in which a few, that is, eight persons, were brought safely through water. Baptism, which corresponds to this, now saves you, not as a removal of dirt from the body but as an appeal to God for a good conscience, through the resurrection of Jesus Christ, who has gone into heaven and is at the right hand of God, with angels, authorities, and powers having been subjected to him. Since therefore Christ suffered in the flesh, arm yourselves with the same way of thinking, for whoever has suffered in the flesh has ceased from sin, so as to live for the rest of the time in the flesh no longer for human passions but for the will of God. For the time that is past suffices for doing what the Gentiles want to do, living in sensuality, passions, drunkenness, orgies, drinking parties, and lawless idolatry. With respect to this they are surprised when you do not join them in the same flood of debauchery, and they malign you; but they will give account to him who is ready to judge the living and the dead. For this is why the gospel was preached even to those who are dead, that though judged in the flesh the way people are, they might live in the spirit the way God does. The end of all things is at hand; therefore be self-controlled and sober-minded for the sake of your prayers. Above all, keep loving one another earnestly, since love covers a multitude of sins. Show hospitality to one another without grumbling. As each has received a gift, use it to serve one another, as good stewards of God’s varied grace: whoever speaks, as one who speaks oracles of God; whoever serves, as one who serves by the strength that God supplies—in order that in everything God may be glorified through Jesus Christ. To him belong glory and dominion forever and ever. Amen. Beloved, do not be surprised at the fiery trial when it comes upon you to test you, as though something strange were happening to you. But rejoice insofar as you share Christ’s sufferings, that you may also rejoice and be glad when his glory is revealed. If you are insulted for the name of Christ, you are blessed, because the Spirit of glory and of God rests upon you. But let none of you suffer as a murderer or a thief or an evildoer or as a meddler. Yet if anyone suffers as a Christian, let him not be ashamed, but let him glorify God in that name. For it is time for judgment to begin at the household of God; and if it begins with us, what will be the outcome for those who do not obey the gospel of God? And “If the righteous is scarcely saved, what will become of the ungodly and the sinner?” Therefore let those who suffer according to God’s will entrust their souls to a faithful Creator while doing good. So I exhort the elders among you, as a fellow elder and a witness of the sufferings of Christ, as well as a partaker in the glory that is going to be revealed: shepherd the flock of God that is among you, exercising oversight, not under compulsion, but willingly, as God would have you; not for shameful gain, but eagerly; not domineering over those in your charge, but being examples to the flock. And when the chief Shepherd appears, you will receive the unfading crown of glory. Likewise, you who are younger, be subject to the elders. Clothe yourselves, all of you, with humility toward one another, for “God opposes the proud but gives grace to the humble.” Humble yourselves, therefore, under the mighty hand of God so that at the proper time he may exalt you, casting all your anxieties on him, because he cares for you. Be sober-minded; be watchful. Your adversary the devil prowls around like a roaring lion, seeking someone to devour. Resist him, firm in your faith, knowing that the same kinds of suffering are being experienced by your brotherhood throughout the world. And after you have suffered a little while, the God of all grace, who has called you to his eternal glory in Christ, will himself restore, confirm, strengthen, and establish you. To him be the dominion forever and ever. Amen. By Silvanus, a faithful brother as I regard him, I have written briefly to you, exhorting and declaring that this is the true grace of God. Stand firm in it. She who is at Babylon, who is likewise chosen, sends you greetings, and so does Mark, my son. Greet one another with the kiss of love. Peace to all of you who are in Christ. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/1 Peter Observation.md b/OneNote/Ben's Notebook/Bible Study/1 Peter Observation.md new file mode 100644 index 0000000..afe5304 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/1 Peter Observation.md @@ -0,0 +1,171 @@ +> [!caution] This page contained a drawing which was not converted. + +Peter, an apostle of Jesus Christ, +to the chosen +who are residing temporarily +in the dispersion in Pontus, Galatia, Cappadocia, Asia, and Bithynia, +according to the foreknowledge of God the Father, +by the sanctification of the Spirit, +for obedience and +for sprinkling with the blood of Jesus Christ. +May grace and peace be multiplied to you. + + +Blessed be the God and Father of our Lord Jesus Christ, +who +according to his great mercy +has caused us to be born again +to a living hope +through the resurrection of Jesus Christ from the dead, +into an inheritance +imperishable and +undefiled and +unfading, +reserved in heaven for you + +who +are being protected by the power of God +through faith +for a salvation ready to be revealed in the last time, + +in which you rejoice greatly, although now for a short time, if necessary, you are distressed by various trials, +so that the genuineness of your faith, +more valuable than gold +that is passing away, but is tested by fire, +may be found to result in praise and glory and honor at the revelation of Jesus Christ, + +whom, +although you have not seen, +you love; +in whom now you believe, +although you do not see him, + +and you rejoice greatly +with joy inexpressible and +full of glory, +obtaining the goal of your faith, the salvation of your souls. + + +Concerning this salvation, the prophets +who +prophesied about the grace meant for you +sought and made careful inquiry, investigating +for what person or +which time +the Spirit of Christ in them was indicating +when he testified beforehand +to the sufferings with reference to Christ and +the glories after these things, +to whom it was revealed +that they were serving not themselves +but you +with reference to the same things +which now have been announced to you +through those who proclaimed the gospel +to you by the Holy Spirit sent from heaven, +things into which angels desire to look. + + +Therefore, +when you have prepared your minds for action +by being self-controlled, +put your hope completely in the grace that will be brought to you at the revelation of Jesus Christ. + +As obedient children, +do not be conformed to the former desires you used to conform to in your ignorance, +but +as the one who called you is holy, +you yourselves be holy in all your conduct, for it is written, “You will be holy, because I am holy.” + +And +if you call on him as Father who judges impartially according to each one’s work, +conduct yourselves with fear during the time of your temporary residence, +because you know that +you were redeemed from your futile way of life inherited from your ancestors +not with perishable things like silver or gold, +but with the precious blood of Christ, +like that of an unblemished and spotless lamb +who was foreknown before the foundation of the world, +but has been revealed in these last times for you +who +through him are believing in God, +who +raised him from the dead and +gave him glory, +so that your faith and hope are in God. +Having purified your souls by your obedience to the truth for sincere brotherly love, +love one another fervently from the heart, +because you have been born again, +not from perishable seed +but imperishable, +through the living and enduring word of God. +For “all flesh is like grass, and all its glory like the flower of the grass. The grass withers and the flower falls off, but the word of the Lord endures forever.” +And this is the word that has been proclaimed to you. + + +Therefore, +ridding yourselves of +all malice and +all deceit and +hypocrisy and +envy and +all slander, +like newborn infants +long for the unadulterated spiritual milk, +so that by it you may grow up to salvation, +if you have tasted that the Lord is kind, +to whom you are drawing near, +a living stone rejected by men +but +chosen and +precious in the sight of God. + + +And you yourselves, as living stones, are being built up as a spiritual house +for a holy priesthood, +to offer up spiritual sacrifices +acceptable to God through Jesus Christ. +For it stands in scripture, “Behold, I am laying in Zion a stone, a chosen and precious cornerstone, and the one who believes in him will never be put to shame.” Therefore the honor is for you who believe, +but for those who refuse to believe, “The stone that the builders rejected, this one has become the cornerstone,” and “A stone of stumbling and a rock of offense,” who stumble because they disobey the word to which also they were consigned. + + +But you are +a chosen race, +a royal priesthood, +a holy nation, +a people for God’s possession, +so that you +may proclaim the virtues of the one who called you +out of darkness +into his marvelous light, +who +once were not a people, +but now are the people of God, +the ones who were not shown mercy, +but now are shown mercy. + +Dear friends, I urge you as foreigners and temporary residents to abstain from fleshly desires which wage war against your soul, maintaining your good conduct among the Gentiles, so that in the things in which they slander you as evildoers, by seeing your good deeds they may glorify God on the day of visitation. + + +Subject yourselves to every human authority for the sake of the Lord, whether to a king as having supreme authority, or to governors as those sent out by him for the punishment of those who do evil and the praise of those who do good. For the will of God is as follows: by doing good to silence the ignorance of foolish people. + + +Live as free persons, and not using your freedom as a covering for evil, but as slaves of God. Honor all people, love the community of believers, fear God, honor the king. + + +Domestic slaves, be subject to your masters with all respect, not only to those who are good and gentle, but also to those who are unjust. For this finds favor, if because of consciousness of God someone endures sorrows while suffering unjustly. For what credit is it if, when you sin and are beaten for it, you endure? But if you endure when you do good and suffer for it, this finds favor with God. For to this you were called, because Christ also suffered for you, leaving you an example, so that you should follow in his footsteps, who did not commit sin, nor was deceit found in his mouth, who when he was reviled, did not revile in return; when suffering, he did not threaten, but entrusted himself to the one who judges justly, who himself bore our sins in his body on the tree, so that we may die to sins and live to righteousness, by whose wounds you were healed. For you were going astray like sheep, but you have turned back now to the shepherd and guardian of your souls. + + +In the same way, wives, be subject to your own husbands, so that even if some are disobedient to the word, they may be won over without a word by the conduct of their wives, when they see your respectful, pure conduct. Let your adornment not be the external kind, braiding hair and putting on gold jewelry or putting on fine clothing, but the hidden person of the heart, with the imperishable quality of a gentle and quiet spirit, which is highly valuable in the sight of God. For in the same way formerly the holy women also, who hoped in God, used to adorn themselves by being subject to their own husbands, like Sarah obeyed Abraham, calling him lord, whose children you have become when you do good and are not frightened with respect to any terror. + + +Husbands, in the same way live with your wives knowledgeably, as with the weaker female vessel, showing them honor as fellow heirs also of the grace of life, so that your prayers will not be hindered. + + +And finally, all of you be harmonious, sympathetic, showing mutual affection, compassionate, humble, not repaying evil for evil or insult for insult, but on the other hand blessing others, because for this reason you were called, so that you could inherit a blessing. For “The one who wants to love life and see good days must keep his tongue from evil and his lips must not speak deceit. And he must turn away from evil and do good; he must seek peace and pursue it. For the eyes of the Lord are on the righteous, and his ears are open to their prayer. But the face of the Lord is against those who do evil. + + +And who is the one who will harm you if you are a zealous adherent for what is good? But even if you might suffer for the sake of righteousness, you are blessed. And do not be afraid of their intimidation or be disturbed, but set Christ apart as Lord in your hearts, always ready to make a defense to anyone who asks you for an accounting concerning the hope that is in you. But do so with courtesy and respect, having a good conscience, so that in the things in which you are slandered, the ones who malign your good conduct in Christ may be put to shame. + + +For it is better to suffer for doing good, if God wills it, than for doing evil. For Christ also suffered once for sins, the just for the unjust, in order that he could bring you to God, being put to death in the flesh, but made alive in the spirit, in which also he went and proclaimed to the spirits in prison, who were formerly disobedient, when the patience of God waited in the days of Noah, while an ark was being constructed, in which a few—that is, eight souls—were rescued through water. And also, corresponding to this, baptism now saves you, not the removal of dirt from the flesh, but an appeal to God for a good conscience through the resurrection of Jesus Christ, who is at the right hand of God, having gone into heaven, with angels and authorities and powers having been subjected to him. Therefore, because Christ suffered in the flesh, you also equip yourselves with the same way of thinking, because the one who has suffered in the flesh has ceased from sin, in order to live the remaining time in the flesh no longer for human desires, but for the will of God. For the time that has passed was sufficient to do what the Gentiles desire to do, having lived in licentiousness, evil desires, drunkenness, carousing, drinking parties, and wanton idolatries, with respect to which they are surprised when you do not run with them into the same flood of dissipation, and so they revile you. They will give an account to the one who is ready to judge the living and the dead. Because for this reason also the gospel was preached to those who are dead, so that they were judged by human standards in the flesh, but they may live in the spirit by God’s standards. Now the end of all things draws near. Therefore be self-controlled and sober-minded for your prayers. Above all, keep your love for one another constant, because love covers a large number of sins. Be hospitable to one another without complaining. Just as each one has received a gift, use it for serving one another, as good stewards of the varied grace of God. If anyone speaks, let it be as the oracles of God; if anyone serves, let it be as by the strength that God provides, so that in all things God will be glorified through Jesus Christ, to whom is the glory and the power forever and ever. Amen. Dear friends, do not be surprised at the fiery ordeal among you, when it takes place to test you, as if something strange were happening to you. But to the degree that you share in the sufferings of Christ, rejoice, so that also at the revelation of his glory you may rejoice and be glad. If you are reviled on account of the name of Christ, you are blessed, because the Spirit of glory and of God rests on you. By all means do not let anyone of you suffer as a murderer or a thief or an evildoer or as a meddler. But if someone suffers as a Christian, he must not be ashamed, but must glorify God with this name. For it is the time for the judgment to begin out from the household of God. But if it begins out from us first, what will be the outcome for those who are disobedient to the gospel of God? And if the righteous are saved with difficulty, what will become of the ungodly and the sinner? So then also those who suffer according to the will of God must entrust their souls to a faithful Creator in doing good. Therefore I, your fellow elder and a witness of the sufferings of Christ, and also a sharer of the glory that is going to be revealed, exhort the elders among you: shepherd the flock of God among you, exercising oversight not by compulsion but willingly, in accordance with God, and not greedily but eagerly, and not as lording it over those under your care, but being examples for the flock. And when the chief Shepherd appears, you will receive the unfading crown of glory. In the same way, younger men, be subject to the elders, and all of you clothe yourselves with humility toward one another, because God opposes the proud, but gives grace to the humble. Humble yourselves therefore under the mighty hand of God, so that he may exalt you at the right time, casting all your cares on him, because he cares for you. Be sober; be on the alert. Your adversary the devil walks around like a roaring lion, looking for someone to devour. Resist him, steadfast in your faith, because you know the same kinds of sufferings are being accomplished by your community of believers in the world. And the God of all grace, who called you to his eternal glory in Christ, after you have suffered for a short time, will himself restore, confirm, strengthen, and establish you. To him be the power forever and ever. Amen. Through Silvanus, the faithful brother (as I consider him), I have written to you briefly to encourage you and to attest that this is the true grace of God. Stand firm in it. She who is in Babylon, chosen the same as you, greets you, and so does my son Mark. Greet one another with a loving kiss. Peace to all of you who are in Christ. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/1 Peter Outline.md b/OneNote/Ben's Notebook/Bible Study/1 Peter Outline.md new file mode 100644 index 0000000..a07d057 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/1 Peter Outline.md @@ -0,0 +1,128 @@ +Theme: The true grace of God (1 Peter 5:12) + +God's true grace is revealed in salvation, submission, suffering and humility. + +1. **Greeting (1:1-2)** + + 1. From Peter (1:1a)_1 Peter, an apostle of Jesus Christ,_ + 2. To the dispersed chose (1:1b)_To those who are elect exiles of the Dispersion in Pontus, Galatia, Cappadocia, Asia, and Bithynia,_ + 3. Comfort and purpose (1:2a) + + 1. God had foreknowledge of their dispersion_2 according to the foreknowledge of God the Father,_ + 2. It has purpose + + 1. Sanctification in the Spirit_in the sanctification of the Spirit,_ + 2. Practicing obedience_for obedience to Jesus Christ_ + 3. Sprinkling of the blood of Christ (evangelism)_and for sprinkling with his blood:_ + 4. Blessing (1:2b) + + _May grace and peace be multiplied to you._ + +2. **True grace revealed in salvation (1:3-2:10)** + + 1. The role of the godhead (1:3-12) + + 1. The Father secures our salvation (1:3-5)_3 Blessed be the God and Father of our Lord Jesus Christ! According to his great mercy, he has caused us to be born again to a living hope through the resurrection of Jesus Christ from the dead, 4 to an inheritance that is imperishable, undefiled, and unfading, kept in heaven for you, 5 who by God’s power are being guarded through faith for a salvation ready to be revealed in the last time._ + 2. The Son validates our salvation (1:6-9)_6 In this you rejoice, though now for a little while, if necessary, you have been grieved by various trials, 7 so that the tested genuineness of your faith—more precious than gold that perishes though it is tested by fire—may be found to result in praise and glory and honor at the revelation of Jesus Christ. 8 Though you have not seen him, you love him. Though you do not now see him, you believe in him and rejoice with joy that is inexpressible and filled with glory, 9 obtaining the outcome of your faith, the salvation of your souls._ + 3. The Spirit reveals our salvation (1:10-12) + + _10 Concerning this salvation, the prophets who prophesied about the grace that was to be yours searched and inquired carefully, 11 inquiring what person or time the Spirit of Christ in them was indicating when he predicted the sufferings of Christ and the subsequent glories. 12 It was revealed to them that they were serving not themselves but you, in the things that have now been announced to you through those who preached the good news to you by the Holy Spirit sent from heaven, things into which angels long to look._ + + 2. The response of the believer (1:13-2:10) + + 1. We set our hope on the grace (1:13)_13 Therefore, preparing your minds for action, and being sober-minded, set your hope fully on the grace that will be brought to you at the revelation of Jesus Christ._ + 2. We pursue holiness (1:14-16)_14 As obedient children, do not be conformed to the passions of your former ignorance, 15 but as he who called you is holy, you also be holy in all your conduct, 16 since it is written, “You shall be holy, for I am holy.”_ + 3. We conduct ourselves with fear (1:17-21) + + _17 And if you call on him as Father who judges impartially according to each one’s deeds, conduct yourselves with fear throughout the time of your exile, 18 knowing that you were ransomed from the futile ways inherited from your forefathers, not with perishable things such as silver or gold, 19 but with the precious blood of Christ, like that of a lamb without blemish or spot. 20 He was foreknown before the foundation of the world but was made manifest in the last times for the sake of you 21 who through him are believers in God, who raised him from the dead and gave him glory, so that your faith and hope are in God._ + + 5. We love one another earnestly (1:22-2:1) + + _22 Having purified your souls by your obedience to the truth for a sincere brotherly love, love one another earnestly from a pure heart, 23 since you have been born again, not of perishable seed but of imperishable, through the living and abiding word of God; 24 for_ + _“All flesh is like grass_ + _and all its glory like the flower of grass._ + _The grass withers,_ + _and the flower falls,_ + _25  but the word of the Lord remains forever.”_ + _And this word is the good news that was preached to you._ ___2 So put away all malice and all deceit and hypocrisy and envy and all slander._ + + 7. We long to grow (2:2-3)_2 Like newborn infants, long for the pure spiritual milk, that by it you may grow up into salvation— 3 if indeed you have tasted that the Lord is good._ + 3. The result of the roles fulfilled: a spiritual house (2:4-8) + + _4 As you come to him, a living stone rejected by men but in the sight of God chosen and precious, 5 you yourselves like living stones are being built up as a spiritual house, to be a holy priesthood, to offer spiritual sacrifices acceptable to God through Jesus Christ. 6 For it stands in Scripture:_ + _“Behold, I am laying in Zion a stone,_ + _a cornerstone chosen and precious,_ + _and whoever believes in him will not be put to shame.”_ + _7 So the honor is for you who believe, but for those who do not believe,_ + _“The stone that the builders rejected_ + _has become the cornerstone,”_ + _8 and_ + _“A stone of stumbling,_ + _and a rock of offense.”_ + _They stumble because they disobey the word, as they were destined to do._ + + 5. The true grace of God revealed in salvation: we work together to accomplish God's purpose (2:9-10) + + _9 But you are a chosen race, a royal priesthood, a holy nation, a people for his own possession, that you may proclaim the excellencies of him who called you out of darkness into his marvelous light. 10 Once you were not a people, but now you are God’s people; once you had not received mercy, but now you have received mercy._ + +3. **Transition: the reality of how God has situated us (2:11-12)******How do we live as the household of God among a world of unbelievers? How can we succeed? We can be strengthened by seeing the reality of how God has situated us. He's given us a source of strong relationships (the church) to encourage one another. He's given us the correct view of our residence here on earth--we have a citizenship in heaven, though we are to live here and thrive here. He's revealed to us our true enemy: our own weak flesh, the primary culprit when we sin. He's turned the tables so that our power is to influence the world around us by doing good, not the other way around. These verses seem to serve as a bridge between what Peter has said and what he is about to say. Knowing what God has done for us and who we are as believers, now he will address, in depth, two major categories of struggle for believers when living in the world: submission and suffering. + + 1. Our relationships (loving, close)_11 Beloved, I urge you_ + 2. Our residence (not belonging, but living)_as sojourners and exiles_ + 3. Our enemy (primarily our own flesh)_to abstain from the passions of the flesh, which wage war against your soul._ + 4. Our influence (we influence the world, the world shouldn't influence us)_12 Keep your conduct among the Gentiles honorable, so that when they speak against you as evildoers, they may see your good deeds and glorify God on the day of visitation._ +4. **True grace revealed in submission (2:13-3:12)** + + 1. Submission as citizens (2:13-17)_13 Be subject for the Lord’s sake to every human institution, whether it be to the emperor as supreme, 14 or to governors as sent by him to punish those who do evil and to praise those who do good. 15 For this is the will of God, that by doing good you should put to silence the ignorance of foolish people. 16 Live as people who are free, not using your freedom as a cover-up for evil, but living as servants of God. 17 Honor everyone. Love the brotherhood. Fear God. Honor the emperor._ + 2. Submission as servants (2:18-25)_18 Servants, be subject to your masters with all respect, not only to the good and gentle but also to the unjust. 19 For this is a gracious thing, when, mindful of God, one endures sorrows while suffering unjustly. 20 For what credit is it if, when you sin and are beaten for it, you endure? But if when you do good and suffer for it you endure, this is a gracious thing in the sight of God. 21 For to this you have been called, because Christ also suffered for you, leaving you an example, so that you might follow in his steps. 22 He committed no sin, neither was deceit found in his mouth. 23 When he was reviled, he did not revile in return; when he suffered, he did not threaten, but continued entrusting himself to him who judges justly. 24 He himself bore our sins in his body on the tree, that we might die to sin and live to righteousness. By his wounds you have been healed. 25 For you were straying like sheep, but have now returned to the Shepherd and Overseer of your souls._ + 3. Submission as married ones (3:1-7) + + 1. As wives (3:1-6)_3 Likewise, wives, be subject to your own husbands, so that even if some do not obey the word, they may be won without a word by the conduct of their wives, 2 when they see your respectful and pure conduct. 3 Do not let your adorning be external—the braiding of hair and the putting on of gold jewelry, or the clothing you wear— 4 but let your adorning be the hidden person of the heart with the imperishable beauty of a gentle and quiet spirit, which in God’s sight is very precious. 5 For this is how the holy women who hoped in God used to adorn themselves, by submitting to their own husbands, 6 as Sarah obeyed Abraham, calling him lord. And you are her children, if you do good and do not fear anything that is frightening._ + 2. As husbands (3:7)_7 Likewise, husbands, live with your wives in an understanding way, showing honor to the woman as the weaker vessel, since they are heirs with you of the grace of life, so that your prayers may not be hindered._ + 4. Submission to each other (3:8-12) + + _8 Finally, all of you, have unity of mind, sympathy, brotherly love, a tender heart, and a humble mind. 9 Do not repay evil for evil or reviling for reviling, but on the contrary, bless, for to this you were called, that you may obtain a blessing. 10 For_ + _“Whoever desires to love life_ + _and see good days,_ + _let him keep his tongue from evil_ + _and his lips from speaking deceit;_ + _11  let him turn away from evil and do good;_ + _let him seek peace and pursue it._ + _12  For the eyes of the Lord are on the righteous,_ + _and his ears are open to their prayer._ + _But the face of the Lord is against those who do evil.”_ + +5. **True grace revealed in suffering (3:13-4:19)** + + 1. Suffer for good, not evil (3:13-22) + + _13 Now who is there to harm you if you are zealous for what is good? 14 But even if you should suffer for righteousness’ sake, you will be blessed. Have no fear of them, nor be troubled, 15 but in your hearts honor Christ the Lord as holy, always being prepared to make a defense to anyone who asks you for a reason for the hope that is in you; yet do it with gentleness and respect, 16 having a good conscience, so that, when you are slandered, those who revile your good behavior in Christ may be put to shame. 17 For it is better to suffer for doing good, if that should be God’s will, than for doing evil._ + _18 For Christ also suffered once for sins, the righteous for the unrighteous, that he might bring us to God, being put to death in the flesh but made alive in the spirit, 19 in which he went and proclaimed to the spirits in prison, 20 because they formerly did not obey, when God’s patience waited in the days of Noah, while the ark was being prepared, in which a few, that is, eight persons, were brought safely through water. 21 Baptism, which corresponds to this, now saves you, not as a removal of dirt from the body but as an appeal to God for a good conscience, through the resurrection of Jesus Christ, 22 who has gone into heaven and is at the right hand of God, with angels, authorities, and powers having been subjected to him._ + + 3. Purpose to suffer (4:1-11) + + _4 Since therefore Christ suffered in the flesh, arm yourselves with the same way of thinking, for whoever has suffered in the flesh has ceased from sin, 2 so as to live for the rest of the time in the flesh no longer for human passions but for the will of God. 3 For the time that is past suffices for doing what the Gentiles want to do, living in sensuality, passions, drunkenness, orgies, drinking parties, and lawless idolatry. 4 With respect to this they are surprised when you do not join them in the same flood of debauchery, and they malign you; 5 but they will give account to him who is ready to judge the living and the dead. 6 For this is why the gospel was preached even to those who are dead, that though judged in the flesh the way people are, they might live in the spirit the way God does._ + _7 The end of all things is at hand; therefore be self-controlled and sober-minded for the sake of your prayers. 8 Above all, keep loving one another earnestly, since love covers a multitude of sins. 9 Show hospitality to one another without grumbling. 10 As each has received a gift, use it to serve one another, as good stewards of God’s varied grace: 11 whoever speaks, as one who speaks oracles of God; whoever serves, as one who serves by the strength that God supplies—in order that in everything God may be glorified through Jesus Christ. To him belong glory and dominion forever and ever. Amen._ + + 5. Summary (4:12-19) + + 1. Expect trials, it is testing (4:12)_12 Beloved, do not be surprised at the fiery trial when it comes upon you to test you, as though something strange were happening to you._ + 2. Rejoice in suffering (4:13)_13 But rejoice insofar as you share Christ’s sufferings, that you may also rejoice and be glad when his glory is revealed._ + 3. If you are reviled, you are blessed (4:14)_14 If you are insulted for the name of Christ, you are blessed, because the Spirit of glory and of God rests upon you._ + 4. Suffer as a Christian, not an evil doer (4:15-16)_15 But let none of you suffer as a murderer or a thief or an evildoer or as a meddler. 16 Yet if anyone suffers as a Christian, let him not be ashamed, but let him glorify God in that name._ + 5. Judgement is coming (4:17-18) + + _17 For it is time for judgment to begin at the household of God; and if it begins with us, what will be the outcome for those who do not obey the gospel of God? 18 And_ + _“If the righteous is scarcely saved,_ + _what will become of the ungodly and the sinner?”_ + + 6. Trust your faithful creator (4:19)_19 Therefore let those who suffer according to God’s will entrust their souls to a faithful Creator while doing good._ +6. **True grace revealed in humility (5:1-11)** + + 1. As elders (5:1-4)_5 So I exhort the elders among you, as a fellow elder and a witness of the sufferings of Christ, as well as a partaker in the glory that is going to be revealed: 2 shepherd the flock of God that is among you, exercising oversight, not under compulsion, but willingly, as God would have you; not for shameful gain, but eagerly; 3 not domineering over those in your charge, but being examples to the flock. 4 And when the chief Shepherd appears, you will receive the unfading crown of glory._ + 2. As young men (5:5)_5 Likewise, you who are younger, be subject to the elders. Clothe yourselves, all of you, with humility toward one another, for “God opposes the proud but gives grace to the humble.”_ + 3. As anyone (5:6-11)_6 Humble yourselves, therefore, under the mighty hand of God so that at the proper time he may exalt you, 7 casting all your anxieties on him, because he cares for you. 8 Be sober-minded; be watchful. Your adversary the devil prowls around like a roaring lion, seeking someone to devour. 9 Resist him, firm in your faith, knowing that the same kinds of suffering are being experienced by your brotherhood throughout the world. 10 And after you have suffered a little while, the God of all grace, who has called you to his eternal glory in Christ, will himself restore, confirm, strengthen, and establish you. 11 To him be the dominion forever and ever. Amen._ +7. **Farewell (5:12-14)** + +_12 By Silvanus, a faithful brother as I regard him, I have written briefly to you, exhorting and declaring that this is the true grace of God. Stand firm in it. 13 She who is at Babylon, who is likewise chosen, sends you greetings, and so does Mark, my son. 14 Greet one another with the kiss of love._ +_Peace to all of you who are in Christ._ \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/1 Thessalonians Observation.md b/OneNote/Ben's Notebook/Bible Study/1 Thessalonians Observation.md new file mode 100644 index 0000000..216d8f8 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/1 Thessalonians Observation.md @@ -0,0 +1,189 @@ +> [!caution] This page contained a drawing which was not converted. + +1 Thessalonians 1 + +1 Paul and Silvanus and Timothy, To the church of the Thessalonians in God the Father and the Lord Jesus Christ: Grace to you and peace. + +2 We give thanks to God always for all of you, making mention of you in our prayers; + +3 constantly bearing in mind your work of faith and labor of love and steadfastness of hope in our Lord Jesus Christ in the presence of our God and Father, + +4 knowing, brethren beloved by God, His choice of you; + +5 for our gospel did not come to you in word only, but also in power and in the Holy Spirit and with full conviction; just as you know what kind of men we proved to be among you for your sake. + +6 You also became imitators of us and of the Lord, having received the word in much tribulation with the joy of the Holy Spirit, + +7 so that you became an example to all the believers in Macedonia and in Achaia. + +8 For the word of the Lord has sounded forth from you, not only in Macedonia and Achaia, but also in every place your faith toward God has gone forth, so that we have no need to say anything. + +9 For they themselves report about us what kind of a reception we had with you, and how you turned to God from idols to serve a living and true God, + +10 and to wait for His Son from heaven, whom He raised from the dead, that is Jesus, who rescues us from the wrath to come. + +1 Thessalonians 2 + +1 For you yourselves know, brethren, that our coming to you was not in vain, + +2 but after we had already suffered and been mistreated in Philippi, as you know, we had the boldness in our God to speak to you the gospel of God amid much opposition. + +3 For our exhortation does not come from error or impurity or by way of deceit; + +4 but just as we have been approved by God to be entrusted with the gospel, so we speak, not as pleasing men, but God who examines our hearts. + +5 For we never came with flattering speech, as you know, nor with a pretext for greed—God is witness— + +6 nor did we seek glory from men, either from you or from others, even though as apostles of Christ we might have asserted our authority. + +7 But we proved to be gentle among you, as a nursing mother tenderly cares for her own children. + +8 Having so fond an affection for you, we were well-pleased to impart to you not only the gospel of God but also our own lives, because you had become very dear to us. + +9 For you recall, brethren, our labor and hardship, how working night and day so as not to be a burden to any of you, we proclaimed to you the gospel of God. + +10 You are witnesses, and so is God, how devoutly and uprightly and blamelessly we behaved toward you believers; + +11 just as you know how we were exhorting and encouraging and imploring each one of you as a father would his own children, + +12 so that you would walk in a manner worthy of the God who calls you into His own kingdom and glory. + +13 For this reason we also constantly thank God that when you received the word of God which you heard from us, you accepted it not as the word of men, but for what it really is, the word of God, which also performs its work in you who believe. + +14 For you, brethren, became imitators of the churches of God in Christ Jesus that are in Judea, for you also endured the same sufferings at the hands of your own countrymen, even as they did from the Jews, + +15 who both killed the Lord Jesus and the prophets, and drove us out. They are not pleasing to God, but hostile to all men, + +16 hindering us from speaking to the Gentiles so that they may be saved; with the result that they always fill up the measure of their sins. But wrath has come upon them to the utmost. + +17 But we, brethren, having been taken away from you for a short while—in person, not in spirit—were all the more eager with great desire to see your face. + +18 For we wanted to come to you—I, Paul, more than once—and yet Satan hindered us. + +19 For who is our hope or joy or crown of exultation? Is it not even you, in the presence of our Lord Jesus at His coming? + +20 For you are our glory and joy. + +1 Thessalonians 3 + +1 Therefore when we could endure it no longer, we thought it best to be left behind at Athens alone, + +2 and we sent Timothy, our brother and God’s fellow worker in the gospel of Christ, to strengthen and encourage you as to your faith, + +3 so that no one would be disturbed by these afflictions; for you yourselves know that we have been destined for this. + +4 For indeed when we were with you, we kept telling you in advance that we were going to suffer affliction; and so it came to pass, as you know. + +5 For this reason, when I could endure it no longer, I also sent to find out about your faith, for fear that the tempter might have tempted you, and our labor would be in vain. + +6 But now that Timothy has come to us from you, and has brought us good news of your faith and love, and that you always think kindly of us, longing to see us just as we also long to see you, + +7 for this reason, brethren, in all our distress and affliction we were comforted about you through your faith; + +8 for now we really live, if you stand firm in the Lord. + +9 For what thanks can we render to God for you in return for all the joy with which we rejoice before our God on your account, + +10 as we night and day keep praying most earnestly that we may see your face, and may complete what is lacking in your faith? + +11 Now may our God and Father Himself and Jesus our Lord direct our way to you; + +12 and may the Lord cause you to increase and abound in love for one another, and for all people, just as we also do for you; + +13 so that He may establish your hearts without blame in holiness before our God and Father at the coming of our Lord Jesus with all His saints. + +1 Thessalonians 4 + +1 Finally then, brethren, we request and exhort you in the Lord Jesus, that as you received from us instruction as to how you ought to walk and please God (just as you actually do walk), that you excel still more. + +2 For you know what commandments we gave you by the authority of the Lord Jesus. + +3 For this is the will of God, your sanctification; that is, that you abstain from sexual immorality; + +4 that each of you know how to possess his own vessel in sanctification and honor, + +5 not in lustful passion, like the Gentiles who do not know God; + +6 and that no man transgress and defraud his brother in the matter because the Lord is the avenger in all these things, just as we also told you before and solemnly warned you. + +7 For God has not called us for the purpose of impurity, but in sanctification. + +8 So, he who rejects this is not rejecting man but the God who gives His Holy Spirit to you. + +9 Now as to the love of the brethren, you have no need for anyone to write to you, for you yourselves are taught by God to love one another; + +10 for indeed you do practice it toward all the brethren who are in all Macedonia. But we urge you, brethren, to excel still more, + +11 and to make it your ambition to lead a quiet life and attend to your own business and work with your hands, just as we commanded you, + +12 so that you will behave properly toward outsiders and not be in any need. + +13 But we do not want you to be uninformed, brethren, about those who are asleep, so that you will not grieve as do the rest who have no hope. + +14 For if we believe that Jesus died and rose again, even so God will bring with Him those who have fallen asleep in Jesus. + +15 For this we say to you by the word of the Lord, that we who are alive and remain until the coming of the Lord, will not precede those who have fallen asleep. + +16 For the Lord Himself will descend from heaven with a shout, with the voice of the archangel and with the trumpet of God, and the dead in Christ will rise first. + +17 Then we who are alive and remain will be caught up together with them in the clouds to meet the Lord in the air, and so we shall always be with the Lord. + +18 Therefore comfort one another with these words. + +1 Thessalonians 5 + +1 Now as to the times and the epochs, brethren, you have no need of anything to be written to you. + +2 For you yourselves know full well that the day of the Lord will come just like a thief in the night. + +3 While they are saying, “Peace and safety!” then destruction will come upon them suddenly like labor pains upon a woman with child, and they will not escape. + +4 But you, brethren, are not in darkness, that the day would overtake you like a thief; + +5 for you are all sons of light and sons of day. We are not of night nor of darkness; + +6 so then let us not sleep as others do, but let us be alert and sober. + +7 For those who sleep do their sleeping at night, and those who get drunk get drunk at night. + +8 But since we are of the day, let us be sober, having put on the breastplate of faith and love, and as a helmet, the hope of salvation. + +9 For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ, + +10 who died for us, so that whether we are awake or asleep, we will live together with Him. + +11 Therefore encourage one another and build up one another, just as you also are doing. + +12 But we request of you, brethren, that you appreciate those who diligently labor among you, and have charge over you in the Lord and give you instruction, + +13 and that you esteem them very highly in love because of their work. Live in peace with one another. + +14 We urge you, brethren, admonish the unruly, encourage the fainthearted, help the weak, be patient with everyone. + +15 See that no one repays another with evil for evil, but always seek after that which is good for one another and for all people. + +16 Rejoice always; + +17 pray without ceasing; + +18 in everything give thanks; for this is God’s will for you in Christ Jesus. + +19 Do not quench the Spirit; + +20 do not despise prophetic utterances. + +21 But examine everything carefully; hold fast to that which is good; + +22 abstain from every form of evil. + +23 Now may the God of peace Himself sanctify you entirely; and may your spirit and soul and body be preserved complete, without blame at the coming of our Lord Jesus Christ. + +24 Faithful is He who calls you, and He also will bring it to pass. + +25 Brethren, pray for us. + +26 Greet all the brethren with a holy kiss. + +27 I adjure you by the Lord to have this letter read to all the brethren. + +28 The grace of our Lord Jesus Christ be with you. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/1 Thessalonians Outline.md b/OneNote/Ben's Notebook/Bible Study/1 Thessalonians Outline.md new file mode 100644 index 0000000..5b4881c --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/1 Thessalonians Outline.md @@ -0,0 +1,85 @@ +Outline + +1. Greeting (1:1) +2. Personal thoughts (1-3) + + 1. Paul is thankful for them (1:2-4) + + 1. Thankful to God in prayer (1:2) + 2. Because of their work, labor and steadfastness (1:3) + 2. Paul knows their salvation because of how the gospel came to them (1:4-5a) + + 1. In word + 2. In power + 3. In the Holy Spirit + 4. With full conviction + 3. They know Paul's salvation because of his proven character among them (1:5b) + 4. They became imitators (1:6-10) + + 1. Of Paul (and his companions) and the Lord (1:6a) + 2. By receiving the word with much tribulation and joy (1:6b) + 3. To all believers in Macedonia and Achaia (1:7) + 4. With the result that they became examples themselves (1:8-10) + + 1. The word sounded forth all around (1:8) + 2. Their faith was clearly proclaimed (1:9-10) + + 1. How they received them originally + 2. How they turned to God from idols + 3. How they served the living God + 4. How they are waiting for the Son + 5. Paul and his companions' conduct when they came (2:1-12) + + 1. …needs more study/detail here… + 6. Paul's joy in how they received the Word of God (2:13-20) + + 1. …needs more study/detail here… + 7. Encouragement of Timothy's visit (3:1-13) + + 1. …needs more study/detail here… +3. Practical direction (4-5) + + 1. Excel still more (4:1-12) + + 1. Excel more in what you already know (4:1-2) + 2. Abstain from sexual immorality (4:3-8) + 3. Love the brethren (4:9-12) + + 1. The need regarding love was to excel more. + + 1. They had no need to be written to. + + 1. They are taught by God to love. + 2. They were already practicing love to all around them. + 2. They could only be urged to excel still more. + 2. The means to excel was to adjust their ambition. + + 1. Part one of this ambition is to lead a quiet life. + 2. Part two of this ambition is to mind their own business. + 3. Part three of this ambition is to work with their hands. + 3. The outcome would be to the benefit of others. + + 1. Outsiders would see their property behavior. + 2. No one would need to aid them. + 2. Day of the Lord (4:13-5:11) + + 1. We will all join Him together (4:13-18) + 2. Be ready for it! (5:1-11) + 3. Final commands (5:12-22) + + 1. Appreciate diligent workers (5:12-13) + 2. Admonish the unruly (5:14a) + 3. Encourage the fainthearted (5:14b) + 4. Help the weak (5:14c) + 5. Be patient with everyone (5:14d) + 6. Repay no one evil for evil (5:15a) + 7. Seek after good for all (5:15b) + 8. Rejoice always (5:16) + 9. Pray without ceasing (5:17) + 10. Give thanks in everything (5:18) + 11. Do not quench the Spirit (5:19) + 12. Do not despise prophetic utterances (5:20) + 13. Examine everything carefully (5:21a) + 14. Hold fast to good (5:21b) + 15. Abstain from every form of evil (5:22) +4. Farewell (5:23-28) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Blind Bartimaeus observation.md b/OneNote/Ben's Notebook/Bible Study/Blind Bartimaeus observation.md new file mode 100644 index 0000000..8086c17 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Blind Bartimaeus observation.md @@ -0,0 +1,35 @@ +> [!caution] This page contained a drawing which was not converted. + +**Mark 10:46–52** +**46** Then they came to Jericho. And as He was leaving Jericho with His disciples and a large crowd, a blind beggar _named_ Bartimaeus, the son of Timaeus, was sitting by the road. + +**47** When he heard that it was Jesus the Nazarene, he began to cry out and say, “Jesus, Son of David, have mercy on me!” + +**48** Many were sternly telling him to be quiet, but he kept crying out all the more, “Son of David, have mercy on me!” + +**49** And Jesus stopped and said, “Call him _here._” So they called the blind man, saying to him, “Take courage, stand up! He is calling for you.” + +**50** Throwing aside his cloak, he jumped up and came to Jesus. + +**51** And answering him, Jesus said, “What do you want Me to do for you?” And the blind man said to Him, “Rabboni, _I want_ to regain my sight!” + +**52** And Jesus said to him, “Go; your faith has made you well.” Immediately he regained his sight and _began_ following Him on the road. + +**Luke 18:35–43** +**35** As Jesus was approaching Jericho, a blind man was sitting by the road begging. + +**36** Now hearing a crowd going by, he _began_ to inquire what this was. + +**37** They told him that Jesus of Nazareth was passing by. + +**38** And he called out, saying, “Jesus, Son of David, have mercy on me!” + +**39** Those who led the way were sternly telling him to be quiet; but he kept crying out all the more, “Son of David, have mercy on me!” + +**40** And Jesus stopped and commanded that he be brought to Him; and when he came near, He questioned him, + +**41** “What do you want Me to do for you?” And he said, “Lord, _I want_ to regain my sight!” + +**42** And Jesus said to him, “Receive your sight; your faith has made you well.” + +**43** Immediately he regained his sight and _began_ following Him, glorifying God; and when all the people saw it, they gave praise to God. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Five Aspects of Men Study.md b/OneNote/Ben's Notebook/Bible Study/Five Aspects of Men Study.md new file mode 100644 index 0000000..493cdb4 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Five Aspects of Men Study.md @@ -0,0 +1,72 @@ +# Lord of the Earth Created + +## Introduction + +- Bill the author, how I know him, how my parents know him, recently passed, Anglican priest! +- Study used by parents for decades +- As with all studies, the Word is our guide, not the study. Take a "trust but verify" approach +- More relevant than ever, given cultural and Christian confusion about gender +- My desire from this study + + - Understand biblical manhood + - For my own application--be a better man + - Teach my boys to be real men + - Have confidence in the face of cultural confusion + +## Question + +- What is your current view of what it means to be a man, husband, father? +- What do you want from this study? + +## What Lord of the Earth Created answers + +What is a man? +What is his purpose? + +## Key concepts + +Man was made by God, like God, to rule for God + +**Man's identity** +The image of God: we are the way we are and have the capabilities we have because of who and how God is. + +Because he made us and we are like Him, we look to Him to define who we are and what we are to be doing + +Man's dual identity: physical and spiritual, command the earth, commune with God + +**Man's purpose** +Rule the world, subdue it, make it fruitful, multiply it +What is your domain? What must you subdue? What are you making fruitful, multiplying and filling? +How are you creating value? +God's pattern: form, then fill (Gen. 1) + +Can a man still fulfill his purpose if he never marries? +What would you say to a man uninterested in finding a wife and/or job? + +**Man's domain** +The world! +God focuses man downward and outward first: what consequences does it have that men more and more frequently live in cities with jobs far from nature? + +Hide and seek: godly science is an _excellent_ pursuit--to find what God has hidden! + +First command: not love God or evangelize, but rule the earth--what do you think? + +Individual domains: what are yours? + +HUGE POINT: we are _accountable_ to God due to this _responsibility_ given us + +**Headship** +Man has a unique headship role which distinguishes him from woman, though both share the world mandate. + + +# Glory of God: Fallen + +One take away: we are created to worship God--this does not just take place in temples and churches. It is with our whole lives that we worship God, seeking to glorify Him in how we behave, the offices we take up and work in (son, father, priest, pastor, judge, etc) and excel in, etc. Our lives either worship God, the rightful recipient of our worship, or they worship a false image, ourselves, Satan, the world, the creation. So, the fallen nature of the glory of God aspect is to live our lives to worship something or someone other than God who created us. + +The idea of sex as a picture of worship connects and explains why sexual sin is so often associated with idolatry. + +- Adam and Eve covered their sex organs after reject God's commandment and sinning +- Romans 1 describes a descent into sexual perversion after rejecting God +- Sexual sins are often associated with idol worship: temple prostitutes +- Sexual "freedom" goes hand-in-hand with the rejection of God +- Idolatry and adultery are often connected in scripture, adultery used to describe idolatry \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Galatians Observation.md b/OneNote/Ben's Notebook/Bible Study/Galatians Observation.md new file mode 100644 index 0000000..7d4e7b4 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Galatians Observation.md @@ -0,0 +1,49 @@ +> [!caution] This page contained a drawing which was not converted. + +Paul, an apostle (not sent from men nor through the agency of man, but through Jesus Christ and God the Father, who raised Him from the dead), and all the brethren who are with me, + +To the churches of Galatia: + +Grace to you and peace from God our Father and the Lord Jesus Christ, who gave Himself for our sins so that He might rescue us from this present evil age, according to the will of our God and Father, to whom be the glory forevermore. Amen. + +I am amazed that you are so quickly deserting Him who called you by the grace of Christ, for a different gospel; which is really not another; only there are some who are disturbing you and want to distort the gospel of Christ. But even if we, or an angel from heaven, should preach to you a gospel contrary to what we have preached to you, he is to be accursed! As we have said before, so I say again now, if any man is preaching to you a gospel contrary to what you received, he is to be accursed! + + +For am I now seeking the favor of men, or of God? Or am I striving to please men? If I were still trying to please men, I would not be a bond-servant of Christ. For I would have you know, brethren, that the gospel which was preached by me is not according to man. For I neither received it from man, nor was I taught it, but I received it through a revelation of Jesus Christ. + +For you have heard of my former manner of life in Judaism, how I used to persecute the church of God beyond measure and tried to destroy it; and I was advancing in Judaism beyond many of my contemporaries among my countrymen, being more extremely zealous for my ancestral traditions. + +But when God, who had set me apart even from my mother’s womb and called me through His grace, was pleased to reveal His Son in me so that I might preach Him among the Gentiles, I did not immediately consult with flesh and blood, nor did I go up to Jerusalem to those who were apostles before me; but I went away to Arabia, and returned once more to Damascus. Then three years later I went up to Jerusalem to become acquainted with Cephas, and stayed with him fifteen days. But I did not see any other of the apostles except James, the Lord’s brother. (Now in what I am writing to you, I assure you before God that I am not lying.) Then I went into the regions of Syria and Cilicia. I was still unknown by sight to the churches of Judea which were in Christ; but only, they kept hearing, “He who once persecuted us is now preaching the faith which he once tried to destroy.” And they were glorifying God because of me. + +Then after an interval of fourteen years I went up again to Jerusalem with Barnabas, taking Titus along also. It was because of a revelation that I went up; and I submitted to them the gospel which I preach among the Gentiles, but I did so in private to those who were of reputation, for fear that I might be running, or had run, in vain. But not even Titus, who was with me, though he was a Greek, was compelled to be circumcised. But it was because of the false brethren secretly brought in, who had sneaked in to spy out our liberty which we have in Christ Jesus, in order to bring us into bondage. But we did not yield in subjection to them for even an hour, so that the truth of the gospel would remain with you. But from those who were of high reputation (what they were makes no difference to me; God shows no partiality)—well, those who were of reputation contributed nothing to me. But on the contrary, seeing that I had been entrusted with the gospel to the uncircumcised, just as Peter had been to the circumcised (for He who effectually worked for Peter in his apostleship to the circumcised effectually worked for me also to the Gentiles), and recognizing the grace that had been given to me, James and Cephas and John, who were reputed to be pillars, gave to me and Barnabas the right hand of fellowship, so that we might go to the Gentiles and they to the circumcised. They only asked us to remember the poor—the very thing I also was eager to do. + +But when Cephas came to Antioch, I opposed him to his face, because he stood condemned. For prior to the coming of certain men from James, he used to eat with the Gentiles; but when they came, he began to withdraw and hold himself aloof, fearing the party of the circumcision. The rest of the Jews joined him in hypocrisy, with the result that even Barnabas was carried away by their hypocrisy. But when I saw that they were not straightforward about the truth of the gospel, I said to Cephas in the presence of all, “If you, being a Jew, live like the Gentiles and not like the Jews, how is it that you compel the Gentiles to live like Jews? “We are Jews by nature and not sinners from among the Gentiles; nevertheless knowing that a man is not justified by the works of the Law but through faith in Christ Jesus, even we have believed in Christ Jesus, so that we may be justified by faith in Christ and not by the works of the Law; since by the works of the Law no flesh will be justified. “But if, while seeking to be justified in Christ, we ourselves have also been found sinners, is Christ then a minister of sin? May it never be! “For if I rebuild what I have once destroyed, I prove myself to be a transgressor. “For through the Law I died to the Law, so that I might live to God. “I have been crucified with Christ; and it is no longer I who live, but Christ lives in me; and the life which I now live in the flesh I live by faith in the Son of God, who loved me and gave Himself up for me. “I do not nullify the grace of God, for if righteousness comes through the Law, then Christ died needlessly.” + +You foolish Galatians, who has bewitched you, before whose eyes Jesus Christ was publicly portrayed as crucified? This is the only thing I want to find out from you: did you receive the Spirit by the works of the Law, or by hearing with faith? Are you so foolish? Having begun by the Spirit, are you now being perfected by the flesh? Did you suffer so many things in vain—if indeed it was in vain? So then, does He who provides you with the Spirit and works miracles among you, do it by the works of the Law, or by hearing with faith? + +Even so Abraham BELIEVED GOD, AND IT WAS RECKONED TO HIM AS RIGHTEOUSNESS. Therefore, be sure that it is those who are of faith who are sons of Abraham. The Scripture, foreseeing that God would justify the Gentiles by faith, preached the gospel beforehand to Abraham, saying, “ALL THE NATIONS WILL BE BLESSED IN YOU.” So then those who are of faith are blessed with Abraham, the believer. + +For as many as are of the works of the Law are under a curse; for it is written, “CURSED IS EVERYONE WHO DOES NOT ABIDE BY ALL THINGS WRITTEN IN THE BOOK OF THE LAW, TO PERFORM THEM.” Now that no one is justified by the Law before God is evident; for, “THE RIGHTEOUS MAN SHALL LIVE BY FAITH.” However, the Law is not of faith; on the contrary, “HE WHO PRACTICES THEM SHALL LIVE BY THEM.” Christ redeemed us from the curse of the Law, having become a curse for us—for it is written, “CURSED IS EVERYONE WHO HANGS ON A TREE”— in order that in Christ Jesus the blessing of Abraham might come to the Gentiles, so that we would receive the promise of the Spirit through faith. + +Brethren, I speak in terms of human relations: even though it is only a man’s covenant, yet when it has been ratified, no one sets it aside or adds conditions to it. Now the promises were spoken to Abraham and to his seed. He does not say, “And to seeds,” as referring to many, but rather to one, “And to your seed,” that is, Christ. What I am saying is this: the Law, which came four hundred and thirty years later, does not invalidate a covenant previously ratified by God, so as to nullify the promise. For if the inheritance is based on law, it is no longer based on a promise; but God has granted it to Abraham by means of a promise. + +Why the Law then? It was added because of transgressions, having been ordained through angels by the agency of a mediator, until the seed would come to whom the promise had been made. Now a mediator is not for one party only; whereas God is only one. Is the Law then contrary to the promises of God? May it never be! For if a law had been given which was able to impart life, then righteousness would indeed have been based on law. But the Scripture has shut up everyone under sin, so that the promise by faith in Jesus Christ might be given to those who believe. + +But before faith came, we were kept in custody under the law, being shut up to the faith which was later to be revealed. Therefore the Law has become our tutor to lead us to Christ, so that we may be justified by faith. But now that faith has come, we are no longer under a tutor. For you are all sons of God through faith in Christ Jesus. For all of you who were baptized into Christ have clothed yourselves with Christ. There is neither Jew nor Greek, there is neither slave nor free man, there is neither male nor female; for you are all one in Christ Jesus. And if you belong to Christ, then you are Abraham’s descendants, heirs according to promise. + +Now I say, as long as the heir is a child, he does not differ at all from a slave although he is owner of everything, but he is under guardians and managers until the date set by the father. So also we, while we were children, were held in bondage under the elemental things of the world. But when the fullness of the time came, God sent forth His Son, born of a woman, born under the Law, so that He might redeem those who were under the Law, that we might receive the adoption as sons. Because you are sons, God has sent forth the Spirit of His Son into our hearts, crying, “Abba! Father!” Therefore you are no longer a slave, but a son; and if a son, then an heir through God. However at that time, when you did not know God, you were slaves to those which by nature are no gods. But now that you have come to know God, or rather to be known by God, how is it that you turn back again to the weak and worthless elemental things, to which you desire to be enslaved all over again? You observe days and months and seasons and years. I fear for you, that perhaps I have labored over you in vain. + +I beg of you, brethren, become as I am, for I also have become as you are. You have done me no wrong; but you know that it was because of a bodily illness that I preached the gospel to you the first time; and that which was a trial to you in my bodily condition you did not despise or loathe, but you received me as an angel of God, as Christ Jesus Himself. Where then is that sense of blessing you had? For I bear you witness that, if possible, you would have plucked out your eyes and given them to me. So have I become your enemy by telling you the truth? They eagerly seek you, not commendably, but they wish to shut you out so that you will seek them. But it is good always to be eagerly sought in a commendable manner, and not only when I am present with you. My children, with whom I am again in labor until Christ is formed in you— but I could wish to be present with you now and to change my tone, for I am perplexed about you. + +Tell me, you who want to be under law, do you not listen to the law? For it is written that Abraham had two sons, one by the bondwoman and one by the free woman. But the son by the bondwoman was born according to the flesh, and the son by the free woman through the promise. This is allegorically speaking, for these women are two covenants: one proceeding from Mount Sinai bearing children who are to be slaves; she is Hagar. Now this Hagar is Mount Sinai in Arabia and corresponds to the present Jerusalem, for she is in slavery with her children. But the Jerusalem above is free; she is our mother. For it is written, “REJOICE, BARREN WOMAN WHO DOES NOT BEAR; BREAK FORTH AND SHOUT, YOU WHO ARE NOT IN LABOR; FOR MORE NUMEROUS ARE THE CHILDREN OF THE DESOLATE THAN OF THE ONE WHO HAS A HUSBAND.” And you brethren, like Isaac, are children of promise. But as at that time he who was born according to the flesh persecuted him who was born according to the Spirit, so it is now also. But what does the Scripture say? “CAST OUT THE BONDWOMAN AND HER SON, FOR THE SON OF THE BONDWOMAN SHALL NOT BE AN HEIR WITH THE SON OF THE FREE WOMAN.” So then, brethren, we are not children of a bondwoman, but of the free woman. + +It was for freedom that Christ set us free; therefore keep standing firm and do not be subject again to a yoke of slavery. Behold I, Paul, say to you that if you receive circumcision, Christ will be of no benefit to you. And I testify again to every man who receives circumcision, that he is under obligation to keep the whole Law. You have been severed from Christ, you who are seeking to be justified by law; you have fallen from grace. For we through the Spirit, by faith, are waiting for the hope of righteousness. For in Christ Jesus neither circumcision nor uncircumcision means anything, but faith working through love. + +You were running well; who hindered you from obeying the truth? This persuasion did not come from Him who calls you. A little leaven leavens the whole lump of dough. I have confidence in you in the Lord that you will adopt no other view; but the one who is disturbing you will bear his judgment, whoever he is. But I, brethren, if I still preach circumcision, why am I still persecuted? Then the stumbling block of the cross has been abolished. I wish that those who are troubling you would even mutilate themselves. + +For you were called to freedom, brethren; only do not turn your freedom into an opportunity for the flesh, but through love serve one another. For the whole Law is fulfilled in one word, in the statement, “YOU SHALL LOVE YOUR NEIGHBOR AS YOURSELF.” But if you bite and devour one another, take care that you are not consumed by one another. But I say, walk by the Spirit, and you will not carry out the desire of the flesh. For the flesh sets its desire against the Spirit, and the Spirit against the flesh; for these are in opposition to one another, so that you may not do the things that you please. But if you are led by the Spirit, you are not under the Law. Now the deeds of the flesh are evident, which are: immorality, impurity, sensuality, idolatry, sorcery, enmities, strife, jealousy, outbursts of anger, disputes, dissensions, factions, envying, drunkenness, carousing, and things like these, of which I forewarn you, just as I have forewarned you, that those who practice such things will not inherit the kingdom of God. But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, self-control; against such things there is no law. Now those who belong to Christ Jesus have crucified the flesh with its passions and desires. If we live by the Spirit, let us also walk by the Spirit. Let us not become boastful, challenging one another, envying one another. + + +Brethren, even if anyone is caught in any trespass, you who are spiritual, restore such a one in a spirit of gentleness; each one looking to yourself, so that you too will not be tempted. Bear one another’s burdens, and thereby fulfill the law of Christ. For if anyone thinks he is something when he is nothing, he deceives himself. But each one must examine his own work, and then he will have reason for boasting in regard to himself alone, and not in regard to another. For each one will bear his own load. The one who is taught the word is to share all good things with the one who teaches him. Do not be deceived, God is not mocked; for whatever a man sows, this he will also reap. For the one who sows to his own flesh will from the flesh reap corruption, but the one who sows to the Spirit will from the Spirit reap eternal life. Let us not lose heart in doing good, for in due time we will reap if we do not grow weary. So then, while we have opportunity, let us do good to all people, and especially to those who are of the household of the faith. + +See with what large letters I am writing to you with my own hand. Those who desire to make a good showing in the flesh try to compel you to be circumcised, simply so that they will not be persecuted for the cross of Christ. For those who are circumcised do not even keep the Law themselves, but they desire to have you circumcised so that they may boast in your flesh. But may it never be that I would boast, except in the cross of our Lord Jesus Christ, through which the world has been crucified to me, and I to the world. For neither is circumcision anything, nor uncircumcision, but a new creation. And those who will walk by this rule, peace and mercy be upon them, and upon the Israel of God. From now on let no one cause trouble for me, for I bear on my body the brand-marks of Jesus. The grace of our Lord Jesus Christ be with your spirit, brethren. Amen. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Galatians Outline.md b/OneNote/Ben's Notebook/Bible Study/Galatians Outline.md new file mode 100644 index 0000000..965cb53 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Galatians Outline.md @@ -0,0 +1,306 @@ +Theme: Restoring confidence in the source, truth and freedom of the gospel of justification by faith. + +1. Introduction (1:1-5) + + 1. Authors + + 1. Paul: an apostle + + 1. Not sent from men + 2. Not through the agency of man + 3. Through the agency of Jesus Christ + 2. All brethren with Paul + 2. Audience: churches of Galatia + 3. Greeting: grace and peace + + 1. From God our Father: to whom be glory forevermore + 2. From the Lord Jesus Christ + + 1. Gave Himself for our sins + 2. Rescuer from this present evil age + 3. Worked according to the will of God our Father +2. Urgency of the Matter (1:6-10) + + 1. Galatians are deserting God + + 1. They are deserting quickly + 2. They are deserting God + 3. They are deserting the true gospel + 2. Galatians are being disturbed + + 1. Disturbers are distorting the gospel + 2. Disturbers are to be accursed + 3. Gospel is being distorted + + 1. Not what Paul preached + 2. Not what Galatians received + 4. Paul's motivation + + 1. Seeking favor of God + 2. Pleasing men is incompatible with bond-service to Christ +3. Restoring confidence in the **source** of the gospel (chapters 1:11-2:21) + + 1. Summary: from Christ, not man + + 1. Not according to man + 2. Not received from man + 3. Not taught it by man + 4. But, from a revelation of Jesus Christ + 2. Alibi 1: Paul's former manner of life + + 1. Paul was not raised with the gospel + 2. He was an enemy of the gospel + 3. He would listen to no man (see his behavior in Acts) + 3. Alibi 2: Paul's conversion + + 1. No evangelism from man + 2. Turn around in Paul's life so great, it can only be God's direct work + 4. Alibi 3: Paul's first Jerusalem visit + + 1. No instruction from men + 2. No time for it (see Acts account) + 5. Alibi 4: Paul's second Jerusalem visit + + 1. Not for the purpose of being taught + 2. Incredible (God-given) unity among apostles after 17 years of preaching to different people without contact with each other + 6. Alibi 5: Paul's present manner of life: 100% consistent with the Gospel + + 1. Paul recognized Peter's hypocrisy + + 1. Peter stood condemned when he came to Antioch + 2. Peter withdrew from eating with the Gentiles + 3. Peter feared Jews who came from James + 4. Many Jews (even Barnabas) were carried away + 5. Peter and Jews not being straightforward about the Gospel + 2. Paul exposed Peter's hypocrisy + + 1. Surface inconsistencies_Even though Peter was a Jew, he was living like a Gentile and yet now he was compelling Gentiles to live like Jews! It may not have been obvious to see the core issue at that level, but it was an obvious inconsistency on the surface of things that should have led to deeper investigating of a core problem!_ + + 1. Peter is a Jew, living like a Gentile (eating with Gentiles) + 2. Peter is compelling Gentiles to live like Jews (by no longer eating with Gentiles) + 2. Contradicts past convictions_Peter and the others (along with Paul) had clearly recognized the insufficiency of the law to justify them. Therefore, they sought refuge in the cross of Christ. What Peter was doing now was totally contradictory to his own past convictions._ + + 1. Paul and Peter are Jews who have the law + 2. Paul and Peter, nevertheless, recognized justification by the law was impossible + 3. Paul and Peter turned to Christ for justification + 3. Has an illogical conclusion_If we accept the law as a standard of righteousness, while seeking justification in Christ, we are concluding that Christ's work was insufficient to make us righteous. Therefore, Christ has failed to justify us and all He has done is lead us into sin--He becomes a minister of sin._ + + 1. We are judged to be sinners even after seeking justification in Christ + 2. Christ becomes a minister of sin + 3. Returning to the law only proves our transgressions + 4. Contradicts spiritual reality_The spiritual reality is that we now live by faith, Christ living in us. The law led us to the point where we died to it as a means of justification so that we might now live daily by faith in the Son of God. Going back to the law denies this reality._ + + 1. The law lead them to die to it as a means of righteousness and live to God + 2. Daily life is by faith with Christ living in him + 5. Has severe consequences_By returning to the law, we declare that Christ's death was either insufficient or unnecessary to obtain righteousness before God. Therefore, we take what actually is the grace of God (giving His only begotten Son for us) and turn it into a foolish act--unnecessary and insufficient. We say that the law was always available to declare us righteous and so God sent His Son to the cross for no real reason._ + + 1. Nullifies the grace of God + 2. Declares that Christ died needlessly +4. Restoring confidence in the **truth** of the gospel (chapters 3:1-4:31) + + 1. Argument 1: Galatians' Experience (3:1-5) + + 1. Hearing the Gospel_Paul has "clearly portrayed" the gospel to them when he preached in the Galatian cities. Thus, they had heard the entire gospel clearly, certainly being told of the necessity of the cross and Christ's work on it. This knowledge alone could have kept them from the false teaching of justification by the law since that doctrine lead to the conclusion of Christ's death being unnecessary._ + 2. Believing the Gospel_How did the Galatians receive the Spirit? The NT records that we receive the Spirit by believing. Not only did the Galatians hear the message of the cross, but they believed it! The giving of the Holy Spirit at the time of their believing was a confirmation that they had believed the truth, but now they were straying from it._ + 3. Finishing in the Gospel_The Galatians had begun to finish by walking in the Spirit. How now did they think they could somehow complete the course in another way? The Spirit had been absolutely necessary for their righteousness. How could they now "continue" their righteousness through the flesh when it was so weak and useless before?_ + 4. Suffering for the Gospel_The Galatians had suffered for the gospel--they were willing to do it. Now they were despising that suffering by turning to a false gospel which essentially declared that their past suffering had not been necessary. While, in fact, it was vital and greatly beneficial to their walk with Christ._ + 5. Seeing the Gospel_They had seen the works of God since their salvation: miracles, receiving of the Spirit. How had God done these things? Not through excellence in works of the Law! Having seen those works should have strongly confirmed to the Galatians that their course (walking by faith) was the right one. But, they still strayed._ + 2. Argument 2: Example of Abraham (3:6-9) + + 1. His Faith_The Galatian's faith (and, therefore, ours) is just like Abraham's. He believed God and it was credited as righteousness. See Romans 4:22--it works exactly the same for us. Instead of being the Jews' forefather of circumcision, Abraham really is the father of all who are justified by faith. Paul lands a huge blow to the Judaizers with this claim._ + + 1. Abraham (who?) + 2. Believed (what?) + 3. God (in whom?) + 4. Could do what He said (in what?) + 5. Reckoned to him as righteousness (with what result?) + 2. His Sons_What Paul hints at in the previous verse is brought home in this verse. I think Paul is using Abraham as an argument because the Galatians are being influenced by Judaizers, preaching circumcision and the Law for justification. To be a son of Abraham meant to be an inheritor of the promises given to him. This meant being brought into the covenant which meant being circumcised. Paul says not to all of that. To obtain the promises of Abraham, you must believe as he did and be declared righteous. The sign of circumcision was a seal of the faith Abraham had received (Rom: 4:11). But, for those who also were under that covenant, circumcision was not enough to receive the promises of Abraham. Faith was required as well (Rom 4:13)._ + 3. His Gospel_The Gospel to Abraham was that he would become the father of many nations by being the "father" of their faith--the example of the same faith that would bring many, from many nations into the fold of Christ. This came before circumcision. Again, Romans 4:9-12 makes this really clear: Abraham was declared righteous before he was given circumcision. Therefore, he is the father, in his faith, of both the uncircumcised and the circumcised to those who believe in the same way._ + 4. His Blessing_I think the blessing of Abraham is to be declared righteous by faith, aside from any consideration of works. This last verse is almost a summary of Paul's statements. If you want to be blessed with Abraham (also declared righteous), you must exercise the same faith he did._ + 3. Argument 3: Contrast of living by faith and law (3:10-14) + + 1. Living by the law + + 1. The Law brings a curse + + 1. As many as are of the works of the Law (who) + 2. By not abiding by all things (how) + 2. No one is justified by the Law + + 1. Man is justified by faith + 2. Law is not of faith, but works + 2. Living by faith: Christ redeemed us + + 1. From the curse of the Law (from what) + 2. By hanging on the cross (how) + 3. For the purpose of + + 1. Bringing the blessing of Abraham to the Gentiles + 2. Receiving the promise of the Spirit through faith + 4. Argument 4: God's promise (3:15-18)_Imbedded in this argument is the clarification that the promise of God was like a will or testament given to Abraham. The inheritance is the gaining of righteousness. God gave it to Abraham in a promise. He did not change the terms of this promise by giving the Law--as if He suddenly now made men have to "earn" righteousness by following the Law. Not even men would do that! A great lesson from this is to trust God's promises at face value. The Law, on the surface, seemed to alter the terms of gaining righteousness--but this would have meant the maligning of God's character. That is, He would be the type who would go back on His promises! If this is ever the logical conclusion of our thinking, we are on the wrong path._ + + 1. Observation 1: even men do not alter the terms of covenants they make + 2. Observation 2: Christ is the seed of Abraham, Christ is the one in whom the promises are fulfilled + 3. Conclusion: the Law cannot invalidate the promise of God + 4. Observation 3: the inheritance can only be based on Law or Promise, not both + 5. Argument 5: The purpose of the Law (3:19-22) + + 1. Short summary of the Law + + 1. For defining transgressions + 2. Communicated through mediating messengers_I interpret "angels" in the NASB more generically as messengers. This would then be Paul telling us how the Law was communicated: first through Moses, then prophets and priests and kings--always through a mediating messenger._ + 3. Had a built-in expiration date: until Christ came + 2. The Law is different than the promise + + 1. Required a mediator_The promise of God to Abraham and his Seed was a one-way covenant (a will). It required no mediator. The necessity of a mediator implies that the Law was not doing the same thing as the promise._ + 2. Could not impart life_The Law was weak because it was a two-way street (unlike the promise). Because of this, it was dependent on flesh (people) to uphold their half. Therefore, it was designed to fail in regard to providing life (righteousness)._ + 3. The Law's real purpose: prepare our hearts for the promise_The Law wasn't a failed experiment by God. It was always designed with one purpose: to show clearly to men the weakness of their flesh and absolute necessity of obtaining righteousness by faith alone in Christ's accomplished work. It does this by shutting us up under sin; that is, showing no way of escape for a man made of flesh._ + 6. Argument 6: How the Law accomplishes its purpose (3:23-29) _The illustration of being in college, I think, illuminates this passage. In college, as a computer science student, I was directed by my college professors on the dos and don'ts represented by assignments, tests, projects, etc. This was my only concern: to pass my classes and learn programming. When I graduated, my focus slowly shifted to professional excellence. I was applying the things learned in college, but now with my own motivation to do well. When I was in college, I couldn't see how this would work out. In the same way, the Law shuts us up to faith--we can't see the excellence of living by the Spirit because we are still under a tutor. While under the Law (in college) we are only concerned about measuring up to the Law (passing assignments, tests and projects). When faith comes (we graduate) we now understand the full joy of walking in righteousness of our own motivation. The Spirit guides us in this as chapter 5 will show. Just like college, the Law is never intended to keep us under it. Its purpose is to send us on to better things--being sons of God, heirs of the promise with Christ._ + + 1. Keeps us in custody until faith + 2. Is a guardian to us until Christ comes + 3. Releases us to be sons of God + + 1. We cloth ourselves in Christ (we look like Christ) + 2. We are unified in Christ (we are all unified in Christ) + 3. We are made heirs of the promise to Abraham (we inherit with Christ) + 7. Argument 7: An illustration of maturing (4:1-11) + + 1. The illustration: an heir as a child + + 1. No different than a slave + 2. Under guardians and managers until a certain date set by the father + 2. How we fit the illustration + + 1. As children, we were held under the elemental things of the world + 2. At the time chosen by our Father, Christ came to adopt us as sons through redemption from the Law + 3. Result of becoming sons + + 1. We have the Spirit, causing us to cry, "Abba! Father!" + 2. We are now heirs through God + 4. Galatians' situation + + 1. They were slaves to false gods + 2. They have been freed through being known by God + 3. They are now turning back to those elemental things + + 1. Observe days, months, seasons, years + 2. Paul is afraid their progress was in vain + 8. Argument 8: Comparing their relationship with Paul and Judaizers (4:12-20) + + 1. Paul's close relationship with the Galatians + + 1. Call to imitate Paul + 2. Reminder of the conditions and attitudes during their initial meeting + 2. Change from closeness to enemy status + 3. Comparison of Paul and the Judaizers + + 1. Judaizers played upon their sense of belonging and exclusivity + 2. Paul desired to be sought also, but commendably + 4. Desire for restored relationship + 9. Argument 9: An analogy of faith versus flesh (4:21-31) + + 1. Introducing the story of Isaac and Ishmael + 2. Comparison of two women + + 1. Hagar represents the Law and the flesh + 2. Sarah represents the promise + 3. Comparison of two children + + 1. Isaac represents the children of promise + 2. Ishmael represents the children of the flesh +5. Restoring confidence in the **freedom** of the gospel (chapters 5:1-6:18)_Paul restores the confidence of the Galatians in the freedom of the Gospel by teaching them how to live in it._ + + 1. Lesson 1: Understand the stakes - it's either all freedom or all slavery (5:1-6) + + 1. Admonition to stand firm (v1)_Paul admonishes the Galatians to choose freedom. This was Christ's purpose in setting us free. Therefore, we ought not to return to slavery._ + + 1. It is Christ's purpose in setting us free + 2. The other option is slavery + 2. Alternatives to avoid (vv2-4) + + 1. Christ will be of no benefit + 2. Bound to the whole Law + 3. Severed from Christ + 4. Fallen from grace + 3. Attitude to Practice (vv5-6) + + 1. Waiting + + 1. By the Spirit + 2. Out of faith + 3. For the hope of righteousness + 2. Working + + 1. Disregarding the flesh + 2. By faith + 3. Through love + 2. Lesson 2: Understand the situation - it's serious, but definitely recoverable (5:7-12) + + 1. How you got here (vv7-9) + + 1. Active hindrance + 2. Foreign persuasion + 3. Dangerous substance + 2. You're not beyond recovering (v10)_You don't have to be--adopt the same view you had, that I still have now. The ones in trouble are the false teachers. They will bear their judgment._ + 3. You can trust me (v11)_I haven't changed since we first met. I'm still persecuted because I'm still placing the stumbling block in front of the Jews by preaching the cross of Christ._ + 4. I'm not mad at your (v12)_No, Paul only wishes that the false teachers would go away._ + 3. Lesson 3: Understand that freedom is a tool (5:13-15) + + 1. Christ has called us to use it (v13a)_The word "calling" indicates a responsibility is attached to it._ + 2. It can be abused (v13b)_We should not abuse our freedom, thinking it is a license to sin._ + 3. It has a specific purpose (v13c)_We have been made free to serve each other._ + 4. Using it fulfills the whole Law (v14)_The whole Law is fulfilled when we exercise our freedom to lovingly serve others._ + 5. It can be neglected (v15)_Biting and devouring one another is the sure way to consume each other and waste our freedom._ + 4. Lesson 4: Understand the reason to walk by the Spirit (5:16-26)_Walking by the Spirit is the means by which we properly use our tool of freedom._ + + 1. The promise of the Spirit (v16) + 2. The reason walking in the Spirit works (vv17-23) + + 1. The Spirit fights the flesh (v17) + 2. The Spirit frees you from the Law (vv18-23) + 3. Summary statement (vv24-26) + + 1. Crucify the flesh + 2. Walk by the Spirit + 3. Not become boastful, challenging, envying + 5. Lesson 5: Be humble (6:1-5) + + 1. In dealing with sin (v1) + + 1. With gentleness + 2. Mindful of our own weakness + 2. In sharing one another's burdens (v2) + 3. In our view of ourselves (v3) + 4. In examining works (vv4-5) + + 1. Examine our own + 2. Not compare to others + 3. Because we are judged individually + 6. Lesson 6: Do good (6:6-10) + + 1. Do good to our teachers (v6) + 2. Do good to reap eternal life (vv7-8) + 3. Do good with perseverance (v9) + 4. Do good with a sense of urgency and priority (v10) + 7. Lesson 7: Be honest (6:11-18) + + 1. Pay attention! (v11) + 2. Who you should not trust (vv12-13) + + 1. Not honest about their teaching_Preaching circumcision and the Law for righteousness, they know it has not produced righteousness in themselves._ + 2. Not honest about their motives_Their desire is primarily to escape persecution._ + 3. Not honest about themselves_Whether they know it or not, they cannot succeed with their own teaching._ + 3. Who you should trust (vv14-15) + + 1. Honest about the source of righteousness_It is in Christ alone._ + 2. Honest about their need for righteousness_There is no righteousness in themselves._ + 3. Honest about how this separates them from the world_The world has been crucified to them and they to the world._ + 4. How you can tell the difference (vv16-18) + + 1. Adjust our view through the new creation + + 1. View others this way + 2. View ourselves this way + 2. Trust those living out the truth, not just speaking the "truth" + 3. Trust those who truly show care for others \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Galatians Summary.md b/OneNote/Ben's Notebook/Bible Study/Galatians Summary.md new file mode 100644 index 0000000..fb046c8 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Galatians Summary.md @@ -0,0 +1,41 @@ +Theme: Restoring confidence in the source, truth and freedom of the gospel of justification by faith. + +Key verse - Galatians 2:21 "I do not nullify the grace of God, for if righteousness comes through the Law, then Christ died needlessly." + +Outline + +1. Problem_Three words to describe the problem of the Galatians.____Key verse - Galatians 1:6_ + + 1. Word 1: Desert - deserting Christ (1:6) + 2. Word 2: Disturb - someone disturbing them (1:7) + 3. Word 3: Distort - distorting the gospel (1:7) 3. Source of the gospel (1:11-2:21)_Five alibis of Paul proving that the gospel is from God.____Key verse - Galatians 1:12_ + + 1. Alibi 1: Paul's former manner of life (1:13-14) + 2. Alibi 2: Paul's conversion (1:15-17) + 3. Alibi 3: Paul's first Jerusalem visit (1:18-24) + 4. Alibi 4: Paul's second Jerusalem visit (2:1-10) + 5. Alibi 5: Paul's present manner of life (2:11-21) + + +4. Truth of the gospel (3:1-4:31)_Nine arguments for the truth of the gospel of justification by faith.____Key verse - Galatians 3:24_ + + 1. Argument 1: Galatians' experience (3:1-5) + 2. Argument 2: Example of Abraham (3:6-9) + 3. Argument 3: Contrast of living by faith and law (3:10-14) + 4. Argument 4: God's promise (3:15-18) + 5. Argument 5: The purpose of the Law (3:19-22) + 6. Argument 6: How the Law accomplishes its purpose (3:23-29) + 7. Argument 7: An illustration of maturing (4:1-11) + 8. Argument 8: Comparing their relationship with Paul and Judaizers (4:12-20) + 9. Argument 9: An analogy of faith versus flesh (4:21-31) + + +5. Freedom in the gospel (5:1-6:18)_Seven lessons on how to wield the tool of freedom.____Key verse - Galatians 5:13_ + + 1. Lesson 1: Understand the stakes - it's either all freedom or all slavery (5:1-6) + 2. Lesson 2: Understand the situation - it's serious, but definitely recoverable (5:7-12) + 3. Lesson 3: Understand that freedom is a tool (5:13-15) + 4. Lesson 4: Understand the reason to walk in the Spirit (5:16-26) + 5. Lesson 5: Be humble (6:1-5) + 6. Lesson 6: Do good (6:6-10) + 7. Lesson 7: Be honest (6:11-18) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Hebrews Background Info.md b/OneNote/Ben's Notebook/Bible Study/Hebrews Background Info.md new file mode 100644 index 0000000..cbd2e89 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Hebrews Background Info.md @@ -0,0 +1,25 @@ +Date of writing + +- Quoted by Clement of Rome in I Clement, meaning it was not later than 95 AD +- No reference to the destruction of the Jewish temple indicates it was probably even before 70 AD. If it had been written after 70 AD, this would have been a good fact to mention when indicating the superiority of Christ over the sacrificial system +- Timothy is mentioned, meaning it was written at least during his lifetime +- BKC conclusion: 68 or 69 AD is reasonable + +Authorship + +- Possibly Paul, but some have noted style differences despite obvious doctrinal alignment. Some believe the style differences have their source in the possibility that Paul wrote the book in Hebrew and Luke translated it into Greek. +- Could be Barnabas + + - Tertullian quoted Hebrews in a message and matter-of-factly mentioned it being an epistle of Barnabas + - Barnabas was a Levite (Acts 4:36) which would explain his in-depth knowledge of the sacrificial system +- Others have been put forward as authors as well, but there is not real possibility of confirming the authorship. + +Setting + +- Audience is most likely Jewish, given the ancient title ("To the Hebrews") and the content of the book focusing so specifically on Jewish old testament and sacrificial system. +- Where the audience was located is not really known as a Jewish audience could have meant just about anywhere in the world. +- It seems possible that it was written to a Christian church in a city like Cyrene (in North Africa), made up of Jewish believers (but not necessarily exclusively) who were being tempted to return to some Jewish roots or some kind of sectarian reclusion like the Qumran communities. + +Authority of the book + +- Clement and Rome and Justin Martyr both quoted and referred to this book as of divine authorship \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Hebrews Observation.md b/OneNote/Ben's Notebook/Bible Study/Hebrews Observation.md new file mode 100644 index 0000000..b3ba60a --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Hebrews Observation.md @@ -0,0 +1,487 @@ +> [!caution] This page contained a drawing which was not converted. + +Chapter 1 + + +1God, after He spoke long ago to the fathers in the prophets in many portions and in many ways, + +2in these last days has spoken to us in His Son, whom He appointed heir of all things, through whom also He made the world. + +3And He is the radiance of His glory and the exact representation of His nature, and upholds all things by the word of His power. When He had made purification of sins, He sat down at the right hand of the Majesty on high, + +4having become as much better than the angels, as He has inherited a more excellent name than they. + +5For to which of the angels did He ever say, +“YOU ARE MY SON, +TODAY I HAVE BEGOTTEN YOU”? +And again, +“I WILL BE A FATHER TO HIM +AND HE SHALL BE A SON TO ME”? + +6And when He again brings the firstborn into the world, He says, +“AND LET ALL THE ANGELS OF GOD WORSHIP HIM.” + +7And of the angels He says, +“WHO MAKES HIS ANGELS WINDS, +AND HIS MINISTERS A FLAME OF FIRE.” + +8But of the Son He says, +“YOUR THRONE, O GOD, IS FOREVER AND EVER, +AND THE RIGHTEOUS SCEPTER IS THE SCEPTER OF HIS KINGDOM. +9“YOU HAVE LOVED RIGHTEOUSNESS AND HATED LAWLESSNESS; +THEREFORE GOD, YOUR GOD, HAS ANOINTED YOU +WITH THE OIL OF GLADNESS ABOVE YOUR COMPANIONS.” + +10And, +“YOU, LORD, IN THE BEGINNING LAID THE FOUNDATION OF THE EARTH +AND THE HEAVENS ARE THE WORKS OF YOUR HANDS; +11THEY WILL PERISH, BUT YOU REMAIN; +AND THEY ALL WILL BECOME OLD LIKE A GARMENT, +12AND LIKE A MANTLE YOU WILL ROLL THEM UP; +LIKE A GARMENT THEY WILL ALSO BE CHANGED. +BUT YOU ARE THE SAME, +AND YOUR YEARS WILL NOT COME TO AN END.” + +13But to which of the angels has He ever said, +“SIT AT MY RIGHT HAND, +UNTIL I MAKE YOUR ENEMIES +A FOOTSTOOL FOR YOUR FEET”? + +14Are they not all ministering spirits, sent out to render service for the sake of those who will inherit salvation? + + +Chapter 2 + + +1For this reason we must pay much closer attention to what we have heard, so that we do not drift away from it. +2For if the word spoken through angels proved unalterable, and every transgression and disobedience received a just penalty, +3how will we escape if we neglect so great a salvation? After it was at the first spoken through the Lord, it was confirmed to us by those who heard, +4God also testifying with them, both by signs and wonders and by various miracles and by gifts of the Holy Spirit according to His own will. + + +5For He did not subject to angels the world to come, concerning which we are speaking. +6But one has testified somewhere, saying, +“WHAT IS MAN, THAT YOU REMEMBER HIM? +OR THE SON OF MAN, THAT YOU ARE CONCERNED ABOUT HIM? +7“YOU HAVE MADE HIM FOR A LITTLE WHILE LOWER THAN THE ANGELS; +YOU HAVE CROWNED HIM WITH GLORY AND HONOR, +AND HAVE APPOINTED HIM OVER THE WORKS OF YOUR HANDS; +8YOU HAVE PUT ALL THINGS IN SUBJECTION UNDER HIS FEET.” +For in subjecting all things to him, He left nothing that is not subject to him. But now we do not yet see all things subjected to him. + + +9But we do see Him who was made for a little while lower than the angels, namely, Jesus, because of the suffering of death crowned with glory and honor, so that by the grace of God He might taste death for everyone. +10For it was fitting for Him, for whom are all things, and through whom are all things, in bringing many sons to glory, to perfect the author of their salvation through sufferings. +11For both He who sanctifies and those who are sanctified are all from one Father; for which reason He is not ashamed to call them brethren, +12saying,8Z +“I WILL PROCLAIM YOUR NAME TO MY BRETHREN, +IN THE MIDST OF THE CONGREGATION I WILL SING YOUR PRAISE.” +13And again, +“I WILL PUT MY TRUST IN HIM.” +And again, +“BEHOLD, I AND THE CHILDREN WHOM GOD HAS GIVEN ME.” +14Therefore, since the children share in flesh and blood, He Himself likewise also partook of the same, that through death He might render powerless him who had the power of death, that is, the devil, +15and might free those who through fear of death were subject to slavery all their lives. +16For assuredly He does not give help to angels, but He gives help to the descendant of Abraham. +17Therefore, He had to be made like His brethren in all things, so that He might become a merciful and faithful high priest in things pertaining to God, to make propitiation for the sins of the people. +18For since He Himself was tempted in that which He has suffered, He is able to come to the aid of those who are tempted. + + +Chapter 3 + + +1Therefore, holy brethren, partakers of a heavenly calling, consider Jesus, the Apostle and High Priest of our confession; +2He was faithful to Him who appointed Him, as Moses also was in all His house. +3For He has been counted worthy of more glory than Moses, by just so much as the builder of the house has more honor than the house. +4For every house is built by someone, but the builder of all things is God. +5Now Moses was faithful in all His house as a servant, for a testimony of those things which were to be spoken later; +6but Christ was faithful as a Son over His house—whose house we are, if we hold fast our confidence and the boast of our hope firm until the end. +7Therefore, just as the Holy Spirit says, +“TODAY IF YOU HEAR HIS VOICE, +8DO NOT HARDEN YOUR HEARTS AS WHEN THEY PROVOKED ME, +AS IN THE DAY OF TRIAL IN THE WILDERNESS, +9WHERE YOUR FATHERS TRIED Me BY TESTING Me, +AND SAW MY WORKS FOR FORTY YEARS. +10“THEREFORE I WAS ANGRY WITH THIS GENERATION, +AND SAID, ‘THEY ALWAYS GO ASTRAY IN THEIR HEART, +AND THEY DID NOT KNOW MY WAYS’; +11AS I SWORE IN MY WRATH, +‘THEY SHALL NOT ENTER MY REST.’ ” + + +12Take care, brethren, that there not be in any one of you an evil, unbelieving heart that falls away from the living God. +13But encourage one another day after day, as long as it is still called “Today,” so that none of you will be hardened by the deceitfulness of sin. +14For we have become partakers of Christ, if we hold fast the beginning of our assurance firm until the end, +15while it is said, +“TODAY IF YOU HEAR HIS VOICE, +DO NOT HARDEN YOUR HEARTS, AS WHEN THEY PROVOKED ME.” +16For who provoked Him when they had heard? Indeed, did not all those who came out of Egypt led by Moses? +17And with whom was He angry for forty years? Was it not with those who sinned, whose bodies fell in the wilderness? +18And to whom did He swear that they would not enter His rest, but to those who were disobedient? +19So we see that they were not able to enter because of unbelief. + + +Chapter 4 + + +1Therefore, let us fear if, while a promise remains of entering His rest, any one of you may seem to have come short of it. +2For indeed we have had good news preached to us, just as they also; but the word they heard did not profit them, because it was not united by faith in those who heard. +3For we who have believed enter that rest, just as He has said, +“AS I SWORE IN MY WRATH, +THEY SHALL NOT ENTER MY REST,” +although His works were finished from the foundation of the world. +4For He has said somewhere concerning the seventh day: “AND GOD RESTED ON THE SEVENTH DAY FROM ALL HIS WORKS”; +5and again in this passage, “THEY SHALL NOT ENTER MY REST.” +6Therefore, since it remains for some to enter it, and those who formerly had good news preached to them failed to enter because of disobedience, +7He again fixes a certain day, “Today,” saying through David after so long a time just as has been said before, +“TODAY IF YOU HEAR HIS VOICE, +DO NOT HARDEN YOUR HEARTS.” +8For if Joshua had given them rest, He would not have spoken of another day after that. +9So there remains a Sabbath rest for the people of God. +10For the one who has entered His rest has himself also rested from his works, as God did from His. +11Therefore let us be diligent to enter that rest, so that no one will fall, through following the same example of disobedience. +12For the word of God is living and active and sharper than any two-edged sword, and piercing as far as the division of soul and spirit, of both joints and marrow, and able to judge the thoughts and intentions of the heart. +13And there is no creature hidden from His sight, but all things are open and laid bare to the eyes of Him with whom we have to do. +14Therefore, since we have a great high priest who has passed through the heavens, Jesus the Son of God, let us hold fast our confession. +15For we do not have a high priest who cannot sympathize with our weaknesses, but One who has been tempted in all things as we are, yet without sin. +16Therefore let us draw near with confidence to the throne of grace, so that we may receive mercy and find grace to help in time of need. + Chapter 5 + + +1For every high priest taken from among men is appointed on behalf of men in things pertaining to God, in order to offer both gifts and sacrifices for sins; +2he can deal gently with the ignorant and misguided, since he himself also is beset with weakness; +3and because of it he is obligated to offer sacrifices for sins, as for the people, so also for himself. +4And no one takes the honor to himself, but receives it when he is called by God, even as Aaron was. +5So also Christ did not glorify Himself so as to become a high priest, but He who said to Him, +“YOU ARE MY SON, +TODAY I HAVE BEGOTTEN YOU”; +6just as He says also in another passage, +“YOU ARE A PRIEST FOREVER +ACCORDING TO THE ORDER OF MELCHIZEDEK.” +7In the days of His flesh, He offered up both prayers and supplications with loud crying and tears to the One able to save Him from death, and He was heard because of His piety. +8Although He was a Son, He learned obedience from the things which He suffered. +9And having been made perfect, He became to all those who obey Him the source of eternal salvation, +10being designated by God as a high priest according to the order of Melchizedek. +11Concerning him we have much to say, and it is hard to explain, since you have become dull of hearing. +12For though by this time you ought to be teachers, you have need again for someone to teach you the elementary principles of the oracles of God, and you have come to need milk and not solid food. +13For everyone who partakes only of milk is not accustomed to the word of righteousness, for he is an infant. +14But solid food is for the mature, who because of practice have their senses trained to discern good and evil. + + +Chapter 6 + + +1Therefore leaving the elementary teaching about the Christ, let us press on to maturity, not laying again a foundation of repentance from dead works and of faith toward God, +2of instruction about washings and laying on of hands, and the resurrection of the dead and eternal judgment. +3And this we will do, if God permits. +4For in the case of those who have once been enlightened and have tasted of the heavenly gift and have been made partakers of the Holy Spirit, +5and have tasted the good word of God and the powers of the age to come, +6and then have fallen away, it is impossible to renew them again to repentance, since they again crucify to themselves the Son of God and put Him to open shame. +7For ground that drinks the rain which often falls on it and brings forth vegetation useful to those for whose sake it is also tilled, receives a blessing from God; +8but if it yields thorns and thistles, it is worthless and close to being cursed, and it ends up being burned. + + +9But, beloved, we are convinced of better things concerning you, and things that accompany salvation, though we are speaking in this way. +10For God is not unjust so as to forget your work and the love which you have shown toward His name, in having ministered and in still ministering to the saints. +11And we desire that each one of you show the same diligence so as to realize the full assurance of hope until the end, +12so that you will not be sluggish, but imitators of those who through faith and patience inherit the promises. +13For when God made the promise to Abraham, since He could swear by no one greater, He swore by Himself, +14saying, “I WILL SURELY BLESS YOU AND I WILL SURELY MULTIPLY YOU.” +15And so, having patiently waited, he obtained the promise. +16For men swear by one greater than themselves, and with them an oath given as confirmation is an end of every dispute. +17In the same way God, desiring even more to show to the heirs of the promise the unchangeableness of His purpose, interposed with an oath, +18so that by two unchangeable things in which it is impossible for God to lie, we who have taken refuge would have strong encouragement to take hold of the hope set before us. +19This hope we have as an anchor of the soul, a hope both sure and steadfast and one which enters within the veil, +20where Jesus has entered as a forerunner for us, having become a high priest forever according to the order of Melchizedek. + + +Chapter 7 + + +1For this Melchizedek, king of Salem, priest of the Most High God, who met Abraham as he was returning from the slaughter of the kings and blessed him, +2to whom also Abraham apportioned a tenth part of all the spoils, was first of all, by the translation of his name, king of righteousness, and then also king of Salem, which is king of peace. +3Without father, without mother, without genealogy, having neither beginning of days nor end of life, but made like the Son of God, he remains a priest perpetually. +4Now observe how great this man was to whom Abraham, the patriarch, gave a tenth of the choicest spoils. +5And those indeed of the sons of Levi who receive the priest’s office have commandment in the Law to collect a tenth from the people, that is, from their brethren, although these are descended from Abraham. +6But the one whose genealogy is not traced from them collected a tenth from Abraham and blessed the one who had the promises. +7But without any dispute the lesser is blessed by the greater. +8In this case mortal men receive tithes, but in that case one receives them, of whom it is witnessed that he lives on. +9And, so to speak, through Abraham even Levi, who received tithes, paid tithes, +10for he was still in the loins of his father when Melchizedek met him. +11Now if perfection was through the Levitical priesthood (for on the basis of it the people received the Law), what further need was there for another priest to arise according to the order of Melchizedek, and not be designated according to the order of Aaron? +12For when the priesthood is changed, of necessity there takes place a change of law also. +13For the one concerning whom these things are spoken belongs to another tribe, from which no one has officiated at the altar. +14For it is evident that our Lord was descended from Judah, a tribe with reference to which Moses spoke nothing concerning priests. +15And this is clearer still, if another priest arises according to the likeness of Melchizedek, +16who has become such not on the basis of a law of physical requirement, but according to the power of an indestructible life. +17For it is attested of Him, +“YOU ARE A PRIEST FOREVER +ACCORDING TO THE ORDER OF MELCHIZEDEK.” +18For, on the one hand, there is a setting aside of a former commandment because of its weakness and uselessness +19(for the Law made nothing perfect), and on the other hand there is a bringing in of a better hope, through which we draw near to God. +20And inasmuch as it was not without an oath +21(for they indeed became priests without an oath, but He with an oath through the One who said to Him, +“THE LORD HAS SWORN +AND WILL NOT CHANGE HIS MIND, +‘YOU ARE A PRIEST FOREVER’ ”); +22so much the more also Jesus has become the guarantee of a better covenant. +23The former priests, on the one hand, existed in greater numbers because they were prevented by death from continuing, +24but Jesus, on the other hand, because He continues forever, holds His priesthood permanently. +25Therefore He is able also to save forever those who draw near to God through Him, since He always lives to make intercession for them. +26For it was fitting for us to have such a high priest, holy, innocent, undefiled, separated from sinners and exalted above the heavens; +27who does not need daily, like those high priests, to offer up sacrifices, first for His own sins and then for the sins of the people, because this He did once for all when He offered up Himself. +28For the Law appoints men as high priests who are weak, but the word of the oath, which came after the Law, appoints a Son, made perfect forever. + + +Chapter 8 + + +1Now the main point in what has been said is this: we have such a high priest, who has taken His seat at the right hand of the throne of the Majesty in the heavens, +2a minister in the sanctuary and in the true tabernacle, which the Lord pitched, not man. +3For every high priest is appointed to offer both gifts and sacrifices; so it is necessary that this high priest also have something to offer. +4Now if He were on earth, He would not be a priest at all, since there are those who offer the gifts according to the Law; +5who serve a copy and shadow of the heavenly things, just as Moses was warned by God when he was about to erect the tabernacle; for, “SEE,” He says, “THAT YOU MAKE all things ACCORDING TO THE PATTERN WHICH WAS SHOWN YOU ON THE MOUNTAIN.” +6But now He has obtained a more excellent ministry, by as much as He is also the mediator of a better covenant, which has been enacted on better promises. + + +7For if that first covenant had been faultless, there would have been no occasion sought for a second. +8For finding fault with them, He says, +“BEHOLD, DAYS ARE COMING, SAYS THE LORD, +WHEN I WILL EFFECT A NEW COVENANT +WITH THE HOUSE OF ISRAEL AND WITH THE HOUSE OF JUDAH; +9NOT LIKE THE COVENANT WHICH I MADE WITH THEIR FATHERS +ON THE DAY WHEN I TOOK THEM BY THE HAND +TO LEAD THEM OUT OF THE LAND OF EGYPT; +FOR THEY DID NOT CONTINUE IN MY COVENANT, +AND I DID NOT CARE FOR THEM, SAYS THE LORD. +10“FOR THIS IS THE COVENANT THAT I WILL MAKE WITH THE HOUSE OF ISRAEL +AFTER THOSE DAYS, SAYS THE LORD: +I WILL PUT MY LAWS INTO THEIR MINDS, +AND I WILL WRITE THEM ON THEIR HEARTS. +AND I WILL BE THEIR GOD, +AND THEY SHALL BE MY PEOPLE. +11“AND THEY SHALL NOT TEACH EVERYONE HIS FELLOW CITIZEN, +AND EVERYONE HIS BROTHER, SAYING, ‘KNOW THE LORD,’ +FOR ALL WILL KNOW ME, +FROM THE LEAST TO THE GREATEST OF THEM. +12“FOR I WILL BE MERCIFUL TO THEIR INIQUITIES, +AND I WILL REMEMBER THEIR SINS NO MORE.” +13When He said, “A new covenant,” He has made the first obsolete. But whatever is becoming obsolete and growing old is ready to disappear. + + +Chapter 9 + + +1Now even the first covenant had regulations of divine worship and the earthly sanctuary. +2For there was a tabernacle prepared, the outer one, in which were the lampstand and the table and the sacred bread; this is called the holy place. +3Behind the second veil there was a tabernacle which is called the Holy of Holies, +4having a golden altar of incense and the ark of the covenant covered on all sides with gold, in which was a golden jar holding the manna, and Aaron’s rod which budded, and the tables of the covenant; +5and above it were the cherubim of glory overshadowing the mercy seat; but of these things we cannot now speak in detail. +6Now when these things have been so prepared, the priests are continually entering the outer tabernacle performing the divine worship, +7but into the second, only the high priest enters once a year, not without taking blood, which he offers for himself and for the sins of the people committed in ignorance. +8The Holy Spirit is signifying this, that the way into the holy place has not yet been disclosed while the outer tabernacle is still standing, +9which is a symbol for the present time. Accordingly both gifts and sacrifices are offered which cannot make the worshiper perfect in conscience, +10since they relate only to food and drink and various washings, regulations for the body imposed until a time of reformation. +11But when Christ appeared as a high priest of the good things to come, He entered through the greater and more perfect tabernacle, not made with hands, that is to say, not of this creation; +12and not through the blood of goats and calves, but through His own blood, He entered the holy place once for all, having obtained eternal redemption. +13For if the blood of goats and bulls and the ashes of a heifer sprinkling those who have been defiled sanctify for the cleansing of the flesh, +14how much more will the blood of Christ, who through the eternal Spirit offered Himself without blemish to God, cleanse your conscience from dead works to serve the living God? +15For this reason He is the mediator of a new covenant, so that, since a death has taken place for the redemption of the transgressions that were committed under the first covenant, those who have been called may receive the promise of the eternal inheritance. +16For where a covenant is, there must of necessity be the death of the one who made it. +17For a covenant is valid only when men are dead, for it is never in force while the one who made it lives. +18Therefore even the first covenant was not inaugurated without blood. +19For when every commandment had been spoken by Moses to all the people according to the Law, he took the blood of the calves and the goats, with water and scarlet wool and hyssop, and sprinkled both the book itself and all the people, +20saying, “THIS IS THE BLOOD OF THE COVENANT WHICH GOD COMMANDED YOU.” +21And in the same way he sprinkled both the tabernacle and all the vessels of the ministry with the blood. +22And according to the Law, one may almost say, all things are cleansed with blood, and without shedding of blood there is no forgiveness. +23Therefore it was necessary for the copies of the things in the heavens to be cleansed with these, but the heavenly things themselves with better sacrifices than these. +24For Christ did not enter a holy place made with hands, a mere copy of the true one, but into heaven itself, now to appear in the presence of God for us; +25nor was it that He would offer Himself often, as the high priest enters the holy place year by year with blood that is not his own. +26Otherwise, He would have needed to suffer often since the foundation of the world; but now once at the consummation of the ages He has been manifested to put away sin by the sacrifice of Himself. +27And inasmuch as it is appointed for men to die once and after this comes judgment, +28so Christ also, having been offered once to bear the sins of many, will appear a second time for salvation without reference to sin, to those who eagerly await Him. + + +Chapter 10 + + +1For the Law, since it has only a shadow of the good things to come and not the very form of things, can never, by the same sacrifices which they offer continually year by year, make perfect those who draw near. +2Otherwise, would they not have ceased to be offered, because the worshipers, having once been cleansed, would no longer have had consciousness of sins? +3But in those sacrifices there is a reminder of sins year by year. +4For it is impossible for the blood of bulls and goats to take away sins. +5Therefore, when He comes into the world, He says, +“SACRIFICE AND OFFERING YOU HAVE NOT DESIRED, +BUT A BODY YOU HAVE PREPARED FOR ME; +6IN WHOLE BURNT OFFERINGS AND sacrifices FOR SIN YOU HAVE TAKEN NO PLEASURE. +7“THEN I SAID, ‘BEHOLD, I HAVE COME +(IN THE SCROLL OF THE BOOK IT IS WRITTEN OF ME) +TO DO YOUR WILL, O GOD.’ ” +8After saying above, “SACRIFICES AND OFFERINGS AND WHOLE BURNT OFFERINGS AND sacrifices FOR SIN YOU HAVE NOT DESIRED, NOR HAVE YOU TAKEN PLEASURE in them” (which are offered according to the Law), +9then He said, “BEHOLD, I HAVE COME TO DO YOUR WILL.” He takes away the first in order to establish the second. +10By this will we have been sanctified through the offering of the body of Jesus Christ once for all. +11Every priest stands daily ministering and offering time after time the same sacrifices, which can never take away sins; +12but He, having offered one sacrifice for sins for all time, SAT DOWN AT THE RIGHT HAND OF GOD, +13waiting from that time onward UNTIL HIS ENEMIES BE MADE A FOOTSTOOL FOR HIS FEET. +14For by one offering He has perfected for all time those who are sanctified. +15And the Holy Spirit also testifies to us; for after saying, +16“THIS IS THE COVENANT THAT I WILL MAKE WITH THEM +AFTER THOSE DAYS, SAYS THE LORD: +I WILL PUT MY LAWS UPON THEIR HEART, +AND ON THEIR MIND I WILL WRITE THEM,” +He then says, +17“AND THEIR SINS AND THEIR LAWLESS DEEDS +I WILL REMEMBER NO MORE.” +18Now where there is forgiveness of these things, there is no longer any offering for sin. + + +19Therefore, brethren, since we have confidence to enter the holy place by the blood of Jesus, +20by a new and living way which He inaugurated for us through the veil, that is, His flesh, +21and since we have a great priest over the house of God, +22let us draw near with a sincere heart in full assurance of faith, having our hearts sprinkled clean from an evil conscience and our bodies washed with pure water. +23Let us hold fast the confession of our hope without wavering, for He who promised is faithful; +24and let us consider how to stimulate one another to love and good deeds, +25not forsaking our own assembling together, as is the habit of some, but encouraging one another; and all the more as you see the day drawing near. + + +26For if we go on sinning willfully after receiving the knowledge of the truth, there no longer remains a sacrifice for sins, +27but a terrifying expectation of judgment and THE FURY OF A FIRE WHICH WILL CONSUME THE ADVERSARIES. +28Anyone who has set aside the Law of Moses dies without mercy on the testimony of two or three witnesses. +29How much severer punishment do you think he will deserve who has trampled under foot the Son of God, and has regarded as unclean the blood of the covenant by which he was sanctified, and has insulted the Spirit of grace? +30For we know Him who said, “VENGEANCE IS MINE, I WILL REPAY.” And again, “THE LORD WILL JUDGE HIS PEOPLE.” +31It is a terrifying thing to fall into the hands of the living God. +32But remember the former days, when, after being enlightened, you endured a great conflict of sufferings, +33partly by being made a public spectacle through reproaches and tribulations, and partly by becoming sharers with those who were so treated. +34For you showed sympathy to the prisoners and accepted joyfully the seizure of your property, knowing that you have for yourselves a better possession and a lasting one. +35Therefore, do not throw away your confidence, which has a great reward. +36For you have need of endurance, so that when you have done the will of God, you may receive what was promised. +37FOR YET IN A VERY LITTLE WHILE, +HE WHO IS COMING WILL COME, AND WILL NOT DELAY. +38BUT MY RIGHTEOUS ONE SHALL LIVE BY FAITH; +AND IF HE SHRINKS BACK, MY SOUL HAS NO PLEASURE IN HIM. +39But we are not of those who shrink back to destruction, but of those who have faith to the preserving of the soul. + + +Chapter 11 + + +1Now faith is the assurance of things hoped for, the conviction of things not seen. +2For by it the men of old gained approval. +3By faith we understand that the worlds were prepared by the word of God, so that what is seen was not made out of things which are visible. +4By faith Abel offered to God a better sacrifice than Cain, through which he obtained the testimony that he was righteous, God testifying about his gifts, and through faith, though he is dead, he still speaks. +5By faith Enoch was taken up so that he would not see death; AND HE WAS NOT FOUND BECAUSE GOD TOOK HIM UP; for he obtained the witness that before his being taken up he was pleasing to God. +6And without faith it is impossible to please Him, for he who comes to God must believe that He is and that He is a rewarder of those who seek Him. +7By faith Noah, being warned by God about things not yet seen, in reverence prepared an ark for the salvation of his household, by which he condemned the world, and became an heir of the righteousness which is according to faith. +8By faith Abraham, when he was called, obeyed by going out to a place which he was to receive for an inheritance; and he went out, not knowing where he was going. +9By faith he lived as an alien in the land of promise, as in a foreign land, dwelling in tents with Isaac and Jacob, fellow heirs of the same promise; +10for he was looking for the city which has foundations, whose architect and builder is God. +11By faith even Sarah herself received ability to conceive, even beyond the proper time of life, since she considered Him faithful who had promised. +12Therefore there was born even of one man, and him as good as dead at that, as many descendants AS THE STARS OF HEAVEN IN NUMBER, AND INNUMERABLE AS THE SAND WHICH IS BY THE SEASHORE. +13All these died in faith, without receiving the promises, but having seen them and having welcomed them from a distance, and having confessed that they were strangers and exiles on the earth. +14For those who say such things make it clear that they are seeking a country of their own. +15And indeed if they had been thinking of that country from which they went out, they would have had opportunity to return. +16But as it is, they desire a better country, that is, a heavenly one. Therefore God is not ashamed to be called their God; for He has prepared a city for them. +17By faith Abraham, when he was tested, offered up Isaac, and he who had received the promises was offering up his only begotten son; +18it was he to whom it was said, “IN ISAAC YOUR DESCENDANTS SHALL BE CALLED.” +19He considered that God is able to raise people even from the dead, from which he also received him back as a type. +20By faith Isaac blessed Jacob and Esau, even regarding things to come. +21By faith Jacob, as he was dying, blessed each of the sons of Joseph, and worshiped, leaning on the top of his staff. +22By faith Joseph, when he was dying, made mention of the exodus of the sons of Israel, and gave orders concerning his bones. +23By faith Moses, when he was born, was hidden for three months by his parents, because they saw he was a beautiful child; and they were not afraid of the king’s edict. +24By faith Moses, when he had grown up, refused to be called the son of Pharaoh’s daughter, +25choosing rather to endure ill-treatment with the people of God than to enjoy the passing pleasures of sin, +26considering the reproach of Christ greater riches than the treasures of Egypt; for he was looking to the reward. +27By faith he left Egypt, not fearing the wrath of the king; for he endured, as seeing Him who is unseen. +28By faith he kept the Passover and the sprinkling of the blood, so that he who destroyed the firstborn would not touch them. +29By faith they passed through the Red Sea as though they were passing through dry land; and the Egyptians, when they attempted it, were drowned. +30By faith the walls of Jericho fell down after they had been encircled for seven days. +31By faith Rahab the harlot did not perish along with those who were disobedient, after she had welcomed the spies in peace. +32And what more shall I say? For time will fail me if I tell of Gideon, Barak, Samson, Jephthah, of David and Samuel and the prophets, +33who by faith conquered kingdoms, performed acts of righteousness, obtained promises, shut the mouths of lions, +34quenched the power of fire, escaped the edge of the sword, from weakness were made strong, became mighty in war, put foreign armies to flight. +35Women received back their dead by resurrection; and others were tortured, not accepting their release, so that they might obtain a better resurrection; +36and others experienced mockings and scourgings, yes, also chains and imprisonment. +37They were stoned, they were sawn in two, they were tempted, they were put to death with the sword; they went about in sheepskins, in goatskins, being destitute, afflicted, ill-treated +38(men of whom the world was not worthy), wandering in deserts and mountains and caves and holes in the ground. +39And all these, having gained approval through their faith, did not receive what was promised, +40because God had provided something better for us, so that apart from us they would not be made perfect. + + +Chapter 12 + + +1Therefore, since we have so great a cloud of witnesses surrounding us, let us also lay aside every encumbrance and the sin which so easily entangles us, and let us run with endurance the race that is set before us, +2fixing our eyes on Jesus, the author and perfecter of faith, who for the joy set before Him endured the cross, despising the shame, and has sat down at the right hand of the throne of God. +3For consider Him who has endured such hostility by sinners against Himself, so that you will not grow weary and lose heart. + + +4You have not yet resisted to the point of shedding blood in your striving against sin; +5and you have forgotten the exhortation which is addressed to you as sons, +“MY SON, DO NOT REGARD LIGHTLY THE DISCIPLINE OF THE LORD, +NOR FAINT WHEN YOU ARE REPROVED BY HIM; +6FOR THOSE WHOM THE LORD LOVES HE DISCIPLINES, +AND HE SCOURGES EVERY SON WHOM HE RECEIVES.” +7It is for discipline that you endure; God deals with you as with sons; for what son is there whom his father does not discipline? +8But if you are without discipline, of which all have become partakers, then you are illegitimate children and not sons. +9Furthermore, we had earthly fathers to discipline us, and we respected them; shall we not much rather be subject to the Father of spirits, and live? +10For they disciplined us for a short time as seemed best to them, but He disciplines us for our good, so that we may share His holiness. +11All discipline for the moment seems not to be joyful, but sorrowful; yet to those who have been trained by it, afterwards it yields the peaceful fruit of righteousness. +12Therefore, strengthen the hands that are weak and the knees that are feeble, +13and make straight paths for your feet, so that the limb which is lame may not be put out of joint, but rather be healed. +14Pursue peace with all men, and the sanctification without which no one will see the Lord. +15See to it that no one comes short of the grace of God; that no root of bitterness springing up causes trouble, and by it many be defiled; +16that there be no immoral or godless person like Esau, who sold his own birthright for a single meal. +17For you know that even afterwards, when he desired to inherit the blessing, he was rejected, for he found no place for repentance, though he sought for it with tears. + + +18For you have not come to a mountain that can be touched and to a blazing fire, and to darkness and gloom and whirlwind, +19and to the blast of a trumpet and the sound of words which sound was such that those who heard begged that no further word be spoken to them. +20For they could not bear the command, “IF EVEN A BEAST TOUCHES THE MOUNTAIN, IT WILL BE STONED.” +21And so terrible was the sight, that Moses said, “I AM FULL OF FEAR and trembling.” +22But you have come to Mount Zion and to the city of the living God, the heavenly Jerusalem, and to myriads of angels, +23to the general assembly and church of the firstborn who are enrolled in heaven, and to God, the Judge of all, and to the spirits of the righteous made perfect, +24and to Jesus, the mediator of a new covenant, and to the sprinkled blood, which speaks better than the blood of Abel. + + +25See to it that you do not refuse Him who is speaking. For if those did not escape when they refused him who warned them on earth, much less will we escape who turn away from Him who warns from heaven. +26And His voice shook the earth then, but now He has promised, saying, “YET ONCE MORE I WILL SHAKE NOT ONLY THE EARTH, BUT ALSO THE HEAVEN.” +27This expression, “Yet once more,” denotes the removing of those things which can be shaken, as of created things, so that those things which cannot be shaken may remain. +28Therefore, since we receive a kingdom which cannot be shaken, let us show gratitude, by which we may offer to God an acceptable service with reverence and awe; +29for our God is a consuming fire. + + +Chapter 13 + + +1Let love of the brethren continue. +2Do not neglect to show hospitality to strangers, for by this some have entertained angels without knowing it. +3Remember the prisoners, as though in prison with them, and those who are ill-treated, since you yourselves also are in the body. +4Marriage is to be held in honor among all, and the marriage bed is to be undefiled; for fornicators and adulterers God will judge. +5Make sure that your character is free from the love of money, being content with what you have; for He Himself has said, “I WILL NEVER DESERT YOU, NOR WILL I EVER FORSAKE YOU,” +6so that we confidently say, +“THE LORD IS MY HELPER, I WILL NOT BE AFRAID. +WHAT WILL MAN DO TO ME?” +7Remember those who led you, who spoke the word of God to you; and considering the result of their conduct, imitate their faith. +8Jesus Christ is the same yesterday and today and forever. +9Do not be carried away by varied and strange teachings; for it is good for the heart to be strengthened by grace, not by foods, through which those who were so occupied were not benefited. +10We have an altar from which those who serve the tabernacle have no right to eat. +11For the bodies of those animals whose blood is brought into the holy place by the high priest as an offering for sin, are burned outside the camp. +12Therefore Jesus also, that He might sanctify the people through His own blood, suffered outside the gate. +13So, let us go out to Him outside the camp, bearing His reproach. +14For here we do not have a lasting city, but we are seeking the city which is to come. + + +15Through Him then, let us continually offer up a sacrifice of praise to God, that is, the fruit of lips that give thanks to His name. +16And do not neglect doing good and sharing, for with such sacrifices God is pleased. +17Obey your leaders and submit to them, for they keep watch over your souls as those who will give an account. Let them do this with joy and not with grief, for this would be unprofitable for you. +18Pray for us, for we are sure that we have a good conscience, desiring to conduct ourselves honorably in all things. +19And I urge you all the more to do this, so that I may be restored to you the sooner. + + +20Now the God of peace, who brought up from the dead the great Shepherd of the sheep through the blood of the eternal covenant, even Jesus our Lord, +21equip you in every good thing to do His will, working in us that which is pleasing in His sight, through Jesus Christ, to whom be the glory forever and ever. Amen. +22But I urge you, brethren, bear with this word of exhortation, for I have written to you briefly. +23Take notice that our brother Timothy has been released, with whom, if he comes soon, I will see you. +24Greet all of your leaders and all the saints. Those from Italy greet you. +25Grace be with you all. + +New American Standard Bible: 1995 update. (1995). (Heb 1–Jas). La Habra, CA: The Lockman Foundation. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Hebrews Outline.md b/OneNote/Ben's Notebook/Bible Study/Hebrews Outline.md new file mode 100644 index 0000000..96b78fa --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Hebrews Outline.md @@ -0,0 +1,39 @@ +Theme: ? + +1. Christ is the final, ultimate messenger (chapter 1) + + 1. He is heir of all things + 2. He is the means of creation + 3. He is the radiance of His glory + 4. He is the exact representation of His nature + 5. He upholds all things by the word of His power + 6. He made purification of sins + 7. He sat down at the right hand of God + 8. He became better than the angels + + 1. God has declared Him a son + 2. God declares that all angels should work Him + 3. Angels are God's ministers + 4. Christ has a throne + 5. Christ remains forever + 6. Christ will rule his enemies + 7. Angels are ministers to the inheritors +2. Pay attention to the message (chapter 2:1-4) + + 1. So that we do not drift + 2. We will not escape if we neglect it + 3. After Christ spoke of it: + + 1. Apostles confirmed what they heard by preaching + 2. God confirmed what the apostles taught by signs, miracles, wonders +3. Men will rule the world to come (chapter 2:5-8) + + 1. Angels do not have this privilege + 2. Man + + 1. Is temporarily lower than the angels + 2. Crowned with glory and honor + 3. Appointed over all creation + 4. Having all things put in subjection + 5. Does not yet have all things subjected to him +4. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Hebrews Summary.md b/OneNote/Ben's Notebook/Bible Study/Hebrews Summary.md new file mode 100644 index 0000000..94c98ea --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Hebrews Summary.md @@ -0,0 +1,27 @@ +Theme: Christ is superior to all, so be faithful to Him. + +Key verses: +Hebrews 2:1–4 +1 For this reason we must pay much closer attention to what we have heard, so that we do not drift away from it. +2 For if the word spoken through angels proved unalterable, and every transgression and disobedience received a just penalty, +3 how will we escape if we neglect so great a salvation? After it was at the first spoken through the Lord, it was confirmed to us by those who heard, +4 God also testifying with them, both by signs and wonders and by various miracles and by gifts of the Holy Spirit according to His own will. + +Outline + +1. Chapter 1: Christ is superior to all messengers, listen to Him +2. Chapter 2-7: Christ is superior to any high priest + + 1. Chapter 2: Confide in Him (He became like us)_Because He was humbled and suffered all temptations like us, we can confide in Him as our high priest._ + 2. Chapter 3: Follow Him (He's a greater leader than Moses)_Moses was a servant in the house of God, Christ is a son and, therefore, worth of more honor than Moses._ + 3. Chapter 4: Rest in Him (His rest is final, but entry is temporary)_There is a limited time to enter His perfect, final rest. Enter it now!_ + 4. Chapter 5: Obey Him (He is the source of salvation)_Because He became a man, He learned obedience Himself, becoming perfect in the process and, therefore, the source of salvation for us, if we obey Him._ + 5. Chapter 6: Mature in Him (His priesthood is enlightening)_Once one understands Christ's priesthood, it enlightens us to the truth that sin is dealt with. We can now move on to maturity in Christ, working good._ + 6. Chapter 7: Draw near to Him (His priesthood is forever)_Because His priesthood is after the order of Melchizedek and not Aaron, His priesthood is forever and He is, therefore, able to save forever. So, draw near to Him and no longer draw near to the old priesthood._ +3. Chapter 8-9: Christ initiated a superior covenant + + 1. Chapter 8: New covenant = better ministry, in the true tabernacle + 2. Chapter 9: New covenant = better sacrifice, one time giving of the perfect lamb +4. Chapter 10: Christ is the superior sacrifice +5. Chapter 11-12: Many others made it +6. Chapter 13: Reminders \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Psalm 1 Outline.md b/OneNote/Ben's Notebook/Bible Study/Psalm 1 Outline.md new file mode 100644 index 0000000..08b9068 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Psalm 1 Outline.md @@ -0,0 +1,41 @@ +1. Blessed is the man + + 1. Relationship to the wicked + + 1. Walks not in the counsel of the ungodly + 2. Stands not in the path of sinners + 3. Sits not in the seat of the scornful + 2. Relationship to the Lord + + 1. Delights in the law of the Lord + 2. Meditates on His law day and night + 3. Like a tree + + 1. Planted by rivers of water + 2. Brings forth fruit in its season + 3. Leaf does not wither + 4. Whatever he does prospers +2. Ungodly man + + 1. Not like the blessed man + 2. Like chaff driven away by the wind + 3. Will not stand in the judgement + 4. Will not stand in congregation of the righteous +3. Summary + + 1. The way of the righteous is known by the Lord + 2. The way of the ungodly shall perish + + + +A. Righteous chooses to separate from unrighteous +B. Righteous loves the Law of the Lord +C. Righteous is firmly planted (like tree) +D. Righteous is prosperous +D'. Ungodly is not prosperous +C'. Ungodly is not planted at all (like chaff) +B'. Ungodly fails under judgement +A'. Ungodly forcibly removed from among the righteous + +A. The Lord knowns the way of the righteous +A'. The way of the ungodly perishes \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Psalm 130.md b/OneNote/Ben's Notebook/Bible Study/Psalm 130.md new file mode 100644 index 0000000..1b58c73 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Psalm 130.md @@ -0,0 +1,19 @@ +> [!caution] This page contained a drawing which was not converted. + +Psalm 130 +A Song of Ascents. +1 Out of the depths I have cried to You, O LORD. + +2 Lord, hear my voice! Let Your ears be attentive To the voice of my supplications. + +3 If You, LORD, should mark iniquities, O Lord, who could stand? + +4 But there is forgiveness with You, That You may be feared. + +5 I wait for the LORD, my soul does wait, And in His word do I hope. + +6 My soul waits for the Lord More than the watchmen for the morning; Indeed, more than the watchmen for the morning. + +7 O Israel, hope in the LORD; For with the LORD there is lovingkindness, And with Him is abundant redemption. + +8 And He will redeem Israel From all his iniquities. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Psalm 2 Outline.md b/OneNote/Ben's Notebook/Bible Study/Psalm 2 Outline.md new file mode 100644 index 0000000..fbd775e --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Psalm 2 Outline.md @@ -0,0 +1,36 @@ +1. Rebels speak to God + + 1. Their mindset + + 1. Rage + 2. Plotting vanity + 2. The context of their speaking + + 1. Taking counsel together + 2. Taking counsel against the Lord + 3. Taking counsel against His Anointed + 3. They say they will break their bonds +2. God speaks to the rebels + + 1. His mindset + + 1. Laughing + 2. Derision + 2. The context of His speaking + + 1. Wrath + 2. Deep displeasure + 3. He says He has set His King on His holy hill +3. The Anointed speaks to all + + 1. You are my Son + 2. I will give You the nations as Your inheritance + 3. You shall break the nations +4. The psalmist speaks to the rebels + + 1. Be wise + 2. Be instructed + 3. Serve the Lord + 4. Rejoice + 5. Kiss the Son + 6. Blessed are those who trust in the Son \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Psalm 3 Outline.md b/OneNote/Ben's Notebook/Bible Study/Psalm 3 Outline.md new file mode 100644 index 0000000..277b99b --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Psalm 3 Outline.md @@ -0,0 +1,6 @@ +1. David's enemies + + 1. …are increasing + 2. …are rising up against him + 3. …are saying, "There is no help for him in God." +2. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Bible Study/Romans Observation.md b/OneNote/Ben's Notebook/Bible Study/Romans Observation.md new file mode 100644 index 0000000..2a99747 --- /dev/null +++ b/OneNote/Ben's Notebook/Bible Study/Romans Observation.md @@ -0,0 +1,867 @@ +> [!caution] This page contained a drawing which was not converted. + +1:1 Paul, a bond-servant of Christ Jesus, called as an apostle, set apart for the gospel of God, + +1:2 which He promised beforehand through His prophets in the holy Scriptures, + +1:3 concerning His Son, who was born of a descendant of David according to the flesh, + +1:4 who was declared the Son of God with power by the resurrection from the dead, according to the Spirit of holiness, Jesus Christ our Lord, + +1:5 through whom we have received grace and apostleship to bring about the obedience of faith among all the Gentiles for His name’s sake, + +1:6 among whom you also are the called of Jesus Christ; + +1:7 to all who are beloved of God in Rome, called as saints: Grace to you and peace from God our Father and the Lord Jesus Christ. + +1:8 First, I thank my God through Jesus Christ for you all, because your faith is being proclaimed throughout the whole world. + +1:9 For God, whom I serve in my spirit in the preaching of the gospel of His Son, is my witness as to how unceasingly I make mention of you, + +1:10 always in my prayers making request, if perhaps now at last by the will of God I may succeed in coming to you. + +1:11 For I long to see you so that I may impart some spiritual gift to you, that you may be established; + +1:12 that is, that I may be encouraged together with you while among you, each of us by the other’s faith, both yours and mine. + +1:13 I do not want you to be unaware, brethren, that often I have planned to come to you (and have been prevented so far) so that I may obtain some fruit among you also, even as among the rest of the Gentiles. + +1:14 I am under obligation both to Greeks and to barbarians, both to the wise and to the foolish. + +1:15 So, for my part, I am eager to preach the gospel to you also who are in Rome. + +1:16 For I am not ashamed of the gospel, for it is the power of God for salvation to everyone who believes, to the Jew first and also to the Greek. + +1:17 For in it the righteousness of God is revealed from faith to faith; as it is written, “But the righteous man shall live by faith.” + +1:18 For the wrath of God is revealed from heaven against all ungodliness and unrighteousness of men who suppress the truth in unrighteousness, + +1:19 because that which is known about God is evident within them; for God made it evident to them. + +1:20 For since the creation of the world His invisible attributes, His eternal power and divine nature, have been clearly seen, being understood through what has been made, so that they are without excuse. + +1:21 For even though they knew God, they did not honor Him as God or give thanks, but they became futile in their speculations, and their foolish heart was darkened. + +1:22 Professing to be wise, they became fools, + +1:23 and exchanged the glory of the incorruptible God for an image in the form of corruptible man and of birds and four-footed animals and crawling creatures. + +1:24 Therefore God gave them over in the lusts of their hearts to impurity, so that their bodies would be dishonored among them. + +1:25 For they exchanged the truth of God for a lie, and worshiped and served the creature rather than the Creator, who is blessed forever. Amen. + +1:26 For this reason God gave them over to degrading passions; for their women exchanged the natural function for that which is unnatural, + +1:27 and in the same way also the men abandoned the natural function of the woman and burned in their desire toward one another, men with men committing indecent acts and receiving in their own persons the due penalty of their error. + +1:28 And just as they did not see fit to acknowledge God any longer, God gave them over to a depraved mind, to do those things which are not proper, + +1:29 being filled with all unrighteousness, wickedness, greed, evil; full of envy, murder, strife, deceit, malice; they are gossips, + +1:30 slanderers, haters of God, insolent, arrogant, boastful, inventors of evil, disobedient to parents, + +1:31 without understanding, untrustworthy, unloving, unmerciful; + +1:32 and although they know the ordinance of God, that those who practice such things are worthy of death, they not only do the same, but also give hearty approval to those who practice them. + +2:1 Therefore you have no excuse, everyone of you who passes judgment, for in that which you judge another, you condemn yourself; for you who judge practice the same things. + +2:2 And we know that the judgment of God rightly falls upon those who practice such things. + +2:3 But do you suppose this, O man, when you pass judgment on those who practice such things and do the same yourself, that you will escape the judgment of God? + +2:4 Or do you think lightly of the riches of His kindness and tolerance and patience, not knowing that the kindness of God leads you to repentance? + +2:5 But because of your stubbornness and unrepentant heart you are storing up wrath for yourself in the day of wrath and revelation of the righteous judgment of God, + +2:6 who will render to each person according to his deeds: + +2:7 to those who by perseverance in doing good seek for glory and honor and immortality, eternal life; + +2:8 but to those who are selfishly ambitious and do not obey the truth, but obey unrighteousness, wrath and indignation. + +2:9 There will be tribulation and distress for every soul of man who does evil, of the Jew first and also of the Greek, + +2:10 but glory and honor and peace to everyone who does good, to the Jew first and also to the Greek. + +2:11 For there is no partiality with God. + +2:12 For all who have sinned without the Law will also perish without the Law, and all who have sinned under the Law will be judged by the Law; + +2:13 for it is not the hearers of the Law who are just before God, but the doers of the Law will be justified. + +2:14 For when Gentiles who do not have the Law do instinctively the things of the Law, these, not having the Law, are a law to themselves, + +2:15 in that they show the work of the Law written in their hearts, their conscience bearing witness and their thoughts alternately accusing or else defending them, + +2:16 on the day when, according to my gospel, God will judge the secrets of men through Christ Jesus. + +2:17 But if you bear the name “Jew” and rely upon the Law and boast in God, + +2:18 and know His will and approve the things that are essential, being instructed out of the Law, + +2:19 and are confident that you yourself are a guide to the blind, a light to those who are in darkness, + +2:20 a corrector of the foolish, a teacher of the immature, having in the Law the embodiment of knowledge and of the truth, + +2:21 you, therefore, who teach another, do you not teach yourself? You who preach that one shall not steal, do you steal? + +2:22 You who say that one should not commit adultery, do you commit adultery? You who abhor idols, do you rob temples? + +2:23 You who boast in the Law, through your breaking the Law, do you dishonor God? + +2:24 For “the name of God is blasphemed among the Gentiles because of you,” just as it is written. + +2:25 For indeed circumcision is of value if you practice the Law; but if you are a transgressor of the Law, your circumcision has become uncircumcision. + +2:26 So if the uncircumcised man keeps the requirements of the Law, will not his uncircumcision be regarded as circumcision? + +2:27 And he who is physically uncircumcised, if he keeps the Law, will he not judge you who though having the letter of the Law and circumcision are a transgressor of the Law? + +2:28 For he is not a Jew who is one outwardly, nor is circumcision that which is outward in the flesh. + +2:29 But he is a Jew who is one inwardly; and circumcision is that which is of the heart, by the Spirit, not by the letter; and his praise is not from men, but from God. + +3:1 Then what advantage has the Jew? Or what is the benefit of circumcision? + +3:2 Great in every respect. First of all, that they were entrusted with the oracles of God. + +3:3 What then? If some did not believe, their unbelief will not nullify the faithfulness of God, will it? + +3:4 May it never be! Rather, let God be found true, though every man be found a liar, as it is written, “That You may be justified in Your words, And prevail when You are judged.” + +3:5 But if our unrighteousness demonstrates the righteousness of God, what shall we say? The God who inflicts wrath is not unrighteous, is He? (I am speaking in human terms.) + +3:6 May it never be! For otherwise, how will God judge the world? + +3:7 But if through my lie the truth of God abounded to His glory, why am I also still being judged as a sinner? + +3:8 And why not say (as we are slanderously reported and as some claim that we say), “Let us do evil that good may come”? Their condemnation is just. + +3:9 What then? Are we better than they? Not at all; for we have already charged that both Jews and Greeks are all under sin; + +3:10 as it is written, “There is none righteous, not even one; + +3:11 There is none who understands, There is none who seeks for God; + +3:12 All have turned aside, together they have become useless; There is none who does good, There is not even one.” + +3:13 “Their throat is an open grave, With their tongues they keep deceiving,” “The poison of asps is under their lips”; + +3:14 “Whose mouth is full of cursing and bitterness”; + +3:15 “Their feet are swift to shed blood, + +3:16 Destruction and misery are in their paths, + +3:17 And the path of peace they have not known.” + +3:18 “There is no fear of God before their eyes.” + +3:19 Now we know that whatever the Law says, it speaks to those who are under the Law, so that every mouth may be closed and all the world may become accountable to God; + +3:20 because by the works of the Law no flesh will be justified in His sight; for through the Law comes the knowledge of sin. + +3:21 But now apart from the Law the righteousness of God has been manifested, being witnessed by the Law and the Prophets, + +3:22 even the righteousness of God through faith in Jesus Christ for all those who believe; for there is no distinction; + +3:23 for all have sinned and fall short of the glory of God, + +3:24 being justified as a gift by His grace through the redemption which is in Christ Jesus; + +3:25 whom God displayed publicly as a propitiation in His blood through faith. This was to demonstrate His righteousness, because in the forbearance of God He passed over the sins previously committed; + +3:26 for the demonstration, I say, of His righteousness at the present time, so that He would be just and the justifier of the one who has faith in Jesus. + +3:27 Where then is boasting? It is excluded. By what kind of law? Of works? No, but by a law of faith. + +3:28 For we maintain that a man is justified by faith apart from works of the Law. + +3:29 Or is God the God of Jews only? Is He not the God of Gentiles also? Yes, of Gentiles also, + +3:30 since indeed God who will justify the circumcised by faith and the uncircumcised through faith is one. + +3:31 Do we then nullify the Law through faith? May it never be! On the contrary, we establish the Law. + +4:1 What then shall we say that Abraham, our forefather according to the flesh, has found? + +4:2 For if Abraham was justified by works, he has something to boast about, but not before God. + +4:3 For what does the Scripture say? “Abraham believed God, and it was credited to him as righteousness.” + +4:4 Now to the one who works, his wage is not credited as a favor, but as what is due. + +4:5 But to the one who does not work, but believes in Him who justifies the ungodly, his faith is credited as righteousness, + +4:6 just as David also speaks of the blessing on the man to whom God credits righteousness apart from works: + +4:7 “Blessed are those whose lawless deeds have been forgiven, And whose sins have been covered. + +4:8 “Blessed is the man whose sin the Lord will not take into account.” + +4:9 Is this blessing then on the circumcised, or on the uncircumcised also? For we say, “Faith was credited to Abraham as righteousness.” + +4:10 How then was it credited? While he was circumcised, or uncircumcised? Not while circumcised, but while uncircumcised; + +4:11 and he received the sign of circumcision, a seal of the righteousness of the faith which he had while uncircumcised, so that he might be the father of all who believe without being circumcised, that righteousness might be credited to them, + +4:12 and the father of circumcision to those who not only are of the circumcision, but who also follow in the steps of the faith of our father Abraham which he had while uncircumcised. + +4:13 For the promise to Abraham or to his descendants that he would be heir of the world was not through the Law, but through the righteousness of faith. + +4:14 For if those who are of the Law are heirs, faith is made void and the promise is nullified; + +4:15 for the Law brings about wrath, but where there is no law, there also is no violation. + +4:16 For this reason it is by faith, in order that it may be in accordance with grace, so that the promise will be guaranteed to all the descendants, not only to those who are of the Law, but also to those who are of the faith of Abraham, who is the father of us all, + +4:17 (as it is written, “A father of many nations have I made you”) in the presence of Him whom he believed, even God, who gives life to the dead and calls into being that which does not exist. + +4:18 In hope against hope he believed, so that he might become a father of many nations according to that which had been spoken, “So shall your descendants be.” + +4:19 Without becoming weak in faith he contemplated his own body, now as good as dead since he was about a hundred years old, and the deadness of Sarah’s womb; + +4:20 yet, with respect to the promise of God, he did not waver in unbelief but grew strong in faith, giving glory to God, + +4:21 and being fully assured that what God had promised, He was able also to perform. + +4:22 Therefore it was also credited to him as righteousness. + +4:23 Now not for his sake only was it written that it was credited to him, + +4:24 but for our sake also, to whom it will be credited, as those who believe in Him who raised Jesus our Lord from the dead, + +4:25 He who was delivered over because of our transgressions, and was raised because of our justification. + +5:1 Therefore, having been justified by faith, we have peace with God through our Lord Jesus Christ, + +5:2 through whom also we have obtained our introduction by faith into this grace in which we stand; and we exult in hope of the glory of God. + +5:3 And not only this, but we also exult in our tribulations, knowing that tribulation brings about perseverance; + +5:4 and perseverance, proven character; and proven character, hope; + +5:5 and hope does not disappoint, because the love of God has been poured out within our hearts through the Holy Spirit who was given to us. + +5:6 For while we were still helpless, at the right time Christ died for the ungodly. + +5:7 For one will hardly die for a righteous man; though perhaps for the good man someone would dare even to die. + +5:8 But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. + +5:9 Much more then, having now been justified by His blood, we shall be saved from the wrath of God through Him. + +5:10 For if while we were enemies we were reconciled to God through the death of His Son, much more, having been reconciled, we shall be saved by His life. + +5:11 And not only this, but we also exult in God through our Lord Jesus Christ, through whom we have now received the reconciliation. + +5:12 Therefore, just as through one man sin entered into the world, and death through sin, and so death spread to all men, because all sinned— + +5:13 for until the Law sin was in the world, but sin is not imputed when there is no law. + +5:14 Nevertheless death reigned from Adam until Moses, even over those who had not sinned in the likeness of the offense of Adam, who is a type of Him who was to come. + +5:15 But the free gift is not like the transgression. For if by the transgression of the one the many died, much more did the grace of God and the gift by the grace of the one Man, Jesus Christ, abound to the many. + +5:16 The gift is not like that which came through the one who sinned; for on the one hand the judgment arose from one transgression resulting in condemnation, but on the other hand the free gift arose from many transgressions resulting in justification. + +5:17 For if by the transgression of the one, death reigned through the one, much more those who receive the abundance of grace and of the gift of righteousness will reign in life through the One, Jesus Christ. + +5:18 So then as through one transgression there resulted condemnation to all men, even so through one act of righteousness there resulted justification of life to all men. + +5:19 For as through the one man’s disobedience the many were made sinners, even so through the obedience of the One the many will be made righteous. + +5:20 The Law came in so that the transgression would increase; but where sin increased, grace abounded all the more, + +5:21 so that, as sin reigned in death, even so grace would reign through righteousness to eternal life through Jesus Christ our Lord. + +6:1 What shall we say then? Are we to continue in sin so that grace may increase? + +6:2 May it never be! How shall we who died to sin still live in it? + +6:3 Or do you not know that all of us who have been baptized into Christ Jesus have been baptized into His death? + +6:4 Therefore we have been buried with Him through baptism into death, so that as Christ was raised from the dead through the glory of the Father, so we too might walk in newness of life. + +6:5 For if we have become united with Him in the likeness of His death, certainly we shall also be in the likeness of His resurrection, + +6:6 knowing this, that our old self was crucified with Him, in order that our body of sin might be done away with, so that we would no longer be slaves to sin; + +6:7 for he who has died is freed from sin. + +6:8 Now if we have died with Christ, we believe that we shall also live with Him, + +6:9 knowing that Christ, having been raised from the dead, is never to die again; death no longer is master over Him. + +6:10 For the death that He died, He died to sin once for all; but the life that He lives, He lives to God. + +6:11 Even so consider yourselves to be dead to sin, but alive to God in Christ Jesus. + +6:12 Therefore do not let sin reign in your mortal body so that you obey its lusts, + +6:13 and do not go on presenting the members of your body to sin as instruments of unrighteousness; but present yourselves to God as those alive from the dead, and your members as instruments of righteousness to God. + +6:14 For sin shall not be master over you, for you are not under law but under grace. + +6:15 What then? Shall we sin because we are not under law but under grace? May it never be! + +6:16 Do you not know that when you present yourselves to someone as slaves for obedience, you are slaves of the one whom you obey, either of sin resulting in death, or of obedience resulting in righteousness? + +6:17 But thanks be to God that though you were slaves of sin, you became obedient from the heart to that form of teaching to which you were committed, + +6:18 and having been freed from sin, you became slaves of righteousness. + +6:19 I am speaking in human terms because of the weakness of your flesh. For just as you presented your members as slaves to impurity and to lawlessness, resulting in further lawlessness, so now present your members as slaves to righteousness, resulting in sanctification. + +6:20 For when you were slaves of sin, you were free in regard to righteousness. + +6:21 Therefore what benefit were you then deriving from the things of which you are now ashamed? For the outcome of those things is death. + +6:22 But now having been freed from sin and enslaved to God, you derive your benefit, resulting in sanctification, and the outcome, eternal life. + +6:23 For the wages of sin is death, but the free gift of God is eternal life in Christ Jesus our Lord. + +7:1 Or do you not know, brethren (for I am speaking to those who know the law), that the law has jurisdiction over a person as long as he lives? + +7:2 For the married woman is bound by law to her husband while he is living; but if her husband dies, she is released from the law concerning the husband. + +7:3 So then, if while her husband is living she is joined to another man, she shall be called an adulteress; but if her husband dies, she is free from the law, so that she is not an adulteress though she is joined to another man. + +7:4 Therefore, my brethren, you also were made to die to the Law through the body of Christ, so that you might be joined to another, to Him who was raised from the dead, in order that we might bear fruit for God. + +7:5 For while we were in the flesh, the sinful passions, which were aroused by the Law, were at work in the members of our body to bear fruit for death. + +7:6 But now we have been released from the Law, having died to that by which we were bound, so that we serve in newness of the Spirit and not in oldness of the letter. + +7:7 What shall we say then? Is the Law sin? May it never be! On the contrary, I would not have come to know sin except through the Law; for I would not have known about coveting if the Law had not said, “You shall not covet.” + +7:8 But sin, taking opportunity through the commandment, produced in me coveting of every kind; for apart from the Law sin is dead. + +7:9 I was once alive apart from the Law; but when the commandment came, sin became alive and I died; + +7:10 and this commandment, which was to result in life, proved to result in death for me; + +7:11 for sin, taking an opportunity through the commandment, deceived me and through it killed me. + +7:12 So then, the Law is holy, and the commandment is holy and righteous and good. + +7:13 Therefore did that which is good become a cause of death for me? May it never be! Rather it was sin, in order that it might be shown to be sin by effecting my death through that which is good, so that through the commandment sin would become utterly sinful. + +7:14 For we know that the Law is spiritual, but I am of flesh, sold into bondage to sin. + +7:15 For what I am doing, I do not understand; for I am not practicing what I would like to do, but I am doing the very thing I hate. + +7:16 But if I do the very thing I do not want to do, I agree with the Law, confessing that the Law is good. + +7:17 So now, no longer am I the one doing it, but sin which dwells in me. + +7:18 For I know that nothing good dwells in me, that is, in my flesh; for the willing is present in me, but the doing of the good is not. + +7:19 For the good that I want, I do not do, but I practice the very evil that I do not want. + +7:20 But if I am doing the very thing I do not want, I am no longer the one doing it, but sin which dwells in me. + +7:21 I find then the principle that evil is present in me, the one who wants to do good. + +7:22 For I joyfully concur with the law of God in the inner man, + +7:23 but I see a different law in the members of my body, waging war against the law of my mind and making me a prisoner of the law of sin which is in my members. + +7:24 Wretched man that I am! Who will set me free from the body of this death? + +7:25 Thanks be to God through Jesus Christ our Lord! So then, on the one hand I myself with my mind am serving the law of God, but on the other, with my flesh the law of sin. + +8:1 Therefore there is now no condemnation for those who are in Christ Jesus. + +8:2 For the law of the Spirit of life in Christ Jesus has set you free from the law of sin and of death. + +8:3 For what the Law could not do, weak as it was through the flesh, God did: sending His own Son in the likeness of sinful flesh and as an offering for sin, He condemned sin in the flesh, + +8:4 so that the requirement of the Law might be fulfilled in us, who do not walk according to the flesh but according to the Spirit. + +8:5 For those who are according to the flesh set their minds on the things of the flesh, but those who are according to the Spirit, the things of the Spirit. + +8:6 For the mind set on the flesh is death, but the mind set on the Spirit is life and peace, + +8:7 because the mind set on the flesh is hostile toward God; for it does not subject itself to the law of God, for it is not even able to do so, + +8:8 and those who are in the flesh cannot please God. + +8:9 However, you are not in the flesh but in the Spirit, if indeed the Spirit of God dwells in you. But if anyone does not have the Spirit of Christ, he does not belong to Him. + +8:10 If Christ is in you, though the body is dead because of sin, yet the spirit is alive because of righteousness. + +8:11 But if the Spirit of Him who raised Jesus from the dead dwells in you, He who raised Christ Jesus from the dead will also give life to your mortal bodies through His Spirit who dwells in you. + +8:12 So then, brethren, we are under obligation, not to the flesh, to live according to the flesh— + +8:13 for if you are living according to the flesh, you must die; but if by the Spirit you are putting to death the deeds of the body, you will live. + +8:14 For all who are being led by the Spirit of God, these are sons of God. + +8:15 For you have not received a spirit of slavery leading to fear again, but you have received a spirit of adoption as sons by which we cry out, “Abba! Father!” + +8:16 The Spirit Himself testifies with our spirit that we are children of God, + +8:17 and if children, heirs also, heirs of God and fellow heirs with Christ, if indeed we suffer with Him so that we may also be glorified with Him. + +8:18 For I consider that the sufferings of this present time are not worthy to be compared with the glory that is to be revealed to us. + +8:19 For the anxious longing of the creation waits eagerly for the revealing of the sons of God. + +8:20 For the creation was subjected to futility, not willingly, but because of Him who subjected it, in hope + +8:21 that the creation itself also will be set free from its slavery to corruption into the freedom of the glory of the children of God. + +8:22 For we know that the whole creation groans and suffers the pains of childbirth together until now. + +8:23 And not only this, but also we ourselves, having the first fruits of the Spirit, even we ourselves groan within ourselves, waiting eagerly for our adoption as sons, the redemption of our body. + +8:24 For in hope we have been saved, but hope that is seen is not hope; for who hopes for what he already sees? + +8:25 But if we hope for what we do not see, with perseverance we wait eagerly for it. + +8:26 In the same way the Spirit also helps our weakness; for we do not know how to pray as we should, but the Spirit Himself intercedes for us with groanings too deep for words; + +8:27 and He who searches the hearts knows what the mind of the Spirit is, because He intercedes for the saints according to the will of God. + +8:28 And we know that God causes all things to work together for good to those who love God, to those who are called according to His purpose. + +8:29 For those whom He foreknew, He also predestined to become conformed to the image of His Son, so that He would be the firstborn among many brethren; + +8:30 and these whom He predestined, He also called; and these whom He called, He also justified; and these whom He justified, He also glorified. + +8:31 What then shall we say to these things? If God is for us, who is against us? + +8:32 He who did not spare His own Son, but delivered Him over for us all, how will He not also with Him freely give us all things? + +8:33 Who will bring a charge against God’s elect? God is the one who justifies; + +8:34 who is the one who condemns? Christ Jesus is He who died, yes, rather who was raised, who is at the right hand of God, who also intercedes for us. + +8:35 Who will separate us from the love of Christ? Will tribulation, or distress, or persecution, or famine, or nakedness, or peril, or sword? + +8:36 Just as it is written, “For Your sake we are being put to death all day long; We were considered as sheep to be slaughtered.” + +8:37 But in all these things we overwhelmingly conquer through Him who loved us. + +8:38 For I am convinced that neither death, nor life, nor angels, nor principalities, nor things present, nor things to come, nor powers, + +8:39 nor height, nor depth, nor any other created thing, will be able to separate us from the love of God, which is in Christ Jesus our Lord. + +9:1 I am telling the truth in Christ, I am not lying, my conscience testifies with me in the Holy Spirit, + +9:2 that I have great sorrow and unceasing grief in my heart. + +9:3 For I could wish that I myself were accursed, separated from Christ for the sake of my brethren, my kinsmen according to the flesh, + +9:4 who are Israelites, to whom belongs the adoption as sons, and the glory and the covenants and the giving of the Law and the temple service and the promises, + +9:5 whose are the fathers, and from whom is the Christ according to the flesh, who is over all, God blessed forever. Amen. + +9:6 But it is not as though the word of God has failed. For they are not all Israel who are descended from Israel; + +9:7 nor are they all children because they are Abraham’s descendants, but: “through Isaac your descendants will be named.” + +9:8 That is, it is not the children of the flesh who are children of God, but the children of the promise are regarded as descendants. + +9:9 For this is the word of promise: “At this time I will come, and Sarah shall have a son.” + +9:10 And not only this, but there was Rebekah also, when she had conceived twins by one man, our father Isaac; + +9:11 for though the twins were not yet born and had not done anything good or bad, so that God’s purpose according to His choice would stand, not because of works but because of Him who calls, + +9:12 it was said to her, “The older will serve the younger.” + +9:13 Just as it is written, “Jacob I loved, but Esau I hated.” + +9:14 What shall we say then? There is no injustice with God, is there? May it never be! + +9:15 For He says to Moses, “I will have mercy on whom I have mercy, and I will have compassion on whom I have compassion.” + +9:16 So then it does not depend on the man who wills or the man who runs, but on God who has mercy. + +9:17 For the Scripture says to Pharaoh, “For this very purpose I raised you up, to demonstrate My power in you, and that My name might be proclaimed throughout the whole earth.” + +9:18 So then He has mercy on whom He desires, and He hardens whom He desires. + +9:19 You will say to me then, “Why does He still find fault? For who resists His will?” + +9:20 On the contrary, who are you, O man, who answers back to God? The thing molded will not say to the molder, “Why did you make me like this,” will it? + +9:21 Or does not the potter have a right over the clay, to make from the same lump one vessel for honorable use and another for common use? + +9:22 What if God, although willing to demonstrate His wrath and to make His power known, endured with much patience vessels of wrath prepared for destruction? + +9:23 And He did so to make known the riches of His glory upon vessels of mercy, which He prepared beforehand for glory, + +9:24 even us, whom He also called, not from among Jews only, but also from among Gentiles. + +9:25 As He says also in Hosea, “I will call those who were not My people, ‘My people,’ And her who was not beloved, ‘beloved.’ ” + +9:26 “And it shall be that in the place where it was said to them, ‘you are not My people,’ There they shall be called sons of the living God.” + +9:27 Isaiah cries out concerning Israel, “Though the number of the sons of Israel be like the sand of the sea, it is the remnant that will be saved; + +9:28 for the Lord will execute His word on the earth, thoroughly and quickly.” + +9:29 And just as Isaiah foretold, “Unless the Lord of Sabaoth had left to us a posterity, We would have become like Sodom, and would have resembled Gomorrah.” + +9:30 What shall we say then? That Gentiles, who did not pursue righteousness, attained righteousness, even the righteousness which is by faith; + +9:31 but Israel, pursuing a law of righteousness, did not arrive at that law. + +9:32 Why? Because they did not pursue it by faith, but as though it were by works. They stumbled over the stumbling stone, + +9:33 just as it is written, “Behold, I lay in Zion a stone of stumbling and a rock of offense, And he who believes in Him will not be disappointed.” + +10:1 Brethren, my heart’s desire and my prayer to God for them is for their salvation. + +10:2 For I testify about them that they have a zeal for God, but not in accordance with knowledge. + +10:3 For not knowing about God’s righteousness and seeking to establish their own, they did not subject themselves to the righteousness of God. + +10:4 For Christ is the end of the law for righteousness to everyone who believes. + +10:5 For Moses writes that the man who practices the righteousness which is based on law shall live by that righteousness. + +10:6 But the righteousness based on faith speaks as follows: “Do not say in your heart, ‘Who will ascend into heaven?’ (that is, to bring Christ down), + +10:7 or ‘Who will descend into the abyss?’ (that is, to bring Christ up from the dead).” + +10:8 But what does it say? “The word is near you, in your mouth and in your heart”—that is, the word of faith which we are preaching, + +10:9 that if you confess with your mouth Jesus as Lord, and believe in your heart that God raised Him from the dead, you will be saved; + +10:10 for with the heart a person believes, resulting in righteousness, and with the mouth he confesses, resulting in salvation. + +10:11 For the Scripture says, “Whoever believes in Him will not be disappointed.” + +10:12 For there is no distinction between Jew and Greek; for the same Lord is Lord of all, abounding in riches for all who call on Him; + +10:13 for “Whoever will call on the name of the Lord will be saved.” + +10:14 How then will they call on Him in whom they have not believed? How will they believe in Him whom they have not heard? And how will they hear without a preacher? + +10:15 How will they preach unless they are sent? Just as it is written, “How beautiful are the feet of those who bring good news of good things!” + +10:16 However, they did not all heed the good news; for Isaiah says, “Lord, who has believed our report?” + +10:17 So faith comes from hearing, and hearing by the word of Christ. + +10:18 But I say, surely they have never heard, have they? Indeed they have; “Their voice has gone out into all the earth, And their words to the ends of the world.” + +10:19 But I say, surely Israel did not know, did they? First Moses says, “I will make you jealous by that which is not a nation, By a nation without understanding will I anger you.” + +10:20 And Isaiah is very bold and says, “I was found by those who did not seek Me, I became manifest to those who did not ask for Me.” + +10:21 But as for Israel He says, “All the day long I have stretched out My hands to a disobedient and obstinate people.” + +11:1 I say then, God has not rejected His people, has He? May it never be! For I too am an Israelite, a descendant of Abraham, of the tribe of Benjamin. + +11:2 God has not rejected His people whom He foreknew. Or do you not know what the Scripture says in the passage about Elijah, how he pleads with God against Israel? + +11:3 “Lord, they have killed Your prophets, they have torn down Your altars, and I alone am left, and they are seeking my life.” + +11:4 But what is the divine response to him? “I have kept for Myself seven thousand men who have not bowed the knee to Baal.” + +11:5 In the same way then, there has also come to be at the present time a remnant according to God’s gracious choice. + +11:6 But if it is by grace, it is no longer on the basis of works, otherwise grace is no longer grace. + +11:7 What then? What Israel is seeking, it has not obtained, but those who were chosen obtained it, and the rest were hardened; + +11:8 just as it is written, “God gave them a spirit of stupor, Eyes to see not and ears to hear not, Down to this very day.” + +11:9 And David says, “Let their table become a snare and a trap, And a stumbling block and a retribution to them. + +11:10 “Let their eyes be darkened to see not, And bend their backs forever.” + +11:11 I say then, they did not stumble so as to fall, did they? May it never be! But by their transgression salvation has come to the Gentiles, to make them jealous. + +11:12 Now if their transgression is riches for the world and their failure is riches for the Gentiles, how much more will their fulfillment be! + +11:13 But I am speaking to you who are Gentiles. Inasmuch then as I am an apostle of Gentiles, I magnify my ministry, + +11:14 if somehow I might move to jealousy my fellow countrymen and save some of them. + +11:15 For if their rejection is the reconciliation of the world, what will their acceptance be but life from the dead? + +11:16 If the first piece of dough is holy, the lump is also; and if the root is holy, the branches are too. + +11:17 But if some of the branches were broken off, and you, being a wild olive, were grafted in among them and became partaker with them of the rich root of the olive tree, + +11:18 do not be arrogant toward the branches; but if you are arrogant, remember that it is not you who supports the root, but the root supports you. + +11:19 You will say then, “Branches were broken off so that I might be grafted in.” + +11:20 Quite right, they were broken off for their unbelief, but you stand by your faith. Do not be conceited, but fear; + +11:21 for if God did not spare the natural branches, He will not spare you, either. + +11:22 Behold then the kindness and severity of God; to those who fell, severity, but to you, God’s kindness, if you continue in His kindness; otherwise you also will be cut off. + +11:23 And they also, if they do not continue in their unbelief, will be grafted in, for God is able to graft them in again. + +11:24 For if you were cut off from what is by nature a wild olive tree, and were grafted contrary to nature into a cultivated olive tree, how much more will these who are the natural branches be grafted into their own olive tree? + +11:25 For I do not want you, brethren, to be uninformed of this mystery—so that you will not be wise in your own estimation—that a partial hardening has happened to Israel until the fullness of the Gentiles has come in; + +11:26 and so all Israel will be saved; just as it is written, “The Deliverer will come from Zion, He will remove ungodliness from Jacob.” + +11:27 “This is My covenant with them, When I take away their sins.” + +11:28 From the standpoint of the gospel they are enemies for your sake, but from the standpoint of God’s choice they are beloved for the sake of the fathers; + +11:29 for the gifts and the calling of God are irrevocable. + +11:30 For just as you once were disobedient to God, but now have been shown mercy because of their disobedience, + +11:31 so these also now have been disobedient, that because of the mercy shown to you they also may now be shown mercy. + +11:32 For God has shut up all in disobedience so that He may show mercy to all. + +11:33 Oh, the depth of the riches both of the wisdom and knowledge of God! How unsearchable are His judgments and unfathomable His ways! + +11:34 For who has known the mind of the Lord, or who became His counselor? + +11:35 Or who has first given to Him that it might be paid back to him again? + +11:36 For from Him and through Him and to Him are all things. To Him be the glory forever. Amen. + +12:1 Therefore I urge you, brethren, by the mercies of God, to present your bodies a living and holy sacrifice, acceptable to God, which is your spiritual service of worship. + +12:2 And do not be conformed to this world, but be transformed by the renewing of your mind, so that you may prove what the will of God is, that which is good and acceptable and perfect. + +12:3 For through the grace given to me I say to everyone among you not to think more highly of himself than he ought to think; but to think so as to have sound judgment, as God has allotted to each a measure of faith. + +12:4 For just as we have many members in one body and all the members do not have the same function, + +12:5 so we, who are many, are one body in Christ, and individually members one of another. + +12:6 Since we have gifts that differ according to the grace given to us, each of us is to exercise them accordingly: if prophecy, according to the proportion of his faith; + +12:7 if service, in his serving; or he who teaches, in his teaching; + +12:8 or he who exhorts, in his exhortation; he who gives, with liberality; he who leads, with diligence; he who shows mercy, with cheerfulness. + +12:9 Let love be without hypocrisy. Abhor what is evil; cling to what is good. + +12:10 Be devoted to one another in brotherly love; give preference to one another in honor; + +12:11 not lagging behind in diligence, fervent in spirit, serving the Lord; + +12:12 rejoicing in hope, persevering in tribulation, devoted to prayer, + +12:13 contributing to the needs of the saints, practicing hospitality. + +12:14 Bless those who persecute you; bless and do not curse. + +12:15 Rejoice with those who rejoice, and weep with those who weep. + +12:16 Be of the same mind toward one another; do not be haughty in mind, but associate with the lowly. Do not be wise in your own estimation. + +12:17 Never pay back evil for evil to anyone. Respect what is right in the sight of all men. + +12:18 If possible, so far as it depends on you, be at peace with all men. + +12:19 Never take your own revenge, beloved, but leave room for the wrath of God, for it is written, “Vengeance is Mine, I will repay,” says the Lord. + +12:20 “But if your enemy is hungry, feed him, and if he is thirsty, give him a drink; for in so doing you will heap burning coals on his head.” + +12:21 Do not be overcome by evil, but overcome evil with good. + +13:1 Every person is to be in subjection to the governing authorities. For there is no authority except from God, and those which exist are established by God. + +13:2 Therefore whoever resists authority has opposed the ordinance of God; and they who have opposed will receive condemnation upon themselves. + +13:3 For rulers are not a cause of fear for good behavior, but for evil. Do you want to have no fear of authority? Do what is good and you will have praise from the same; + +13:4 for it is a minister of God to you for good. But if you do what is evil, be afraid; for it does not bear the sword for nothing; for it is a minister of God, an avenger who brings wrath on the one who practices evil. + +13:5 Therefore it is necessary to be in subjection, not only because of wrath, but also for conscience’ sake. + +13:6 For because of this you also pay taxes, for rulers are servants of God, devoting themselves to this very thing. + +13:7 Render to all what is due them: tax to whom tax is due; custom to whom custom; fear to whom fear; honor to whom honor. + +13:8 Owe nothing to anyone except to love one another; for he who loves his neighbor has fulfilled the law. + +13:9 For this, “You shall not commit adultery, You shall not murder, You shall not steal, You shall not covet,” and if there is any other commandment, it is summed up in this saying, “You shall love your neighbor as yourself.” + +13:10 Love does no wrong to a neighbor; therefore love is the fulfillment of the law. + +13:11 Do this, knowing the time, that it is already the hour for you to awaken from sleep; for now salvation is nearer to us than when we believed. + +13:12 The night is almost gone, and the day is near. Therefore let us lay aside the deeds of darkness and put on the armor of light. + +13:13 Let us behave properly as in the day, not in carousing and drunkenness, not in sexual promiscuity and sensuality, not in strife and jealousy. + +13:14 But put on the Lord Jesus Christ, and make no provision for the flesh in regard to its lusts. + +14:1 Now accept the one who is weak in faith, but not for the purpose of passing judgment on his opinions. + +14:2 One person has faith that he may eat all things, but he who is weak eats vegetables only. + +14:3 The one who eats is not to regard with contempt the one who does not eat, and the one who does not eat is not to judge the one who eats, for God has accepted him. + +14:4 Who are you to judge the servant of another? To his own master he stands or falls; and he will stand, for the Lord is able to make him stand. + +14:5 One person regards one day above another, another regards every day alike. Each person must be fully convinced in his own mind. + +14:6 He who observes the day, observes it for the Lord, and he who eats, does so for the Lord, for he gives thanks to God; and he who eats not, for the Lord he does not eat, and gives thanks to God. + +14:7 For not one of us lives for himself, and not one dies for himself; + +14:8 for if we live, we live for the Lord, or if we die, we die for the Lord; therefore whether we live or die, we are the Lord’s. + +14:9 For to this end Christ died and lived again, that He might be Lord both of the dead and of the living. + +14:10 But you, why do you judge your brother? Or you again, why do you regard your brother with contempt? For we will all stand before the judgment seat of God. + +14:11 For it is written, “As I live, says the Lord, every knee shall bow to Me, And every tongue shall give praise to God.” + +14:12 So then each one of us will give an account of himself to God. + +14:13 Therefore let us not judge one another anymore, but rather determine this—not to put an obstacle or a stumbling block in a brother’s way. + +14:14 I know and am convinced in the Lord Jesus that nothing is unclean in itself; but to him who thinks anything to be unclean, to him it is unclean. + +14:15 For if because of food your brother is hurt, you are no longer walking according to love. Do not destroy with your food him for whom Christ died. + +14:16 Therefore do not let what is for you a good thing be spoken of as evil; + +14:17 for the kingdom of God is not eating and drinking, but righteousness and peace and joy in the Holy Spirit. + +14:18 For he who in this way serves Christ is acceptable to God and approved by men. + +14:19 So then we pursue the things which make for peace and the building up of one another. + +14:20 Do not tear down the work of God for the sake of food. All things indeed are clean, but they are evil for the man who eats and gives offense. + +14:21 It is good not to eat meat or to drink wine, or to do anything by which your brother stumbles. + +14:22 The faith which you have, have as your own conviction before God. Happy is he who does not condemn himself in what he approves. + +14:23 But he who doubts is condemned if he eats, because his eating is not from faith; and whatever is not from faith is sin. + +15:1 Now we who are strong ought to bear the weaknesses of those without strength and not just please ourselves. + +15:2 Each of us is to please his neighbor for his good, to his edification. + +15:3 For even Christ did not please Himself; but as it is written, “The reproaches of those who reproached You fell on Me.” + +15:4 For whatever was written in earlier times was written for our instruction, so that through perseverance and the encouragement of the Scriptures we might have hope. + +15:5 Now may the God who gives perseverance and encouragement grant you to be of the same mind with one another according to Christ Jesus, + +15:6 so that with one accord you may with one voice glorify the God and Father of our Lord Jesus Christ. + +15:7 Therefore, accept one another, just as Christ also accepted us to the glory of God. + +15:8 For I say that Christ has become a servant to the circumcision on behalf of the truth of God to confirm the promises given to the fathers, + +15:9 and for the Gentiles to glorify God for His mercy; as it is written, “Therefore I will give praise to You among the Gentiles, And I will sing to Your name.” + +15:10 Again he says, “Rejoice, O Gentiles, with His people.” + +15:11 And again, “Praise the Lord all you Gentiles, And let all the peoples praise Him.” + +15:12 Again Isaiah says, “There shall come the root of Jesse, And He who arises to rule over the Gentiles, In Him shall the Gentiles hope.” + +15:13 Now may the God of hope fill you with all joy and peace in believing, so that you will abound in hope by the power of the Holy Spirit. + +15:14 And concerning you, my brethren, I myself also am convinced that you yourselves are full of goodness, filled with all knowledge and able also to admonish one another. + +15:15 But I have written very boldly to you on some points so as to remind you again, because of the grace that was given me from God, + +15:16 to be a minister of Christ Jesus to the Gentiles, ministering as a priest the gospel of God, so that my offering of the Gentiles may become acceptable, sanctified by the Holy Spirit. + +15:17 Therefore in Christ Jesus I have found reason for boasting in things pertaining to God. + +15:18 For I will not presume to speak of anything except what Christ has accomplished through me, resulting in the obedience of the Gentiles by word and deed, + +15:19 in the power of signs and wonders, in the power of the Spirit; so that from Jerusalem and round about as far as Illyricum I have fully preached the gospel of Christ. + +15:20 And thus I aspired to preach the gospel, not where Christ was already named, so that I would not build on another man’s foundation; + +15:21 but as it is written, “They who had no news of Him shall see, And they who have not heard shall understand.” + +15:22 For this reason I have often been prevented from coming to you; + +15:23 but now, with no further place for me in these regions, and since I have had for many years a longing to come to you + +15:24 whenever I go to Spain—for I hope to see you in passing, and to be helped on my way there by you, when I have first enjoyed your company for a while— + +15:25 but now, I am going to Jerusalem serving the saints. + +15:26 For Macedonia and Achaia have been pleased to make a contribution for the poor among the saints in Jerusalem. + +15:27 Yes, they were pleased to do so, and they are indebted to them. For if the Gentiles have shared in their spiritual things, they are indebted to minister to them also in material things. + +15:28 Therefore, when I have finished this, and have put my seal on this fruit of theirs, I will go on by way of you to Spain. + +15:29 I know that when I come to you, I will come in the fullness of the blessing of Christ. + +15:30 Now I urge you, brethren, by our Lord Jesus Christ and by the love of the Spirit, to strive together with me in your prayers to God for me, + +15:31 that I may be rescued from those who are disobedient in Judea, and that my service for Jerusalem may prove acceptable to the saints; + +15:32 so that I may come to you in joy by the will of God and find refreshing rest in your company. + +15:33 Now the God of peace be with you all. Amen. + +16:1 I commend to you our sister Phoebe, who is a servant of the church which is at Cenchrea; + +16:2 that you receive her in the Lord in a manner worthy of the saints, and that you help her in whatever matter she may have need of you; for she herself has also been a helper of many, and of myself as well. + +16:3 Greet Prisca and Aquila, my fellow workers in Christ Jesus, + +16:4 who for my life risked their own necks, to whom not only do I give thanks, but also all the churches of the Gentiles; + +16:5 also greet the church that is in their house. Greet Epaenetus, my beloved, who is the first convert to Christ from Asia. + +16:6 Greet Mary, who has worked hard for you. + +16:7 Greet Andronicus and Junias, my kinsmen and my fellow prisoners, who are outstanding among the apostles, who also were in Christ before me. + +16:8 Greet Ampliatus, my beloved in the Lord. + +16:9 Greet Urbanus, our fellow worker in Christ, and Stachys my beloved. + +16:10 Greet Apelles, the approved in Christ. Greet those who are of the household of Aristobulus. + +16:11 Greet Herodion, my kinsman. Greet those of the household of Narcissus, who are in the Lord. + +16:12 Greet Tryphaena and Tryphosa, workers in the Lord. Greet Persis the beloved, who has worked hard in the Lord. + +16:13 Greet Rufus, a choice man in the Lord, also his mother and mine. + +16:14 Greet Asyncritus, Phlegon, Hermes, Patrobas, Hermas and the brethren with them. + +16:15 Greet Philologus and Julia, Nereus and his sister, and Olympas, and all the saints who are with them. + +16:16 Greet one another with a holy kiss. All the churches of Christ greet you. + +16:17 Now I urge you, brethren, keep your eye on those who cause dissensions and hindrances contrary to the teaching which you learned, and turn away from them. + +16:18 For such men are slaves, not of our Lord Christ but of their own appetites; and by their smooth and flattering speech they deceive the hearts of the unsuspecting. + +16:19 For the report of your obedience has reached to all; therefore I am rejoicing over you, but I want you to be wise in what is good and innocent in what is evil. + +16:20 The God of peace will soon crush Satan under your feet. The grace of our Lord Jesus be with you. + +16:21 Timothy my fellow worker greets you, and so do Lucius and Jason and Sosipater, my kinsmen. + +16:22 I, Tertius, who write this letter, greet you in the Lord. + +16:23 Gaius, host to me and to the whole church, greets you. Erastus, the city treasurer greets you, and Quartus, the brother. + +16:24 The grace of our Lord Jesus Christ be with you all. Amen. + +16:25 Now to Him who is able to establish you according to my gospel and the preaching of Jesus Christ, according to the revelation of the mystery which has been kept secret for long ages past, + +16:26 but now is manifested, and by the Scriptures of the prophets, according to the commandment of the eternal God, has been made known to all the nations, leading to obedience of faith; + +16:27 to the only wise God, through Jesus Christ, be the glory forever. Amen. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Counselor Devotions.md b/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Counselor Devotions.md new file mode 100644 index 0000000..57cbc0f --- /dev/null +++ b/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Counselor Devotions.md @@ -0,0 +1,80 @@ +# Devotion 1 - Galatians 6:1-6 + +1. Context + + 1. Paul writing to the Galatian churches to counter influence of Judaizers + 2. Last section of the book, Paul defending freedom of the gospel of justification by faith + 3. Just described fruits of the Spirit--the power of walking by the Spirit +2. Be Humble + + 1. In dealing with sin (weakness of others), v1 + + 1. Such a picture of the difference between walking by the Spirit and walking under the Law + 2. Caught: catch unawares (not looking for it) + 3. Restore: mend a broken bone + 4. Watch ourselves: we're weak too + 5. More generally: dealing with the weaknesses of others + 2. In bearing one another's burdens, v2 + + 1. In contrast to legalist: bury others under the law to look more righteous by comparison + 2. Under the Spirit: bear each other up by carrying each others burdens together + 3. In our view of ourselves, v3 + + 1. Humble: "not proud or haughty: not arrogant or assertive" + 2. Proud: "having or displaying excessive self-esteem" + 3. Arrogant: "exaggerating or disposed to exaggerate one's own worth or importance often by an overbearing manner" + 4. Humility: having the _right_ view of yourself, not exagerrated + 5. NLT: "If you think you are too important to help someone, you are only fooling yourself. You are not that important." + 4. In examining works, v4-5 + + 1. We examine our OWN works + 2. Bear his own load? Be accountable for our own works + 5. Summary j + +# Devotion 2 - Galatians 6:6-10 + +1. Do good…to your teachers + + 1. Paul teaching them to value their teachers + 2. Application: what you're doing here is worthy of reward in the Lord's eyes +2. Do good…to reap eternal life + + 1. John 17:3 + 2. 1 John 1:2 + 3. We can experience some aspect of eternal life now through: + + 1. Knowing God + 2. Growing in following Christ + 4. Application + + 1. Teaching here (devotions, messages, etc) + 2. Mostly character development, develop the qualities of Christ +3. Do good…with perseverance + + 1. Keeping up this mindset is hard! + 2. The reaping is in God's time, but the promise is there + 3. Maybe not on earth? +4. Do good…with a sense of urgency and priority + + 1. Won't always have time to do these things + + 1. Christ is coming back + 2. We may not always have freedom to run camps + 3. We won't always know these kids + +# Devotion 3 - Galatians 6:11-16 + +Be honest + +1. Be honest…in your outward appearance, even if it means persecution + + 1. Jews causing the persecution (who else would stop persecution after they adopted the law?) + 2. Believers are doing this false teaching (why else would be escaping persecution for Christ's sake?) +2. When we are not being honest + + 1. It's hypocrisy + 2. Boasting in flesh +3. What we can boast in - Christ + + 1. No differences based on outward appearance anymore + 2. It is the inward, new creation that matters \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Counselor Meeting Notes.md b/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Counselor Meeting Notes.md new file mode 100644 index 0000000..ae13da9 --- /dev/null +++ b/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Counselor Meeting Notes.md @@ -0,0 +1,197 @@ +# Monday, 8/6/2018 + +Working ahead on verses is OK. Say them in order, say regular verses before bonus. +Can borrow a Bible, want these kids to want a Bible at the end of camp. +50% chance of rain today. + +Isaac and Joe (Pine) + +- Rough night with boys staying up late +- All have at least some Bible knowledge +- Some vague survey answers--right, but maybe not a deep understanding? +- Colby - wants to hang out with other Christians most at camp, Isaac shared gospel last year, 12 years old. Saved last year? Brody is his brother. +- Third year for Brody, second year for Colby. Have a lot of friends here this week. + +Jon and Josiah (Oak) + +- All go to church +- A lot are young, struggling with filling out survey +- Zach: Jesus is Father, Son and Holy Spirit--might need some explaining +- Josiah Eisenberger - last year he thought was lost, no other notes from last year that he was clear on this + +Anna and Leah (Maple) + +- Brooke - a handful, argues with everything, doesn't want to do anything, wants to know when we're going to end everything. Dad is an atheist, has rejected "untrue" Bible. Mom is not this way. Told Joel at parent-teacher meetings that Brooke has a lot of questions, has a seeking heart, but she definitely marches to a different beat! +- Half of girls are pretty solid, other half were baptism and good works. +- Maddie, professed salvation last year, had good survey answers +- Daisy is here, late arrival + +Jackie and Julie (Birch) + +- Almost all put down "believing in Christ" for "how to get to heaven" +- Dana, Tessa put down other answers -- good works, going to church +- Kaitlyn - never been away from parents this long, hard time sleeping + +One more kid coming today, one more Tuesday. No cancellations yet! + +# Tuesday, 8/7/2018 + +Tonight is hat night at supper. Remind Nathan to announce. Archery class cancelled. Only two registered. McKenna to art class, Brody to sports class. + +Jon and Josiah (Oak) + +- Three guys not sure about relationship with God: Zach, Kael, Brody. Asked what is not right, they were not sure. +- Jackson had conversation with Phil, wants to talk more today +- Zach wants to talk more to Phil too, has not been open to spiritual talks in previous years +- Caleb, wanted to get saved after last night's message, talked to Phil but didn't have much of a conversation with him. + +Joe and Isaac (Pine) + +- Jackson affected by message last night--afraid of dying, not sure if saved, thinks he was but wonders if he's doubting. His mom told him he got saved when he was 4. Still wants to talk to Phil today. +- Devotions went well, actively listening + +Leah and Anna (Maple) + +- Sophia confused about "the Rock" song, went through Matt 7:24 about building on the rock or sand +- Brooke, "why is he making lamb's death so dramatic?" +- Leighanna thought she got saved when 4 +- Madeline thinking about things during messages + +Jackie and Julie (Birch) + +- Tammy talked to Ellie last night before dinner + + - From Christian home + - Prayed when she was 4 and 6 +- Kendra asked about assurance of salvation, never had 1 on 1 at SBL, wants one with Jackie today + +# Wednesday, 8/8/2018 + +Ask for help if you're getting overwhelmed. Be gracious with kids who are trying and still struggling with verses. +Laney getting a visit from mom at free time for about 15 minutes. +Crazy dress-up night for dinner. +Campers need to go to nature center with a staff member. + +Leah and Anna (Maple) + +- Leah gave testimony, all listening. +- Leah travelling tonight +- 3 or 4 girls through entire verse card + +Jackie and Julie (Birch) + +- Not too much for devotions last night--trying to get to bed +- Some tension between them starting to build + +Joe and Isaac (Pine) + +- Isaac did devotions, struggling in thinking about what to say. Jackson saying he was saved yesterday. Ethan professed salvation. Colby thinks he's saved. Nate Mason says he's saved. Others say they are saved. +- Josh very attentive during meeting. Hasn't met with Phil again since or talked to Isaac. Pray he would open. +- Ethan came with Zach and Jackson. Ethan made profession of faith. Ethan professed salvation last year on the last day of camp. Is there an issue of security? +- Another boy (not sure who) wanted to talk with him, maybe Isaiah + +Jon and Josiah (Oak) + +- Some sort of urgency with Kael? Went to bed reading Revelation. Wanted to know what hell was like. Radio turns off around other boys--he stops thinking about spiritual things. +- Titus is leaving today. +- Zach came in and talked with Phil--not saved. Shared John 3:18 with him. + +# Thursday, 8/9/2018 + +Tonight is dress-like-a-friend dinner. 1-on-1s during work time today--try to get a layer deeper. + +Group picture today, announced at lunch. + +Leah and Anna (Maple) + +- Leah talked with Maddie and Sophia, listened to Leah, mini devotion +- Anna shared testimony (related to Saul's conversion that Joel spoke on), girls wanted to share their testimony +- Daisy, aunt told her about breaking more than 2 commandments which is sin and she has to ask to be forgiven. Anna tried to share some verses with her on that +- Leighanna, saved when 4, didn't want to die and mom did a "repeat after me" thing +- Maddie, said last year she was saved, had right testimony, ended with "I think I'm saved" +- Brooke told Joel she got saved two days ago, but it was very unclear +- Tammy spoke with Eleanore, wanted to come talk to Tammy but didn't come, had nice visit though, not too deep +- McKenna, wrote her testimony out and wants to share it tomorrow + +Jackie and Julie (Birch) + +- Good talk with Kendra, asked about assurance, didn't want 1-on-1 because she's saved +- Brooklynn not trying very hard +- Tessa and Caitlyn talked to Tammy, good talk but attitude of girls was a little flippant + +Joe and Isaac (Pine) + +- Good night with devotions +- Jackson, has made profession of faith, gospel is clear, still concerned and worried, Joey talked to him about anchor verses +- Isaiah, talked with Phil last night, solid in faith, but nothing to stand on Scripture-wise. Gave him 1 John, circled some verses +- Will wants to learn, has lots of questions, talking about coming 2nd temple +- Josh still wants to talk with Phil, was feeling sick yesterday + +Jon and Josiah (Oak) + +- Caleb DeSantell, very confused, Josiah not sure where to go with him +- Carter, sure he's saved, wants to learn to be a witness, worried about Caleb, talked with him about Philip and how he was a good witness +- Noah Hunt, reading through New Testament on his own initiative + +# Friday, 8/10/2018 + +Last opportunity for one-on-ones. Finish point tallying, write notes to campers. + +Parents coming to 6:15 meeting tonight, need to make room in observatory. + +Sheers are leaving after Bible lesson: Leon, Eleonore, Theodore. + +Leah and Anna (Maple) + +- Leah - talked to Laney and Joy, questions about assurance. Laney more open. Thinks she is saved. Joy, need 1-on-1 without Laney. +- Devotions - answered some questions from night before. +- McKenna gave testimony that she had written the night before. Got saved this week. Asking lots of questions. What heaven is like, what hell is like? +- Daisy wanted to share testimony again -- was a lot of repetition of what McKenna said. + +Jackie and Julie (Birch) + +- Juli - talked with Brooklyn outside for a long time. Talked about a lot of things, says she is 100% saved. She is very confused and disruptive. +- Jackie - Tessa talked to Tammy, flippant, doesn't seem to matter much. As they talked she got more serious. Could be thinking more about whether she is saved or not. +- Moriah and Grace went and talked to Tammy - Moriah came back and looked up verses that Tammy had given her. Both made professions with Tammy. Moriah was upfront with not being ready. + +Joe and Isaac (Pine) + +- Isaac did devotion based on Phil's message of two lamps +- Nate Mason - not much desire for the Bible after camp last year, usually assured from Scripture, prone to have fearful thoughts, but is comforted by Scripture. +- Joe - talk with Jackson, convinced that the did get saved at camp, not doubting anymore, wants to go home to share the gospel with friends. + +Jon and Josiah (Oak) + +- Good night, good devotions, questions about eternal security +- Zach, why didn't God destroy Satan right away? +- Three thought they could lose their salvation +- Josiah had 1-on-1 with Kael, didn't think blood was applied to his heart, by end of talk he thought he was saved, Wednesday night he told God he was sorry for sin, he is asking and seeking. + +# Saturday, 8/11/2018 + +Next year, week of July 15th. Everyone welcome to return! + +10am game while kids can be pulled in to get their prizes in order. + +Daisy leaving at 9:30 today. + +Kael, Colby and Brody have to leave to pick up somebody, but not until 11:30. + +Latest, need points sheets by 10am. + +Turn off AC after everyone is out of cabins/lodges. + +Front table in main lodge is the lost-and-found table. + +Suggestions for improvement are welcome. + +Prayer request: + +- Good News Club, more outside kids came, going back to it, lots of kids from 4th grade last year did not join Good News Club in 5th grade. Pray for kids to come back. +- Josiah Isenberger, a bit unclear on his testimony, says he was saved last year with Tom. +- Vanessa shared testimony last night, sounded like confirmation was her salvation. Just received first holy communion. Lots of family problems, dad left, was crying while telling her story. +- McKenna, shared testimony with Joel and Phil, seemed solid. Doesn't know where she goes to church? +- Jackson's testimony sounded solid at testimony +- Follow-up for all kids, will the Lord open the door for another camp for older kids? +- Tessa was really crying during Tammy's testimony at campfire and talked to Juli. Has abuse in family, her and Brooklyn sexually abused by grandpa. Says she was saved, referenced talking to Tammy, very clear about it--the cross. +- Brooke Sly's parents, there for part of the meeting last night. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Meal-time devotions.md b/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Meal-time devotions.md new file mode 100644 index 0000000..12cffe4 --- /dev/null +++ b/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Meal-time devotions.md @@ -0,0 +1,83 @@ +Theme: Character of God + +Ideas + +1. Gentleness of God +2. Kindness of God +3. Holiness of God + +God is… + +1. …not a man, Num. 23:19 +2. …a consuming fire, Deut. 4:24 +3. …a compassionate God, Deut. 4:31 +4. …the God of gods, Deut. 10:17 +5. …gracious and compassionate, 2 Chron. 30:9 +6. …a righteous judge, Ps. 7:11 +7. …our refuge and strength, Ps. 46:1 +8. …my helper, Ps. 54:4 +9. …a sun and shield, Ps. 84:11 +10. …faithful, 1 Cor. 1:9 +11. …opposed to the proud, James 4:6 +12. …light, 1 John 1:5 +13. …love, 1 John 4:8 + +# Devotion 1: God is light - 1 John 1:5 + +I want to read a very interesting little verse to you all from a letter by the apostle John. It's in 1 John, chapter 1, verse 5. Here's what it says: + +**1 John 1:5** +**5** This is the message we have heard from Him and announce to you, that God is Light, and in Him there is no darkness at all. + +What does this mean? +We shouldn't look up at the light shining from the sun, or a lamp and say, "Ahhhh, it's God!" No, that's not what John is saying at all. In fact, way back in Genesis, the Bible says God created the light in the first place. So, the light can't be God. That's not what John is trying to say. + +John is using something called a metaphor to help us understand what God is like. For example, if I said, "That Aaron Rodgers, he's a beast on the football field!" You wouldn't really think that I meant that Aaron Rodgers has four legs, a tail and a big fangs! But, you'd probably know that I just meant he was quick and aggressive and strong--just like you might think of some kind of beast. That would be a metaphor to help you understand what Aaron Rodgers is like. + +So, what is John trying to say about God when he uses this metaphor, "God is light"? + +Well, I don't know if you knew this, but did you know that without light we wouldn't know what anything at all ever looked like? That's right. Light shoots out from the sun, or a flashlight or a lamp and bounces of off things (like that chair) and flies right into your eyeballs so you can see what things look like! Just think if that didn't happen--if you couldn't see anything. You would be constantly running into things, stubbing your toes, tripping over stuff--it would be terribly painful. But more than that, you'd never know how pretty things are--you wouldn't know what colors look like or how wonder the sky looks during a sunset, or how beautiful the clouds can be. You wouldn't be able to hit a baseball or shoot a basket or catch a football or paint or draw or build anything. + +Light makes so many wonderful things possible because it shows us where things are and what things look like. + +And that's why I think John is comparing God to light. God is like light in that the more we get to know who God is, the more we know about what the world really looks like, the more we know how wonderful it is, the more we know what's good and what's bad, what's beautiful and what's ugly. + +If you pay close attention this week, you're going to be learning a lot of things about God. Each little bit more you learn about God is like opening your eyes a little wider to let a little more light in to see the world how it really is. + +If you listen closely this week, you'll see very clearly how wonderful God really is. But you'll also see how much you and I need to be saved by God. You ignore this truth if you want, but that would be like keeping your eyes tightly shut and stumbling around in the darkness. "God is light"--let's open our eyes and see things the way God wants us to! + +# Devotion 2: God is love - 1 John 4:8 + +Do you remember how I talked about a little verse that apostle John wrote in one of his letters about how God is light? Well, I found another very interesting little verse in the same letter. Here it is. It's in 1 John, chapter 4, verse 8: + +**1 John 4:8** +**8** The one who does not love does not know God, for God is love. + +There's another metaphor, like we talked about way back on Monday. Now John is saying that God is love. When John said "God is light", it seems like he was trying to tell us something about God by comparing Him to light. So what is John saying this time? + +There's a lot of talk out there about love, isn't there? We've all read a book or seen a movie or a TV show where somebody falls in love with someone else. Maybe you've even had someone try to tell you what love really is. "Real love", they say, is "doing this" or "saying that" or "feeling another thing". + +We all want to be loved, don't we? I think so. So, should we believe all these things we hear about what love is and try to go find them? + +Well, here's what God says about love: "Greater love has no one than this, that one lay down his life for his friends". Do you know what it means to lay down your life? It means you'd be ready to even die to save someone else. God says, there is no greater love that kind of love. + +Did you know that's exactly the kind of love that Jesus has for you? He died on the cross to save you because He loves you. + +That's what John means with this metaphor. If we want to know what it truly means to be loved and if we want to know what love really looks like, we only need to look at what God has done for us. + +You can choose to ignore that love, if you want. But if you do, you're missing out on experiencing the greatest love that has ever been shown to any man--the love of God for you. + +# Devotion 3: God is opposed to the proud - James 4:6 + +**James 4:6–8** +**6** But He gives a greater grace. Therefore _it_ says, “God is opposed to the proud, but gives grace to the humble.” +**7** Submit therefore to God. Resist the devil and he will flee from you. +**8** Draw near to God and He will draw near to you. Cleanse your hands, you sinners; and purify your hearts, you double-minded. + +This verse really says something about whose side God is on. It says that God is against those who are proud. He's on the side of those who are humble. + +So what does it mean to be proud? Is it possible that you are proud? You might think of someone who is proud as someone with their nose up in the air. They think really highly of themselves--they're the best at everything and they "know" it. + +How do you think someone who is proud would react when God tells them that they are not the best, they are not even almost the best, but they are sinners who need a savior? I guess they probably wouldn't believe it, would they? + +You can leave camp today being proud or being humble. Depending on how you leave, God will either be opposed to you or be giving grace to you. I plead with you to go in humility, having trusted Christ as your savior, abandoning your pride, receiving grace from the Father. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Testimony.md b/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Testimony.md new file mode 100644 index 0000000..c9d985f --- /dev/null +++ b/OneNote/Ben's Notebook/Camps/Good News Camp 2018/Testimony.md @@ -0,0 +1,3 @@ +Saved when I was 5 years old +Maybe some of you from Christian homes feel the same way. +…verse… \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Camps/Good News Camp 2019/Preparation.md b/OneNote/Ben's Notebook/Camps/Good News Camp 2019/Preparation.md new file mode 100644 index 0000000..13fcbbf --- /dev/null +++ b/OneNote/Ben's Notebook/Camps/Good News Camp 2019/Preparation.md @@ -0,0 +1 @@ +- [ ] Become life guard certified \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/1113 Announcements.md b/OneNote/Ben's Notebook/Chapel/1113 Announcements.md new file mode 100644 index 0000000..706d948 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/1113 Announcements.md @@ -0,0 +1,11 @@ +* Speaker this Sunday – Charlie Fizer +* Speaker next Sunday – Nick Weaver +* There will be a potluck meal downstairs immediately following this meeting. +* Pathways kid’s club will meet on Wednesday evening starting at 5:30. Contact Grayson or Amy Price for details +* The Wednesday night prayer meeting will be at the chapel starting at 7:00. It will be available over Zoom. +* There will be a Christmas party at the Steve Price home on Friday, December 2 starting at 7:00. +* There will be a Christmas concert and cookies outreach at the chapel on Sunday evening, December 11. Contact Travis or Joanna Robertson for details. +* If you would like to review the new Anthem Song Book for possible use +by the chapel, contact Ken Keane. + +- No young people’s bible study today \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/1120 announcements.md b/OneNote/Ben's Notebook/Chapel/1120 announcements.md new file mode 100644 index 0000000..eb94e0b --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/1120 announcements.md @@ -0,0 +1,4 @@ +- [ ] * Speaker this Sunday – Nick Weaver * Speaker next Sunday – Steve Price * Pathways kid’s club will not meet this Wednesday evening, 11/23. Pathways kids club will resume on 11/30. * The Wednesday night prayer meeting will be Zoom only this week starting at 7:00. There will not be a prayer meeting at the chapel building.. * There will be a Christmas party at the Steve Price home on Friday, December 2 starting at 7:00. * There will be a Christmas concert and cookies outreach at the chapel on Sunday evening, December 11. Contact Travis or Joanna Robertson for details. * If you would like to review the new Anthem Song Book for possible use by the chapel, contact Ken Keane. +- [ ] Men’s breakfast, doing yard cleanup too +- [ ] Christmas program at the chapel on 18th, planning roles, I’d you know you’re not going to be here, let Anne-Marie or tisara know +- [ ] Jan 8th potluck, after will pack homeless kits, all invited to pack them and contribute, will have list of stuff you can supply \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/116 announcements.md b/OneNote/Ben's Notebook/Chapel/116 announcements.md new file mode 100644 index 0000000..44ba8d2 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/116 announcements.md @@ -0,0 +1,12 @@ +- Speaker this Sunday – Pete Youngberg +- Speaker next Sunday – Charlie Fizer +- There will be a potluck meal at the chapel next Sunday, November 13. Contact Anna Bouchie for details. +- Pathways kid’s club will meet on Wednesday evening starting at 5:30. Contact Grayson or Amy Price for details. Call on Grayson for additional announcement +- The Wednesday night prayer meeting will be at the chapel starting at 7:00. It will be available over Zoom. +- There will be a men’s meeting this Thursday, November 10, starting at 7:00. Zoom only. +- Next mens breakfast on December 3rd +- A CMML Youth Challenge is planned at the chapel on Friday evening, November 11. Contact Travis Robertson or Ken Keane for details. +- If you would like to review the new Anthem Song Book for possible use by the chapel, contact Ken Keane. +- Cards for Antonio on the foyer table +- Women’s prayer partners, new this week, drop or join let Anne Marie know +- Women’s retreat, March 31st-April 2nd, sign up in new year, flyer to come \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 1.md b/OneNote/Ben's Notebook/Chapel/Announcements 1.md new file mode 100644 index 0000000..7bb1536 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 1.md @@ -0,0 +1,8 @@ +- Speaker this Sunday – Carl Holden +- Speaker next Sunday – Alfred Lutengya +- Ken Keane, melanoma surgery moved to Friday +- Cancelled! Young People’s Bible Study at the Bouchie’s this evening. Still Come at 4:00 for games and a cook out!. Check with Steve or Anna Bouchie for details. +- The Wednesday night prayer meeting will be at the chapel starting at 7:00. It will be available over Zoom. Our special speaker will be Ibrahim from Jordan. There will be a chapel pot luck dinner before the meeting starting at 6:00. Contact Anna Bouchie for details. +- Next Sunday there will be a recognition of graduates between meetings. +- Luke Wortman: Tuesday may 24th, 7pm, young people, guys from Galilee program with instruments, hymn and worship night, at the chapel +- Todd Ericson has announcement \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 1102021.md b/OneNote/Ben's Notebook/Chapel/Announcements 1102021.md new file mode 100644 index 0000000..2d67310 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 1102021.md @@ -0,0 +1,9 @@ +- [ ] Kosei speaking today +- [ ] Alfred speaking next week +- [ ] Prayer meeting Wed.@7pm, zoom only +- [ ] Mens business meeting, Thurs.@7pm all men welcome, zoom only +- [ ] Calendars still available? +- [ ] Mercy Samuel Tuesday night, leaving India +- [ ] Milly Bouchie is 11 today +- [ ] Gus and Tina expecting +- [ ] Chris and Lydia expecting \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 1172021.md b/OneNote/Ben's Notebook/Chapel/Announcements 1172021.md new file mode 100644 index 0000000..4ca3f2f --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 1172021.md @@ -0,0 +1,3 @@ +- [ ] Alfred speaking today +- [ ] Steve Robertson speaking next week +- [ ] Prayer meeting Wed.@7pm, zoom only \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 12112022.md b/OneNote/Ben's Notebook/Chapel/Announcements 12112022.md new file mode 100644 index 0000000..9d9580e --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 12112022.md @@ -0,0 +1,10 @@ +- [ ] * Speaker this Sunday – Steve Price +- [ ] * There will be a Christmas concert and cookies outreach at the chapel tonight starting at 7:00 pm. Contact Travis or Joanna Robertson for details.park in the back if you can to leave room for guests +- [ ] * There will not be a young people’s Bible Study tonight. The study will resume after the first of the year. +- [ ] * Pathways kid’s club will have its final meeting of the year this Wednesday starting at 5:30. Contact Grayson or Amy Price for details. +- [ ] * The Wednesday night prayer meeting will be at the chapel this Wednesday starting at 7:00. It will be available over Zoom. Steve Price will speak. +- [ ] * There will be a Christmas program at the chapel next Sunday morning, December 18, during the family Bible Hour time. Contact Mathew Joy or Anne-Marie Gaynier for details. +- [ ] * A traditional potluck meal will follow the Christmas program next Sunday. Contact An Bouchie for details. +- [ ] * The next Discipleship Weekend will be on Saturday, January 28, with John Heller and Steve Price. +- [ ] * If you would like to review the new Anthem Song Hymnal for possible use by the chapel, contact Ken Keane. +- [ ] * If you would be interested in serving on a chapel safety committee, contact Todd Ericson. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 12172022.md b/OneNote/Ben's Notebook/Chapel/Announcements 12172022.md new file mode 100644 index 0000000..0f98a04 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 12172022.md @@ -0,0 +1,9 @@ +- There will be a Christmas program today during the Family Bible Hour time. +- There will be a traditional potluck meal downstairs immediately following today’s Christmas program.. +- There will not be a young people’s Bible Study tonight. The study will resume after the first of the year. +- There will not be a Pathways kid’s club this week. The club will resume after the first of the year. +- Next Sunday (Christmas day) there will be a Lord’s Supper meeting at the chapel starting at 9:00. No other meetings are planned for next Sunday. The Lord’s Supper meeting will be available over Zoom. +- The next Discipleship Weekend will be on Saturday, January 28, with John Heller and Steve Price. +- If you would like to review the new Anthem Song Hymnal for possible use by the chapel, contact Ken Keane. +- If you would be interested in serving on a chapel safety committee, contact Pete Youngberg. +- Pete: announcement about next Wednesday evening. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 12232023.md b/OneNote/Ben's Notebook/Chapel/Announcements 12232023.md new file mode 100644 index 0000000..d50f4de --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 12232023.md @@ -0,0 +1,8 @@ +- [ ] The speaker for today is Steve Price. +- [ ] The speaker next Sunday will be Steve Price. +- [ ] The weekly prayer meeting will be at the chapel this Wednesday starting at 7:00. It will be available over Zoom. +- [ ] Steve Robertson's Memorial Service will be held at the chapel next Sunday, December 31st, at 1:30, after a potluck lunch. There will be a dessert buffet after the service. Sign-up sheet for potluck is on the back door. +- [ ] Discipleship weekend with John Heller will be Saturday, Jan 27. +- [ ] The chapel will host a spring conference with David Dunlap, March 12-17 (Wed-Sun). Details later. +- [ ] Middle school and 1st & 2nd grade will be upstairs +- [ ] Calendars in the back \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 12312023.md b/OneNote/Ben's Notebook/Chapel/Announcements 12312023.md new file mode 100644 index 0000000..45d3fea --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 12312023.md @@ -0,0 +1,7 @@ +- The speaker for today is Steve Price. +- The speaker next Sunday will be Sam Pinto. +- Steve Robertson's Memorial Service will be held at the chapel today following this meeting. There will be a potluck lunch downstairs, followed by the service at 1:30.  Then there will be a dessert buffet after the service. +- The weekly prayer meeting will be at the chapel this Wednesday starting at 7:00.  It will be available over Zoom. +- The monthly men’s breakfast will be held at the chapel this Saturday, January 6, starting at 8:00. Contact Brandon Stafford or Todd Ericson for details. +- Discipleship weekend with John Heller will be Saturday, Jan 27. +- The chapel will host a spring conference with David Dunlap, March 12-17 (Wed-Sun). Details later. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 1242021.md b/OneNote/Ben's Notebook/Chapel/Announcements 1242021.md new file mode 100644 index 0000000..57d9b38 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 1242021.md @@ -0,0 +1,5 @@ +- [ ] Steve Robertson speaks today. +- [ ] John Heller speaks next Sunday. +- [ ] Prayer meeting, Wed. @ 7:00 and is Zoom only. +- [ ] Weekly meetings for Junior High and Senior High will start on Friday, February 5 at 7:00. The meetings will be over Zoom. Contact Todd Ericson or Kevin Hoesch for details. More information will be sent out later. +- [ ] Travis and Joanna engaged and wedding on 4/3/21 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 12422.md b/OneNote/Ben's Notebook/Chapel/Announcements 12422.md new file mode 100644 index 0000000..e9c1c21 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 12422.md @@ -0,0 +1,13 @@ +* Speaker this Sunday – Steve Price +* Speaker next Sunday – Steve Price +* young people’s Bible Study Sunday night.today is last one of the year. +* Pathways kid’s club will meet this Wednesday starting at 5:30. Contact Grayson or Amy Price for details. +* The Wednesday night prayer meeting will be at the chapel this Wednesday starting at 7:00. It will be available over Zoom. Steve Price will speak. +* The monthly men’s business meeting will be this Thursday, December 8. Zoom only. +* There will be a Christmas concert and cookies outreach at the chapel on Sunday evening, December 11, starting at 7:00 pm. Contact Travis or Joanna Robertson for details. +* There will be a Christmas program at the chapel on Sunday morning, December 18, during the family Bible Hour time. Contact Mathew Joy or Anne-Marie Gaynier for details. +* The next Discipleship Weekend will be on Saturday, January 28, with John Heller and Steve Price. +* If you would like to review the new Anthem Song Hymnal for possible use by the chapel, contact Ken Keane. + +- John and Gheta traveling for the next four weeks, one in Phoenix, three in India +- Calendars from Ken Keane available in the back \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 1312021.md b/OneNote/Ben's Notebook/Chapel/Announcements 1312021.md new file mode 100644 index 0000000..f2dca7b --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 1312021.md @@ -0,0 +1,5 @@ +- [ ] John Heller will be the speaker tomorrow. +- [ ] Nick Weaver will speak next Sunday. +- [ ] The Wednesday evening prayer meeting will start at 7:00, Zoom only. +- [ ] The weekly junior high and high school "Sunday School" will meet over Zoom starting at 8:00 pm this Friday. Contact Todd Ericson or Kevin Hoesch for details. +Sat. 9pm Wendy schultz, ladies' meeting \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 132021.md b/OneNote/Ben's Notebook/Chapel/Announcements 132021.md new file mode 100644 index 0000000..5fbdc12 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 132021.md @@ -0,0 +1,6 @@ +- [ ] Sam Pinto speaking this week +- [ ] Prayer meeting, no in person meeting +- [ ] Kosei Miwata speaking next week +- [ ] Calendars available at the back of the chapel +- [ ] Travis and Joanna engaged +- [ ] Bridal shower on sat. 1/9 for Caroline Stange \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 2.md b/OneNote/Ben's Notebook/Chapel/Announcements 2.md new file mode 100644 index 0000000..e4b0bc2 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 2.md @@ -0,0 +1,6 @@ +- Speaker this Sunday – Ben Ramey +- Speaker next Sunday – Nick Weaver +- The Wednesday night prayer meeting will be at the chapel starting at 7:00. It will be available over Zoom. +- This month’s men’s business meeting will be this Thursday, July 21, starting at 7:00 pm. Zoom only. +- Kent & Jenny Schaefer, going back to Mozambique, paperwork needed, tickets for Sept 4th +- Game night at chapel on 30th, 6:30pm, bring snacks, board games, might be water games \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 2142021.md b/OneNote/Ben's Notebook/Chapel/Announcements 2142021.md new file mode 100644 index 0000000..f9f055e --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 2142021.md @@ -0,0 +1,5 @@ +- [ ] The speaker this Sunday is Mark Lightfoot. Because of travel road conditions he will be joining us today by Zoom. +- [ ] The speaker next Sunday will be Ben Ramey. +- [ ] The young people's Bible study will continue this Sunday evening starting at 6:45. It will be at Steve and Janet Price's house. +- [ ] The Wednesday prayer meeting this week will start at 7:00. Zoom only. +- [ ] The Jr/Sr High Sunday School meeting will be on Friday starting at 8:pm. Zoom only. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 2282021.md b/OneNote/Ben's Notebook/Chapel/Announcements 2282021.md new file mode 100644 index 0000000..6b6194e --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 2282021.md @@ -0,0 +1,5 @@ +- [ ] The speaker this Sunday is Steve Price. +- [ ] Next Sunday the speaker will be Sam Pinto. +- [ ] The Young People's Bible Study will be tonight at the Steve Price home starting at 6:45. It will be available over Zoom. +- [ ] The Wednesday evening prayer meeting at the chapel will start at 7:00. The speaker will be Kent Schafer from Mozambique. Nate Bramsen will also be at the meeting.The meeting will also be available over Zoom. +- [ ] The Jr/Sr High Sunday School class will be on Friday starting at 8:00 over Zoom. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 2721.md b/OneNote/Ben's Notebook/Chapel/Announcements 2721.md new file mode 100644 index 0000000..8374160 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 2721.md @@ -0,0 +1,6 @@ +- [ ] The speaker this Sunday will be Nick Weaver. +- [ ] The speaker next Sunday will be Mark Lightfoot. +- [ ] The Wednesday evening prayer meeting will start at 7:00. Zoom only. +- [ ] There will be a men's meeting Thursday evening starting at 7:00. Zoom only. +- [ ] The Jr & Sr high Sunday school meeting will be Friday evening starting at 8:00. Zoom only. +- [ ] Young people's Bible study next Sunday, tbd location \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 3.md b/OneNote/Ben's Notebook/Chapel/Announcements 3.md new file mode 100644 index 0000000..3fd0780 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 3.md @@ -0,0 +1,12 @@ +- Speaker this Sunday – Andrew Hawkinson +- Speaker next Sunday – Carl Holden +- There will be a pot luck meal at the chapel today following the last meeting. + + - Need young men to move tables and chairs outside for picnic + - Move picnic tables to grass + - Seating will be available outside and inside +- The Wednesday night prayer meeting will be at the chapel starting at 7:00. It will be available over Zoom. +- There is a Sunday School room renovation project going on downstairs from now until September 11. If you are a Sunday school teacher, please see that class materials are put in tubs and stored during the renovation. +- Kevin Hoesch: need more Sunday school teachers +- From Anne-Marie: sign-up for women's prayer partner is posted on the auditorium doors, please sign up before the picnic which is after meeting, Prayer for August will be sent out this week +- Noah: Noah and Liz having a girl! Due Nov 3 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 4.md b/OneNote/Ben's Notebook/Chapel/Announcements 4.md new file mode 100644 index 0000000..283df37 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 4.md @@ -0,0 +1,6 @@ +- Speaker this Sunday – Carl Holden +- Speaker next Sunday – Pete Youngberg +- The Wednesday night prayer meeting will be at the chapel starting at 7:00. It will be available over Zoom. +- There will be a men’s meeting on Thursday starting at 7:00. Zoom only. +- There is a Sunday School room renovation project going on downstairs from now until September 11. The downstairs will not be available for chapel activities until then. Please keep little children away from the downstairs. +- Little children should stay out of construction \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements 5.md b/OneNote/Ben's Notebook/Chapel/Announcements 5.md new file mode 100644 index 0000000..c952c20 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements 5.md @@ -0,0 +1,9 @@ +* Speaker this Sunday – Nick Weaver +* Speaker next Sunday – Matt Hebert +* The Wednesday night prayer meeting will be at the chapel starting at 7:00. It will be available over Zoom. +* An all-day discipleship meeting is planned for Saturday, September 10. Details will be announced later. +* There is a Sunday School room renovation project going on downstairs from now until September 10. The downstairs will not be available for chapel activities until then. Please keep little children away from the downstairs. + +Lawrence your group + +Grayson and Amy Price would like to invite anyone who helped with the VBS AND anyone who would like to help with Pathways this fall to a dinner at their house on Saturday, August 27th at 6:00. This dinner is both a thank you and a preparation for the Fall pathways program! Reach out to Grayson or Amy if you have questions. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements, 2212021.md b/OneNote/Ben's Notebook/Chapel/Announcements, 2212021.md new file mode 100644 index 0000000..9e5c6ac --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements, 2212021.md @@ -0,0 +1,7 @@ +- [ ] Stuff from Jerry Simmons downstairs +- [ ] The speaker this Sunday is Ben Ramey. +- [ ] The speaker next Sunday will be Steve Price. +- [ ] The chapel WILL be open this Wednesday for the prayer meeting starting at 7:00. +- [ ] The young people's Bible study will continue this evening. 6:45pm at Thomas and Jackie's +- [ ] The Jr/Sr High Sunday school meeting will be this Friday starting at 8:00. Zoom only. +- [ ] The Midwest Shepherds Conference will be this Saturday at the Lawrence Bible Chapel starting at 9:00. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Announcements.md b/OneNote/Ben's Notebook/Chapel/Announcements.md new file mode 100644 index 0000000..86fa6ad --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Announcements.md @@ -0,0 +1,7 @@ +- Speaker this Sunday – Pete Youngberg +- Speaker next Sunday – Nick Weaver +- The Wednesday night prayer meeting will be at the chapel starting at 7:00. It will be available over Zoom. + Matt Hebert will be visiting speaker +- There is a Sunday School room renovation project going on downstairs from now until September 11. The downstairs will not be available for chapel activities until then. Please keep little children away from the downstairs. +- Noah's last Sunday is today 🙁, get together for men 14 and older at Holden's on Tuesday (8/16) at 6pm-9:30pm +- David is home! \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Anthem song book review.md b/OneNote/Ben's Notebook/Chapel/Anthem song book review.md new file mode 100644 index 0000000..c2c5768 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Anthem song book review.md @@ -0,0 +1,12 @@ +Notes from reading he feedback: + +- Most of the "for it" feedback was shallow, short and without any support other than "I like it" or "it's the best" +- Some of the negative feedback was shallow too, many were thoughtful and respectful +- The one long review from June 14, 2023 was one of the most balanced and thoughtful and was in favor of using the book +- The most energetic responses were against replacing the red and black hymn books, even if we did also purchase the Anthem song books +- None of the reviews included biblical evaluations of what worship or music is supposed to be +- Many seemed in favor of using the song book without purchasing for each row +- I think teaching on worship and music is needed at the chapel +- I agree that we cannot chase down the lives of everyone who has written a song to evaluate them for sinlessness. On the other hand, if, without any effort, we already know of the horrible sins of some of the song writers, I think we should carefully consider whether we'll sing those songs or not. "Negligible" royalty fees add up to enriching such authors and throwing our portion to them seems unwise. +- I agree with one reviewer who asked to understand the reasons behind the desire to switch. Personally, I don't know what those reasons are either and I think they should be carefully understood before considering switching. +- Considering only people's feelings for the moment: I think we'd do the _most_ injury if we replaced the current books with the new one completely. Almost everyone appears to be onboard with incorporating songs from Anthem without purchasing them for every row and replacing the current hymnals. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Board meeting meetings 3182021.md b/OneNote/Ben's Notebook/Chapel/Board meeting meetings 3182021.md new file mode 100644 index 0000000..9916898 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Board meeting meetings 3182021.md @@ -0,0 +1,114 @@ +Board of Directors Meeting, March 18th, 2021 + +The regular annual meeting of the Bible Chapel of Shawnee Board of Directors was called to order by President Steve Robertson. Present were Robert Rockhold, Steve Robertson, Todd Ericson, Ron Spragg, Ben Ramey and Pete Youngberg. + +Minutes + +Ron Spragg opened in prayer. + +The 2020 chapel board meeting minutes were read and approved with only minor typo corrections. + +REPORTS + +Treasurer’s Report + +Bob Rockhold presented the treasurer’s report for 2020. This included the following reports. + +1. The monthly financial report showing income, disbursements and fund balances from December 2020 +2. A comparison of total expenses by category from 2019 and 2020 +3. A categorization by "internal" versus "outreach" of all expenses from 2020 + +There were no disbursements from the CD Redemption Fund after May 2020. In total $276.02 was disbursed from the fund in 2020. + +CD Redemption Fund Disbursements by year: +2018 air condition, sound equipment, shutters +2019 chairs and carpet +2020 nothing + +Treasurer's report was approved. + +Fire Inspector's Report + +2020 there was no fire inspection due to COVID-19 issue and sparse usage of the building. Ron Spragg responded to a few questions and the fire department sent us an approved report for 2020. + +Insurance Report + +Insurance company notified us of increased theft of copper and catalytic converters. This was addressed in the men's meeting. + +OLD BUSINESS + +Chapel Security Team + +COVID-19 changed plans since meetings at the chapel were canceled. The first meeting will be planned this year with Chris Jozwick, Ben Ramey, Diane Youngberg and Karen Price. + +Backup Treasurer + +Bob has not been meeting with Noah Price because of COVID-19 restrictions. Noah is unsure of where he will end up with school and job and should not be relied on to take the position. Christian and Noah would meet together with Bob. Christian has a business degree and may be a better option. Gilma Rodriguez and Meyung Gwun are both accountants, but may not be interested. + +The board will continue to review this year-to-year until a long-term solution is found. + +Chapel Internet Connection + +The WiFi password is still kept private. For remote meetings, the chapel purchased a Zoom license for three individuals that are used across various meetings for the chapel. + +Chapel Security System + +Charles Stange installed the security system in 2020, including a video camera on the exterior, facing the front door. + +Chapel Basement Remodel + +Some improvements were done during 2020 by Ron Spragg and Steve Bouchie. A private area (extending the partition) in the nursery, including a door. Added some air ducts. + +The previous plan to more extensively remodel the basement was put on hold due to COVID-19 and meeting remotely. + +New Hymnals + +Several hymnals were repaired for use with Vessels of Honor. Since VoH was remote last year, these repaired hymnals were used at the chapel and no new purchases were made. + +NEW BUSINESS + +COVID-19 Response +Until now and going forward we have and will follow Johnson County guidelines. Todd Ericson has discussed seating arrangements since more people are coming to the meeting. Spacing out chairs and using every row. Two sides to chapel: one for social distancing, one with no social distancing and people could choose where to sit. + +Expenses for masks at the chapel and special bread and wine cups are minimal. In general, expenses were down from the year before due to spare building usage, camps being canceled, etc. + +Chapel Van +Considering selling the van and renting a van when we need it which the men's business meeting will decide. + +Offering Box +Cash offerings greatly dropped from 2019 to 2020. This is most likely due to remote meetings, and fewer people being at the chapel as well and a decline in attendance from groups at the chapel most likely to give with cash. + +Increasingly Hostile Cultural Environment +A couple of years ago we put in protections regarding being asked to perform gay weddings. + +Should a church attorney be hired to review our bylaws. Assembly Care Ministries reviewed our bylaws in 2016 with lawyers present. This could be renewed. Pete will follow-up with ACM. + +Motion to have Pete run bylaws through ACM was approved. + +ELECTION OF BOARD MEMBERS + +Robert Rockhold was re-elected to the board for a three-year term, expiring in 2024. +Todd Ericson was re-elected to the board for a three-year term, expiring in 2024. +Pete Youngberg was re-elected to the board for a three-year term, expiring in 2024. + +Steve Robertson 3 years 2022 +Ben Ramey 3 years 2022 +Ron Spragg 3 years 2023 +Robert Rockhold 3 years 2024 +Todd Ericson 3 years 2024 +Pete Youngberg 3 years 2024 + +ELECTION OF OFFICERS + +Officers were elected to serve until the next annual board meeting. + +Steve Robertson was re-elected as president of the board. +Todd Ericson was re-elected as vice-president of the board. +Bob Rockhold was re-elected as treasurer of the board. +Ben Ramey was re-elected as secretary of the board. + +CLOSING + +Todd Ericson closed in prayer. + +The meeting was adjourned. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Chapel announced 1232023.md b/OneNote/Ben's Notebook/Chapel/Chapel announced 1232023.md new file mode 100644 index 0000000..c0f76f4 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Chapel announced 1232023.md @@ -0,0 +1,6 @@ +- [ ] The speaker for today is Steve Price +- [ ] The speaker for next Sunday will be Steve Price. +- [ ] The Christmas Cookie Concert will be held at the chapel tonight starting at 7:00. All are invited. Contact Ken Keane for details. Luanne needs help downstairs after meeting to get ready for concert +- [ ] Pathways will meet this Wednesday starting at 5:30. Contact Grayson or Amy Price for details. Christmas store is week after Wednesday. Still taking donations. Could use wrapping volunteers. +- [ ] The weekly prayer meeting will be at the chapel this Wednesday starting at 7:00. It will be available over Zoom. +- [ ] The annual Christmas gathering will be at Steve and Janet Price’s house next Friday, December 8, starting at 7:00. All are invited. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Chapel announcements 11122023.md b/OneNote/Ben's Notebook/Chapel/Chapel announcements 11122023.md new file mode 100644 index 0000000..ff08147 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Chapel announcements 11122023.md @@ -0,0 +1,7 @@ +- The speaker for today is Charlie Fizer. +- The speaker for next Sunday will be Alfred Lutengya. +- There will be a chapel potluck meal today immediately following the Family Bible Hour. All are invited. +- The young people’s Bible study will meet this evening at 6:45, location to be announced. +- Pathways will meet this Wednesday starting at 5:30. Contact Grayson or Amy Price for details. +- The weekly prayer meeting will be at the chapel this Wednesday starting at 7:00. It will be available over Zoom. +- There is a sign up sheet on the door for bringing Christmas cookies for the concert outreach December 3. If you have any questions contact LuAnn Keane \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Elders meeting 10142023.md b/OneNote/Ben's Notebook/Chapel/Elders meeting 10142023.md new file mode 100644 index 0000000..9d34a52 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Elders meeting 10142023.md @@ -0,0 +1,26 @@ +Questions from Benjamin Washikala + +- Purpose of questions was to give feedback to brothers in the Congo and a conference there +- There are commandments, principals and examples. It's good to keep these distinguished and clear. + +No one has had significant feedback about the Anthem hymn book + +Plan on meeting Sheryl Knapp at some point too + +Christian Price is taking over the background checks from Pete. Steve Price reviews them and then they are filed in the safe deposit box + +Matt Bell, may not be permanent, looking to help his boys, so may follow them to wherever they want + +Steve Bouchie, interested in having a Galilee-like program here at the chapel + +Have Dave Dunlop come and do conference on dispensations? +Help with Biblical interpretation +Prepare our kids +Reformed teaching dominating out in the world +Start by asking David if he's available + +Paul Rabidot +Regional elders and shepherds conference +Topic is mental health, we should try to host + +Congolese meeting at the chapel \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Elders meeting 10282023.md b/OneNote/Ben's Notebook/Chapel/Elders meeting 10282023.md new file mode 100644 index 0000000..ffc9f3a --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Elders meeting 10282023.md @@ -0,0 +1,19 @@ +Fall Fest + +- Somebody emailed Grayson that they won't be involved because it's indoors +- Seems the concern was Halloween costumes in the "sanctuary" +- The person (don't know who) has decided to be discreet, if rumors started or the person brought it back to the elders or was going to leave because of this, then the elders might address is directly + +Thethe, girl from minnesota + +- She is not coming, nothing further to do + +Pete has been handling to background checks, transitioning it to Christian, will take a few months to transition fully + +Evelyn and Ian changing their phone number + +Steve Bouchie's desire to do discipleship stuff + +- What do we already have going on? +- We have a lot going on: calendar is full +- Nick is doing Sunday evening discipleship, Sam Thomas is going and has been a real help \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Elders meeting 7292023.md b/OneNote/Ben's Notebook/Chapel/Elders meeting 7292023.md new file mode 100644 index 0000000..8f83b88 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Elders meeting 7292023.md @@ -0,0 +1,31 @@ +Visitation needed, especially for some who have been coming regularly and shown interest in staying and attending regularly. + +What do the elders cover? + +- Hearing testimonies of the individuals +- In the past, Steve and Carl would review the history of the chapel, coming out of having no elders, meeting the challenges that came out of that. That may no longer be necessary as an introductory thing with new people--it's not as relevant anymore, nor as recent. +- Discuss fellowship, it's concepts + + - Hebrews 13:17 - responsibility on both sides (leaders and flock) + - Differentiate between membership and fellowship + - Back of our directory has some clarifying thoughts regarding this +- Discuss how we meet, if they're attending, they're seeing it + + - Elder-led + - Variety of teachers + - Give clarity, opportunity for questions +- Discuss some doctrine, or "hot topics" + + - "We are no a homeschool church"--sometimes clarifications like that are necessary + - We are not a group of hot-topics we congregate around + - We don't "push" certain things from the pulpit because our singular focus is on Christ + +Who do the elders need to visit? + +- Gabriela and Michael +- Miguel and Sheila +- Sheryl Knapp (Pete asked if she thinks she wants to be part of assembly, she's not sure), Bryan Knapp's sister +- Rutzmosers (Todd and Pete already visited) +- Amanda Cannon +- Mike Hitch +- David and Stephanie Diaz (David is Gabriela's brother) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Elders meeting 8122023.md b/OneNote/Ben's Notebook/Chapel/Elders meeting 8122023.md new file mode 100644 index 0000000..042743f --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Elders meeting 8122023.md @@ -0,0 +1,50 @@ +Kiera's situation + +- Needed a place to stay Saturday night +- She's in North Dakota, returning today +- She can't return home, dad sold house +- Holly said she can use their car +- Kiera wanted to sleep in Holly's car behind the chapel, can't do that for the sake of our neighbors, not safe for her +- She could have been working on this last weekend, instead of travelling up north! +- Still have job? Don't know… +- Figure out something temporarily, then have direct conversation with her +- Extended Stay is an option, to the end of the month, looks to be around $43/night +- Talk to deacons about paying for this stay +- Talk to Kiera about it +- Get Stephanie involved in discipling her--good idea to get help Kiera handle things straight! +- Todd will call Stephanie + +Spanish conference + +- David and Geraldine Cayama were there, David looked back, bronchitis turned to pneumonia +- Geraldine taking care of him at home, lost some work hours because of this, job where she does cleaning for hotels, can go back to it, hasn't lost this permanently +- Not doing well financially, possibly, Pete not 100% sure, Geraldine wasn't super clear +- May need financial help there +- Share with the deacons + +From men's business meeting: + +- What are the chapel's ministry priorities? +- Helps fund: how much do we want to commit? + +Jim Hasemeyer + +- Speaker at the spanish conference + +Pathways conflicting with prayer meeting + +- Reach out to Grayson, consider options +- Pathways set for this semester? +- Could be several ways to make prayer meeting more efficient--shorter time for requests + +Conversation with Darrin + +- Steve and Pete talked together +- Darrin approached elders, confused on what to do to go forward +- Wants to get to Japan quickly +- Seems slow going through Pioneer +- We would help him along through CMML, we commend through CMML +- Darrin, doesn't have car, haven't seen him work with others +- Expect it to take 2-3 years to get there, quickest way would be to get a job there, he has training in ESL +- Would encourage him that way, taking a job would accept him in the culture +- Steve cautioned Darrin not to be too American--mentioned that this gets in Brock's way sometimes \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Elders meeting 8262023.md b/OneNote/Ben's Notebook/Chapel/Elders meeting 8262023.md new file mode 100644 index 0000000..3da5ead --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Elders meeting 8262023.md @@ -0,0 +1,32 @@ +Kiara + +- Make sure elders are supporting Stephanie with her mentoring of Kiara +- Staying at motel at the moment, through 9/2 +- Today, looking at apartment (room in a house), in Independence? Woman is in the LDS though, has not proselytized her yet +- Probably not wise to let someone vulnerable like Kiara live with an LDS person. Pete's roommate when he was a new believer was an RLDS and it was very confusing for him. Stephanie is convinced this is a good move for her. She has someone going with her, not Stephanie. +- Has part-time job at animal clinic, looking for other jobs, only paying $12/hr, can work as available/needed +- Stephanie is pushing hard for he to look for jobs, $15-20/hr jobs, going to job fair today + +Darren + +- Working in direction of moving to Japan with job teaching English. +- May be as soon as Spring + +Pathways + +- Looking for a few changes to schedule, might help with concerns about the transition to prayer meeting +- Shifting dinner and games? Dinner may be one of the first things, clean-up can happen while other things are going on (game time) + +Prayer meeting + +- Less asking people for requests, maximizing time praying +- Long silences sometimes--some brothers not participating much? +- Silences can be good too + +Sheryl Knapp + +- Wants to be put on lady's email list + +Sunday School + +- Once teacher lists are complete, Pete will need to do background checks on them \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Elders meeting 852023.md b/OneNote/Ben's Notebook/Chapel/Elders meeting 852023.md new file mode 100644 index 0000000..7b33316 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Elders meeting 852023.md @@ -0,0 +1,56 @@ +Gabriela & Michael and David & Stephanie meeting with Todd, Carl and Pete + +- Moved from Colorado +- Started in a baptist church +- Moved to a charismatic church, but the teaching appears to have turned them away +- Asked questions about losing salvation, indicating they didn't align with that teaching of losing ones salvation +- They went back to their baptist church and expressed getting "re-centered" on doctrine +- Gabi wasn't going to church for 6-7 years before coming to the chapel +- David told Gabi about us, had connections through Lakewood Bible Chapel in Colorado via David +- Gabi felt conviction to go to church, visited 4-5 other churches, liked "something different" when they came to us, very positive on how things are here (warm, welcome, comfortable--David and Stephanie said similar things) +- David & Stephanie: child is "Nairobi" +- David and Gabi baptized in baptist church in Colorado +- Michael not a believer, not baptized, Stephanie, not sure? + +Miguel and Shiela ? Have not visited with them. Miguel has some kind of vision issue, won't come without his wife because of that (driving?). + +Gabi and David interested in discipleship. We lack in this! Steve suggested a "orientation"-type class. Using a Gene Gibson book (Survey of Basic Christianity, Basic Christian Training) would be good. +[https://plymouthbrethren.org/article/4937](https://plymouthbrethren.org/article/4937) + +Amanda Cannon + +- Greenfield Iowa, grew up +- Father is an elder +- Went to Emmaus, graduated with ministry degree of some kind +- From Atlantic, IA area +- Started home daycare business, bought big house, ran it for 15 years +- Got married, husband professed salvation at that time, been divorced for 3-4 years +- He left the marriage, ran up debt in her name, if you don't act, you're liable, she filed for divorce +- Within two months, he lived with another lady and ran off with her, in hindsight there is uncertainty if he is even saved +- She stayed single, she's around 40, for last 20 years had chronic headaches +- Sold hours, came to KC because they have good pain care facility, was living off of profit from selling house +- Looking for a job now +- Suffered from depression in the past, suicidal in the past +- Clear testimony, assembly practices are familiar, not an issue in any way, usual hot topics not an issue +- In the past, hot topics have often been: + + - Head covering/women's issue + - Home schooling + - Calvinism +- Readily wanted to be received +- One of the fastest and easiest visit they've had! +- She's baptized +- Touched nicely by ladies' event last night +- Wait a week to announce reception of Amanda, give Gabi and David opportunity to know what's going on there + +Carl and Mary-Anne Rutzmoser + +- Go to Westbrook (on Antioch) one Sunday a month, otherwise attend here +- Involved in a study at Westbrook, homeless pantry they help with too, have friends at Westbrook +- Been travelling lately, family in Wichita, a daughter is moving + +Darrin Dorsey + +- Pioneer (ministries?) is not on the same page with how we do things, Darrin wanting to go through Pioneer to Japan +- Elders have suggested a way forward, nothing has really happened--Darrin hasn't taken these avenues +- \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Elders meeting 9162023.md b/OneNote/Ben's Notebook/Chapel/Elders meeting 9162023.md new file mode 100644 index 0000000..110ecca --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Elders meeting 9162023.md @@ -0,0 +1,5 @@ +Todd and Pete are going to talk to Brandon about the organizational aspects of the men's study. The first one this fall was bad--he started preparing breakfast at 8am which is when the study starts! He also led the study, but couldn't start until 9:12am. + +Kiara, checking out Christian girl she met on social media to live with in Wichita. Seems to have checked out, but can't move in until October. Kiara was offered to live in Pittsburg, KS with her sister. Transferring from one Freddy's to another. Her insurance worked out after she thought it was cancelled. + +Anthem song book, general conclusion seems to be to make the song book available for singing from, but not buying for each seat, using wisdom to choose which songs we sing. Seems like some teaching is needed on music and worship, it's purpose and the biblical reasoning and support for it. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Elders meeting 9302023.md b/OneNote/Ben's Notebook/Chapel/Elders meeting 9302023.md new file mode 100644 index 0000000..9d4ebe6 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Elders meeting 9302023.md @@ -0,0 +1,25 @@ +Men's breakfast +David planning on bringing main dish +Brandon planning on leading study + +Carl Rutzmoser +Sometimes focuses more on teaching than focusing on Christ + +Anthem hymnbook announcement +Don't expect "push back", may be some questions in both directions, but based on feedback, nothing major + +Carder's +Will be at meeting, last time during this visit +Say something about Carder's +A lot going on tomorrow, have announcer say something + +Kiara +Planning on living with sister in Fort Scott, visiting every weekend +Saving $2000 to move into apartment in Wichita + +Benjamin Washikala +Planning on going to conference in Congo + +Matthew Joy +Heard good presentation on how God is working in persecution around the world. He is a member of a baptist church. Could he come here and present? +Perhaps they can do it in their home and invite people \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Eligible speakers at the chapel.md b/OneNote/Ben's Notebook/Chapel/Eligible speakers at the chapel.md new file mode 100644 index 0000000..8b84640 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Eligible speakers at the chapel.md @@ -0,0 +1,25 @@ +Regular speakers + +- Nick Weaver +- Ben Ramey +- Chris Jozwick +- Carl Holden +- Todd Ericson +- Steve Price +- John Haligheri +- Kevin Hoesch +- Sam Pinto + +Potentials: + +- Grayson Price +- Luke Wortman +- Ryan Wortman (? not trained yet, no homiletics) +- Patrick Price (? Probably not his gifting) + +Not available + +- Pete Youngberg (recognizing fuzzy brain sometimes) +- Alfred Lutengya (emotional issues with mother) +- Joseph Rankin (leaving for woman) +- Christian Price (leaving for graduate studies) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/FBH singing 1013.md b/OneNote/Ben's Notebook/Chapel/FBH singing 1013.md new file mode 100644 index 0000000..faacf99 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/FBH singing 1013.md @@ -0,0 +1,3 @@ +- [ ] 251 - there is power in the blood +9 - I sing the might power +34 - all hail the power \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/FBH singing, 1282019.md b/OneNote/Ben's Notebook/Chapel/FBH singing, 1282019.md new file mode 100644 index 0000000..7dcc089 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/FBH singing, 1282019.md @@ -0,0 +1,3 @@ +142 o come all ye faithful +152 while shepherds watched their flocks +155 it came upon a midnight clear \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Feedback for Chris for his May 19th message.md b/OneNote/Ben's Notebook/Chapel/Feedback for Chris for his May 19th message.md new file mode 100644 index 0000000..ca051f9 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Feedback for Chris for his May 19th message.md @@ -0,0 +1,5 @@ +Pete: Examples, application good, overall did a great job +Todd and Carl didn't hear it. Tisara thought it was good. Wasn't sure that some of the earlier scriptures he shared were connected to his topic, but he made it clear later in the message. +Nonchalant, cavalier sometimes + +My main thoughts: need better structure for message. He said he had one point "the return of israel" and it could have and should have been expanded--his message really was well organized and could have been broken down by topics. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Kids singing 1013.md b/OneNote/Ben's Notebook/Chapel/Kids singing 1013.md new file mode 100644 index 0000000..1f7dec2 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Kids singing 1013.md @@ -0,0 +1,3 @@ +36 +46 +7 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Response to Holly.md b/OneNote/Ben's Notebook/Chapel/Response to Holly.md new file mode 100644 index 0000000..946b25a --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Response to Holly.md @@ -0,0 +1 @@ +Holly, thanks for giving me some time to think and pray about sharing the gospel message at Steve’s funeral. I feel that I should not accept, however—I don’t think that I am the right one. Please accept my apologies. I don’t wish to disappoint you or Steve. But, I am trusting that this is from the Lord and that the outcome will be more honoring to Him and Steve’s remembrance this way. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Security team first meeting planning.md b/OneNote/Ben's Notebook/Chapel/Security team first meeting planning.md new file mode 100644 index 0000000..d723947 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Security team first meeting planning.md @@ -0,0 +1,10 @@ +1. Do we want to organize a time for parents to bring their children to watch safety video? +2. How do we help with the "outside the church building" statistic? +3. Setup greeters schedule +4. Begin discussion on how we handle people wanting money +5. Figure out/label first aid kit +6. How do we get a list of people with chapel keys? +7. Who is authorized to use guns? Who carries at the chapel? Training standards? +8. Do we want to take advantage of DHS grants for equipment? +9. Who are our medically trained members? Establish schedule of "on duty" people? +10. Fire escape plan? Train chapel? \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Shepherding a Child's Heart book club.md b/OneNote/Ben's Notebook/Chapel/Shepherding a Child's Heart book club.md new file mode 100644 index 0000000..f6ecaa6 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Shepherding a Child's Heart book club.md @@ -0,0 +1 @@ +# Introduction \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Chapel/Sunday announcements.md b/OneNote/Ben's Notebook/Chapel/Sunday announcements.md new file mode 100644 index 0000000..12b7410 --- /dev/null +++ b/OneNote/Ben's Notebook/Chapel/Sunday announcements.md @@ -0,0 +1,8 @@ +1. Speaker this Sunday – Kevin Hoesch +2. Speaker next Sunday – Ben Ramey +3. A Vacation Bible School will be held at the chapel July 11-15. 5-7pm Contact Grayson or Amy Price for details. Register your kids. After meeting today, all teachers see Amy to check in. Potluck at chapel on Wednesday, chapel provide hotdogs. Thanks to all offering meals for the week, no more needed. +4. The Wednesday night prayer meeting will be over ZOOM ONLY starting at 7:00. It will NOT be at the chapel this week because of Vacation Bible School. +5. This month’s men’s business meeting will be held on Thursday, July 21, starting at 7:00 pm. It will NOT be on this Thursday, July 14, as stated in the bulletin. The men’s meeting is on Zoom only. +6. There will be a women's Brunch & Blooms on Saturday, July 16, starting at 9:30 am. sign up sheet in back for brining stuff +7. Ken and Luanne 46th wedding anniversary today +8. Letter from Sam \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Freelance/Brandhoot/Coupon service.md b/OneNote/Ben's Notebook/Freelance/Brandhoot/Coupon service.md new file mode 100644 index 0000000..9a10bde --- /dev/null +++ b/OneNote/Ben's Notebook/Freelance/Brandhoot/Coupon service.md @@ -0,0 +1,26 @@ +| +| +==Tags: #coupon== + +**Phase 1** +Simple site that allows to build a coupon with: + +1. Client logo +2. Title +3. Coupon description +4. Terms and service text + +Design + +- Dashed line around the coupon. +- Mostly white +- Nice and clean, but nothing special in terms of fancy design + +Technology + +- Ruby on Rails +- Heroku +- Sub-domain of brandhoot.com?  own domain? + +**Phase 2** +**Phase 3** \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Freelance/OAP/OAP PayPal calculations errors.md b/OneNote/Ben's Notebook/Freelance/OAP/OAP PayPal calculations errors.md new file mode 100644 index 0000000..5a08e5b --- /dev/null +++ b/OneNote/Ben's Notebook/Freelance/OAP/OAP PayPal calculations errors.md @@ -0,0 +1,26 @@ +| | | | | | | +|---|---|---|---|---|---| +|Total|Actual fee|Net|Expected Net|Actual percentage|| +|103.2|3.29|99.91|100|(3.29 - .3) / 100 = 0.0299 * 100 = 2.99|103.2*0.029 + .3 = 3.2928| +|499.29|14.78|484.51|484.93|(14.78-.3) / 484.93 = 0.0299 * 100 = 2.99|499.29*.029+.3 = 14.7794| +|550.74|16.27|534.47|534.93|(16.27 -.3) / 534.93 = 0.0299 * 100 = 2.99|550.74*.029+.3=16.2715| + +We are sending a payment of 103.20 to paypal which is what they then use to make the 2.9% + $0.30 fee calculation instead of basing it off of $100. So, the fee ends up being $3.29 instead of $3.20. + +We need a better formula: + +A * 0.029 + 0.3 = B + +A - B = C +A = C + B + +C = 100 + +(C + B)*0.029 + 0.3 = B +0.029C + 0.029B + 0.3 = B +0.029C + 0.3 = B-0.029B +0.029C + 0.3 = 0.971B +B = (0.029C + 0.3)/0.971 + +0.029*100 + 0.3 = 3.2 +3.2/(1-0.029) = 3.2956 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Home Maintenance/Bathroom faucets.md b/OneNote/Ben's Notebook/Home Maintenance/Bathroom faucets.md new file mode 100644 index 0000000..6642ff4 --- /dev/null +++ b/OneNote/Ben's Notebook/Home Maintenance/Bathroom faucets.md @@ -0,0 +1 @@ +The Moen faucets we have in the master bathroom, upstairs bathroom and kitchen bathroom are all Moen Caldwell faucets. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Home Maintenance/Generator hookup steps.md b/OneNote/Ben's Notebook/Home Maintenance/Generator hookup steps.md new file mode 100644 index 0000000..65b5379 --- /dev/null +++ b/OneNote/Ben's Notebook/Home Maintenance/Generator hookup steps.md @@ -0,0 +1,8 @@ +1. Ensure gas tank is full +2. Move generator outside +3. Ensure generator breaker is closed +4. Flip generator switch to run +5. Press-and-hold button to start +6. Let generator warm up +7. Plug in 30amp cable to generator then wall +8. Flip switches on transfer switch to Gen \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Home Maintenance/Kitchen grout.md b/OneNote/Ben's Notebook/Home Maintenance/Kitchen grout.md new file mode 100644 index 0000000..e0f39f1 --- /dev/null +++ b/OneNote/Ben's Notebook/Home Maintenance/Kitchen grout.md @@ -0,0 +1 @@ +![O MAPEI@ Ready-to•Use Grout with Color-Coated 47 INNOVATION Contents Contenu Quartz Coulis prêt à llemploi avec quartz enduit de couleur Lechada lista para usar con cuarzo revestido con coloi Cellulose sponge Included inside Éponge en cellulose comprise à l'intérleur Esponja de celulosa incluida contenido U.S. gal. 1,89 FLEXCOLOR ca Charcoal Anthracite Carbón 0-5 Gal 93994 44102 IIRE 01]1ES CIIRIIÉSUR IEA 100kS ](Exported%20image%2020240808114112-0.jpeg) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Home Maintenance/Valley shower faucet cartridge replacement.md b/OneNote/Ben's Notebook/Home Maintenance/Valley shower faucet cartridge replacement.md new file mode 100644 index 0000000..caaeed0 --- /dev/null +++ b/OneNote/Ben's Notebook/Home Maintenance/Valley shower faucet cartridge replacement.md @@ -0,0 +1,9 @@ +Danco VA-1 valve 80978 +Danco 80686 valley seat and springs 2-pack + +After pulling off the chrome and unscrewing the chrome cap, the cartridge just pulls out. + ![Pedect Match Replacement Cartridge for VALLEY, SEARS & AQUALINE Repuesto 80978 VA-I ](Exported%20image%2020240808114111-0.jpeg) +![DANco €0686 SEATS & SPRINGS for Valier ASIENTOS Y SPRINGS PARA VALLEY@ ](Exported%20image%2020240808114111-1.jpeg) + +The spring and gasket is constructed so that the spring goes into the gasket and the plastic insert goes into the other end of the spring. Of course, the end of the spring with the insert goes into the valve with the gasket sticking out toward the cartridge. + ![Exported image](Exported%20image%2020240808114111-2.jpeg) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Home Projects/Bunny hutch materials.md b/OneNote/Ben's Notebook/Home Projects/Bunny hutch materials.md new file mode 100644 index 0000000..51561d5 --- /dev/null +++ b/OneNote/Ben's Notebook/Home Projects/Bunny hutch materials.md @@ -0,0 +1,9 @@ +- [x] 6 - 8' 2x3 +- [x] 6 - 8' 2x2 +- [x] 1 roll 24"x25' welded wire, 14ga +- [x] 1 roll 36"x10' 1/2 wire mesh cloth +- [x] 2 1/2" decking screws +- [x] 1/2" staples +- [x] 2 barrel bolts +- [x] 4 hinges 2 1/2" +- [x] 1 4'x8' 1/2" plywood \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Home Projects/Kitchen tile square footage.md b/OneNote/Ben's Notebook/Home Projects/Kitchen tile square footage.md new file mode 100644 index 0000000..3e4b479 --- /dev/null +++ b/OneNote/Ben's Notebook/Home Projects/Kitchen tile square footage.md @@ -0,0 +1,4 @@ +Behind oven: 3' x 6' = 18 +Backsplash: 2' x 24' = 48 + +Total: 66 square feet \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Home Projects/Retaining wall diagram 1.md b/OneNote/Ben's Notebook/Home Projects/Retaining wall diagram 1.md new file mode 100644 index 0000000..c49a6d9 --- /dev/null +++ b/OneNote/Ben's Notebook/Home Projects/Retaining wall diagram 1.md @@ -0,0 +1,3 @@ +Clipped from: [https://s3.amazonaws.com/media.gardengatemagazine.com/enote-archive/2010/06/100629-large.jpg](https://s3.amazonaws.com/media.gardengatemagazine.com/enote-archive/2010/06/100629-large.jpg) + +![Landscape block With a %-in. setback Larger gravel helps water drain so it doesn't freeze and thaw, damaging the wall. Backfilled soil %-inch gravel . Crushed limestone base, 4 to 6 in. deep ](Exported%20image%2020240808114117-0.jpeg) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Home Projects/Retaining wall diagram 2.md b/OneNote/Ben's Notebook/Home Projects/Retaining wall diagram 2.md new file mode 100644 index 0000000..7e2c040 --- /dev/null +++ b/OneNote/Ben's Notebook/Home Projects/Retaining wall diagram 2.md @@ -0,0 +1,3 @@ +Clipped from: [https://i.pinimg.com/originals/5d/fb/9f/5dfb9f775ef08ea01151fb362c1e76dc.jpg](https://i.pinimg.com/originals/5d/fb/9f/5dfb9f775ef08ea01151fb362c1e76dc.jpg) + +![SV40 toc Course do.%n upSde trench 6 inc excavated dr orated Sub" se ](Exported%20image%2020240808114116-0.jpeg) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Home Projects/Room dimensions.md b/OneNote/Ben's Notebook/Home Projects/Room dimensions.md new file mode 100644 index 0000000..b34ea47 --- /dev/null +++ b/OneNote/Ben's Notebook/Home Projects/Room dimensions.md @@ -0,0 +1,27 @@ +# Basement + +Main area: 271" x 176" = 331 sq ft +Foot of stairs: 40" x 50" = 14 sq ft +Tiled area: 36" x 93" = 23 sq ft +331 + 14 - 23 = 322 sq ft +322 / 21 = 15.3333 boxes + +# Boys room + +Main area: 150” x 186” = 193 sq ft +Closet: 50” x 66” = 23 sq ft +Total: 193 + 23 = 216 sq ft + +# Nursery room + +Main area: 154” x 143” = 153 sq ft +Closet: 24” x 60” = 10 sq ft +Total: 153 + 10 = 163 sq ft +163 / 20.49 = 7.9551 boxes + +# Nursey + boys + +163 + 216 = 379 sq ft +379 / 20.49 = 18.4968 boxes + +We need 306” of big brown bamboo quarter round \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Final Message - Charles Stange.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Final Message - Charles Stange.md new file mode 100644 index 0000000..7a9c484 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Final Message - Charles Stange.md @@ -0,0 +1,52 @@ +Modified from before. + +Theme: recognizing and adopting responsibilities of Christian life. + +Talk about responsibility: personally struggle with, especially when younger. As a kid on the farm, I had one job. IN the morning I was supposed to let the chickens out and at night, put back away. Poor chickens would spend many a day in the coup. + +Became more responsible in this task: became more mature. Later, I would wake up in the middle of the night thinking I had forgotten the chickens! + +Becoming more responsible brings maturity. Same of a Christian? What are the responsibilities of a Christian. + +1. What has Christ done for us: Suffered punished of our sins, of the whole world + + 1. 1 John - not only our sins, but the whole world + 2. Do we understand what this means? + 3. More to the cross than a man hanging there + 4. Endured wrath of man and God + 5. Luke 22: sweat great drops of blood, symptom of someone under extreme stress + 6. Why did He sweat like this? Knowledge of the massive weight? Knowing what the Lord would do, pouring His wrath on Him? + 7. Is 53:5 - wounded for our transgressions + 8. Taken our punishment, and taken our damnation that we rightly deserve +2. What has Christ not done for us? + + 1. Not forcing us to read + 2. Not forcing us to find direction for our lives + 3. Not forcing us to do anything + 4. So, these are decisions we all make--these are the responsibilities that Christ has entrusted us with +3. Adopting these responsibilities + + 1. If we even have a small understanding of Christ on the cross, we would have a debt of gratitude + + 1. Appreciation that someone has for another + 2. A life lived in appreciation to Christ + 3. If we respond in a flippant way: it indicates our attitude to Christ + 4. Should we adopt them? Yes! Most of these responsibilities are commands + 2. What they are + + 1. Seek God: Matt 6:33, seek ye first the Kingdom; 1 Chron 16:11, seek the Lord, His face, His strength + 2. Study the Word: 2 Tim 2, study to show yourself approved + 3. Obey the word: James 1:21-22, lay apart all filthiness, doers of the word + 4. Prayer: Col. 4:2 - continue in prayer, watch with thanksgiving + 5. Follow Holy Spirit: Gal 5:16 - walk in the Spirit + 6. So many more: witnessing, etc + 7. So many, can't do them all! A huge load! Thankfully have this verse: john 14:16, the Father will give you a Helper, that He may abide with you forever! We have His help in all these things. + 3. Intentional in taking on these responsibilities +4. Closing + + 1. Fear: get to heaven and understand all things and think back and say, "wow", what was I doing on earth? + 2. Who was I serving? Pursuing? Suffering for? My focus? My time? + 3. Perspective + + 1. For unbeliever: when they look at this life: this the very best, makes sense that they would make this the very best--most enjoyment, wealth, whatever. + 2. For Christian: totally different--best life yet to come, this the worst time we have. It gets a lot better in times to come. Let's not have the perspective of the unbeliever. Wouldn't it wisest to spend time and energy to make the most impact for the Lord, for the next life \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Final Message - Luke Wortman.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Final Message - Luke Wortman.md new file mode 100644 index 0000000..45084d7 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Final Message - Luke Wortman.md @@ -0,0 +1,65 @@ +Title: necessary steps to a true prayer + +Think about question: how do prayer and faith work together. +Pray + +We get to pray with God--a one-on-one conversation. It's a privilege that we are able to talk to God. Prayers don't have to sound perfect, but in faith and trust in God. + +Why are prayers difficult? +Are my priorities out of order? +Am I spiritually dry? + +If you answered yes, trust Jesus--he wants to guide and answer our prayers. +Start to worry about the words and what others are thinking. +Example: went to collegiate day of prayer. Wanted to have a sincere prayer. I ripped my pants. Distracted me constantly in my mind. +Couple of other distractions: when got into group, room was loud, multiple people praying. Decided to pray when room was quiet--actually prayed over soft-spoken girl! Felt bad and embarrassed. God was listening to us both. God heard both, praying over each other didn't cancel each other out. + +Ps 100:45 - no limit to God's understanding that He hears all prayers, all over the earth, all at the same time + +Hebrew 10:19-25 +Meant to encourage us and a stern warning. + +Heb 10:22 - let us draw near w/ sincere heart, full assurance of faith, +Context - old covenant would not take away sin +NT is God and the follower of Christ +Main teaching of Heb 10 is that animal sacrifices would not take away sin--foreshadowing the perfect sacrifice of Christ +Now an offering is not required. Doesn't mean we don't do anything. We have to take the initiative in asking forgiveness for sin. + +Now that we know Jesus has paved the way, we can draw near. +Five things are part of drawing near. + +1. Let us draw near + + 1. To whom: God + 2. How: all parts of worship, conversations, how would you? +2. A true heart + + 1. Without hypocrisy + 2. Embodies the truth, believing the gospel is true + 3. Full assurance of faith and salvation + 4. Towards: God, selves, others + 5. Jer. 17:9 - heart deceitful, we can't pray with a deceitful heart, a true heart is one given up to God + 6. Matt 6:10 - Jesus gave a true prayer, God's will be done on earth as in heaven + 7. Praying for his will +3. A full assurance of faith + + 1. Do doubt to our acceptance in God + 2. Sometimes we have doubt--God understands because we are human + 3. Fully trust that God forgives out sins and Christ was that sacrifice +4. Having hearts sprinkled from evil conscience + + 1. First glance: not knowing what it meant + 2. Sprinkled from: hearts need to be cleansed + 3. Indicates consistent character and dedicated to God + 4. Evil conscience: murder mystery-type shows and how the murderer has an evil conscience, but this is extreme! But we all have it, just a guilty conscience from sin + 5. When we confess, God cleanses our heart +5. Our bodies washed with pure water + + 1. Our outward body, is the outward man, the flesh + 2. No longer condemned as bodies are washed clean + +When we draw near, we need to ask for forgiveness in trust in God. + +Back to original question: how do prayer and faith work together? Simple: cannot have true prayer without faith. We pray because we know we are not self-sufficient. + +Quote from John Bunyan: A sincere, sensible and affection pouring out of the heart and soul through Christ. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Final Message - Randy Stange.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Final Message - Randy Stange.md new file mode 100644 index 0000000..fa77333 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Final Message - Randy Stange.md @@ -0,0 +1,31 @@ +Thankful for the hope we have in the savior. +Sustaining thought for me this winter. + +Family, taken trip down to Florida, on Sept 27, daughter adopted daughter, got to know her during that time. Little did we know, on Dec. 27th, she would be found in her bed, not breathing. Making that previous week so special. + +At the same time, we were dealing with death of Eva, learned of dear friend from Hutchinson had re-diagnosis of cancer, given 6 months to live. + +In the midst of these things happening, difficult time for me. Found hpe in Christ, the savior. + +Asked to do Eva's committal service--never done it before, was difficult. This is what the Lord gave me. + +John 11:20 - Martha and Mary lost Lazarus, probably the breadwinner. Jesus waited to go see him, he loved this family. + +Lazarus had already died when He came. Two points: + +1. Eva will live, though she has died + + 1. She is alive with the Savior, though not here with us + 2. Comforting that Eva was safe with the Savior + 3. Committal service first week of Jan. + 4. When home, took meals to Kathy in Hutchinson + 5. She lasted 45 days, Kathy was about our age, hit home, had never happened to me to lose someone like that + 6. Were at committal service for Kathy, way of giving hope + 7. Luke 23:39 - thief on the cross, mocking Christ, in the midst, insulted, criticized, bitter against Jesus + 8. Through all of this - v41, Christ was gracious to the thief that believed on Christ, just like Martha believed in Christ and Jesus asked her + 9. Knew that Kathy was with Christ in paradise +2. Do you believe this? + + 1. We all must face our own mortality + 2. This hope lives in me, knowing Christ as my personal savior + 3. You can have this hope and trust as well \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 1 - Intros - Charlies.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 1 - Intros - Charlies.md new file mode 100644 index 0000000..9364dca --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 1 - Intros - Charlies.md @@ -0,0 +1,16 @@ +Theme: +Passage: Jonah + +Jonah, the prophet, one commended to go witness to Ninevites, commanded ship crew on his way to escape to commanded the crew to throw him overboard? Death was only way to rectify his disobedience? Or what his heart so hard that he wanted death over grace to Ninevites? + +Call message: Christ's righteous reproof to rebellious runner. + +Charlies: + +- Too wordy +- Too much message? + +Notes: + +- Good intro--grab attention of Jonah's heart--hard or soft? +- Big words? \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 1 - Intros - Luke.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 1 - Intros - Luke.md new file mode 100644 index 0000000..cf020c8 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 1 - Intros - Luke.md @@ -0,0 +1,21 @@ +Theme: the great commission +Verses: Matt 28:16-20 + +Intro includes Mark 16:15 + +Start off with question: ever been in a stadium or concert? One of the biggest has 100k people, doesn't compare to number of the people in this earth. + +China: biggest population. Christians: 31 million, more than Australia. But China has 1.3 billion, Christians = 2% = a lot of unsaved souls + +Mark: go into all the world, to all creation +For all disciples, not just 12, disciple means one who follows another. He's sending us. +Personally, it's hard for me to go to campus and talk to people, worry about offense, mockery and loss of friends. All comes down to fear, fear is powerful, but it's not worth 1 billion souls not knowing the Lord. + +The great commission is so important. + +Notes: + +- Too much about definition of disciple, goes too much beyond introduction +- Grab the audience with first question +- Great numbers to get us thinking +- Good time, good lead into personal application \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 1 - Intros - Randy.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 1 - Intros - Randy.md new file mode 100644 index 0000000..0cbdc53 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 1 - Intros - Randy.md @@ -0,0 +1,16 @@ +Tomorrow - veteran's day +Fighting against pride is a daily battle. Matthew 6:5 +Read it - loving audience of men when praying +Pharisee, pride exalts himself +Publican, humbles himself + +Let's get into our passage, Luke 18:10-14 + +Theme: Pride versus humility + +Notes +Veteran's day is not relatable to most people, they've never been in a war. Relate it to the audience by showing them that they do fight (or should be fighting) a battle against pride. + +Jump too quickly into verse--make sense of illustration (application, relevance) first. +What does the verse which has to do with praying have to do with pride versus humility? +God resists the proud, but gives grace to the humble. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 3 - Testimony - Charles Stange.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 3 - Testimony - Charles Stange.md new file mode 100644 index 0000000..e0e5089 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 3 - Testimony - Charles Stange.md @@ -0,0 +1,24 @@ +Profession of faith when 7, baptized when 13. +Truly saved when turned 19. +Explain - grew up in Christian home. Good kid. Only for "persona" to keep up. +High school - prideful, selfish. Basketball - entire focus in high school. Myself was focus. +Senior - shot 400 shots a day, great shape. Go running shirtless, attitude of invincibility. +Was not talented, dad and grandpa were. Success was due to working hard--but looking back, was not that successful. + +Basketball was identity, worked-out hard. Trained to dunk, proud of that. +Why not saved at that time? Scripture for why I was not saved: 1 John 5:1-7 +1 John 2:3-6 how we know Him--keep His commandments. + +Romans 6:8-7 carnally-minded is death, separation from God, same as when Adam sinned. Carnal mind is enmity with God--opposite of agape love + +I had carnal mind--on earthly things, myself. Christ was an add-on to my life--wanted to be associated with Christians, but not my focus. + +Summer 2015 - built own basketball court, going on to walk-on at college. Dad took job in Springfield, wrecked my life, lost dream job, lost ability to HDC, couldn't play basketball, lost farm with court, lost friends. + +February 2016 - got really sick. In bed for 2 months. Constant discomfort. Lost weight, physical muscle-mass. Everything built up was taken away. In this time, God was breaking stubborn, prideful heart. Remember being propped up against a wall, very weak. Still selfishly praying to be put out of misery--nothing to identify myself with. Everything I thought I was, was gone. Still prideful, but everything I had was not worth living for. Thinking, "live for Christ or not live at all". Still selfish, but God used that thinking to humble me before Him. Perspective completely changed, repented before the Lord about having lived myself. My life apart from Christ would amount to nothing. Nothing good apart from Christ. + +1 Peter 1:24-25 all flesh is grass, the word endures. Wish I could say I'm a perfect Christian--but it is a constant struggle. Understand I'm living for Christ, but it is day-by-day decision to do it. + +Praise the Lord and thank Him for His work in my life. + +1 John 2:15-17 love not the world, not of the Father, He that does the will of God abides forever. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 3 - Testimony - Luke Wortman.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 3 - Testimony - Luke Wortman.md new file mode 100644 index 0000000..867b101 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 3 - Testimony - Luke Wortman.md @@ -0,0 +1,17 @@ +Thankful for chance to give testimony. Give insight on how God is working through my life, hope it is an encouragement. + +Blessed to be born into Christian home--learn about Bible, plan for salvation. One of the reasons I was saved at 4. Didn't understand a lot, did understand heaven and hell. Mom explained God loved me and wanted me to live in heaven with him. Read classic verse, John 3:16 quote with "Luke" in the verse. It put me into the situation, "God so loved _me_". + +Got nightmares when 4. Screaming many nights in my sleep. Blessing in disguise--led me to the point where I wanted help. Knew that heaven was perfect, no nightmares there. Hit me, this is where I want to be going. Hell sounded like real-life nightmare. + +Romans 3:23 - knew hell was where I was headed. Very jealous kid, just took things because I wanted it. I knew I needed to change. + +Good news, wages of sin is death, Romans 6:23, give of God is eternal life. I could understand at 4. + +Revelation 3:20 - behold I stand at the door and knock. When my mom read that verse, I was saved and I knew it was true because God keeps his promises. + +Went to catholic school, was having doubts, got confused with their teaching. Teacher was saying, going to heaven like a staircase. Do good, go up, do bad, go down. Eph. 2:8 showed me by faith, not works. + +At Sooner Bible Camp, have to put trust in faith in God, not what happened when you were 4. This spoke to me, I need to put my trust in God continually. + +After that, needed to take care of my sins, change views of God. Believe it for myself, not just what my parents say. Currently, trying to grow, finding God's plan for me. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 3 - Testimony - Randy Stange.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 3 - Testimony - Randy Stange.md new file mode 100644 index 0000000..676c89f --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 3 - Testimony - Randy Stange.md @@ -0,0 +1,18 @@ +Giving testimony to friend soon. + +Dad coached at Beloit high school. +Brother pulled vaporizer on himself and got third-degree burns all over his body. Treated in Galveston. + +Room was round, walked around outside. Every step was a bed of someone severely burned, in anguish and crying. Brother was in there, couldn't touch him but see him. You could hear whoever was in the middle of the room screaming as they disinfected the burn wounds. + +Lois Phillips invited us to church--bus ministry. I would get on bus, drive to church. Bus came, not ready. Next Sunday, same. No one ready. Lois came back third Sunday, asked us again to come. We were ready, out of embarrassment. Lois was teacher of primary class, my class. + +Lois was talking about salvation at the end of the lesson. Didn't bother me until she talked about fire--this hit me because of my brother. "You can avoid all of that by accepting Christ as your savior". Christ paid the price--to be in heaven. I sprinted, jumped out of aisle. Lois took me through the Romans road. 3:23, all sinned. 6:23, wages of sin is death, but gift of God is eternal life. I immediately asked Christ to be my savior. Immediate lifting of burden. + +At school, I did show-and-tell, talked about what hell was and didn't want any classmates to go there. + +Suggestions: + +- Verses showing God's righteousness and judgement--needful to the judge sin. +- Give more detail about burn unit--wailing, verses on hell +- Only way to keep the wound clean--only way God can deal with sin \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 4 - let us message - Charles Stange.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 4 - let us message - Charles Stange.md new file mode 100644 index 0000000..5f5ab78 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 4 - let us message - Charles Stange.md @@ -0,0 +1,20 @@ +Hebrews 12:28 - + +Chapter 12, wanted to do outline on whole thing, it goes together. + +Background: writer is painting loving picture of God. Contrasting with the fear Israel had at Mt. Sinai with the grace we have approaching Mt. Zion. Different picture here in 25-29 than in preceding verses. + +V25 warning to not refuse the Lord, referring to 3:16-19, where Israelites cannot enter promised land because of unbelief. + +V26 another reference to the voice of the Lord shaking things +Reference to Haggai 2:6-9 about shaking the earth + +V27 explains the promise from Haggai + +The picture being painted is that the things that will remain are the things of Christ. + +V28 assurance part, with command to show grace/gratitude. Grace in what? A call to have grace permeate our lives in general, not one specific area. + +Serve: acceptably, reverence, godly fear - a constant carefulness + +V29 not to believers, but God's attitude to those who are against him. Should inspire our attitude of grace when we consider how gracious God is to us, considering how fearful He should be to all who resist Him. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 4 - let us message - Luke Wortman.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 4 - let us message - Luke Wortman.md new file mode 100644 index 0000000..9c81243 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 4 - let us message - Luke Wortman.md @@ -0,0 +1,17 @@ +Hebrews 10:22 + +At first glance, this is a little complicated. Hoping to clarify by the time I'm done, break it down. + +Context: Hebrews 10, talking about sacrifice. Under old covenant, sins are not taken away. Old covenant between God and Israel, new is between God and christians. Main teaching, animal sacrifices do not take away sin. Was to provide temporary covering of sins, also provide foreshadowing. Only way to take away sins was the perfect sacrifice, Christ. + +Now that we know Jesus paved the way, we can draw near to God. + +Five parts + +1. Draw nearTo God, encouragement to get close to Christ. How? Prayer, all parts of worship, conversations with others, etc. How will you draw near? The necessary steps to a true prayer. +2. True heartTrue heart, without hypocrisy, embodies the truth. When we pray, we need to have a true heart. A true heart toward God, ourselves and others. Jer 17:9 - heart is deceitful. We cannot pray with a deceitful heart, pray for His will, not our own. Matt 6:10 - example of a true prayer. +3. Full assuranceBible dictionary -- no doubt in our acceptance to God. Sometimes we have doubts, so full assurance is more confidence in a faithful God, not having no doubts. What He has done, gives us confidence. God is always faithful. +4. Hearts sprinkled from evil conscienceBig word is sprinkled. Sprinkled actually means to be cleansed--verse makes more sense now. Indicates a consistent character and devout life toward God. What about the evil conscience? Big fan of Clue, murder mystery. When I think of evil conscience, a murderer in their mind, thinking of the evil thing they've done. This is the extreme though. Really, an evil conscience is just a guilty conscience--we have sinned. Because we have been cleansed… +5. Bodies washed with pure waterOur body is the outward man. When we are washed with a pure water, we're cleansed from all dirt. We are no longer condemned. + +Through these things, we can finally achieve a true prayer. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 4 - let us message - Randy Stange.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 4 - let us message - Randy Stange.md new file mode 100644 index 0000000..9a4d3fd --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2018/Message 4 - let us message - Randy Stange.md @@ -0,0 +1,11 @@ +Let us - Hebrews 13:15 + +Let us offer spiritual sacrifice of praise. + +Illustration - Sally, friend, invited Bill over. Suddenly drawn to him during conversation, Bill spoke on this passage. Bill flipped the mindset of standing up and talking as showboating to turn it into what this passage says: a sacrifice to do as a believer, to offer it up to God. + +Give thanks to the Lord, call upon his name. + +At remembrance meeting, at height, everything is summed up in remembering the cross. There is no more wonderous work. + +1 Chron reference to David praising. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Final Message Part 1 - Kosei Miwata.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Final Message Part 1 - Kosei Miwata.md new file mode 100644 index 0000000..b0f3671 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Final Message Part 1 - Kosei Miwata.md @@ -0,0 +1,3 @@ +Importance of repentance +Foundation of repentance +Result of repentance \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Final Message Part 1 - Zach Robertson.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Final Message Part 1 - Zach Robertson.md new file mode 100644 index 0000000..05fccae --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Final Message Part 1 - Zach Robertson.md @@ -0,0 +1,4 @@ +Be careful with hands--were good, but sometimes put together in front of him looking a little nervous. +Good eye movement +Good pace of speech +Take pauses more--some great introspective questions that the audience could use to reflect \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Let Us Message - Kosei Miwata.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Let Us Message - Kosei Miwata.md new file mode 100644 index 0000000..2744034 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Let Us Message - Kosei Miwata.md @@ -0,0 +1,20 @@ +Which would you rather? Sprinter or marathon runner? + +Sprinters were more popular in school! Students didn’t want to see the whole marathon, so a quick sprint was more popular! + +The Christian life is, however, a marathon, not a sprint. + +Hebrews tells us how to run the race. Hebrews 12:1-2 + +Why are we exhorted to run the race? + +1. We have a great cloud of witnesses--men and women of faith who appear in previous chapter 11. They ran the race to receive the promises. Some seemed to not be triumphant--some suffered, died and appeared unvindicated. +2. While previous believers have run their race and shown us an example--we are not done yet! + +We must lay aside every encumbrance and every sin. You never see a runner with dumbbells in his hand or a long, thick robe! + +The author gives us Jesus as the best example of how to run. Though on earth, men did not recognize him, he was vindicated before God. + +Paul looked to Jesus as in 1 Tim 6:13 Paul, tried before men like Niro, kept the faith by looking to Christ. + +We are expected to be long-distance runners in faith. Look to Jesus and run! \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Let Us Message - Zach Robertson.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Let Us Message - Zach Robertson.md new file mode 100644 index 0000000..4a8ada5 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Let Us Message - Zach Robertson.md @@ -0,0 +1,19 @@ +Hebrews 10:22 + +Blessings of Christ as a high priest. OT detailed all the work of a high priest. + +Under OT, it was just a covering for their sin, not a full payment. Now, we see the full payment made through Christ. + +The high priests had to repeatedly do the work. Christ had to do it only ones. + +Cross-ref: Heb. 10:1 - the opposite of whom was Christ who made a permanent sacrifice for a new covenant. + +Access +Now we have access to Christ. Christ has opened the presence of God to us through His work. + +Cleansing +We also have our whole being cleansed. Guilt accompanies every sin, but now we've been cleansed by Him. + +Peter asked Jesus to wash all of him and Jesus said unless he would be cleansed he would have no part with Him. Being cleansed is like being sanitized. It's temporary for us when we sanitize our hands, for example! But the cleansing of Christ is forever. + +Application: recognize our position in Christ. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Message 1 - Introduction - Kosei Miwata.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Message 1 - Introduction - Kosei Miwata.md new file mode 100644 index 0000000..1e6a244 --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Message 1 - Introduction - Kosei Miwata.md @@ -0,0 +1,10 @@ +Passage Matt 25:1-13 + +Section is about second coming, parables consecutively to emphasize one thing: be ready for His coming. + +Each parable has its own emphasis. Comparing helps us understand the theme. + +24:14-30 be ready because he will settle accounts +24:31-42 be ready because he will judge +24:42-51 be ready because it may be tonight +25:1-13 stay ready because it will not be tonight \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Message 1 - Introduction - Zach Robertson.md b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Message 1 - Introduction - Zach Robertson.md new file mode 100644 index 0000000..81ed3bb --- /dev/null +++ b/OneNote/Ben's Notebook/Homiletics/Homiletics Fall 2019/Message 1 - Introduction - Zach Robertson.md @@ -0,0 +1,15 @@ +Passage: + +Forming of diamonds requires some very specific requirements and optimized things to make what is known as the hardest natural mineral. + +- Graphite, unless tainted +- 100 miles below earth, in diamond stabilization zone +- High pressure +- High temperature, 2000 degrees +- Make a diamond in two weeks synthetically +- Because of the flood, diamonds are at the surface for us to get to +- Evolutionists thing it takes very long to make…? + +Want to talk about the perfect things to make a diamond and how it relates to us: how we are made by high pressure--make us or break us. Pressure makes us to a beautiful thing for the Lord. + +James 1:2-4 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2017.10.01 Luke 1213-21.md b/OneNote/Ben's Notebook/Messages/2017.10.01 Luke 1213-21.md new file mode 100644 index 0000000..b4899f4 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2017.10.01 Luke 1213-21.md @@ -0,0 +1,43 @@ +> [!caution] This page contained a drawing which was not converted. + +**Luke 12:13–21** +**13** Someone in the crowd said to Him, “Teacher, tell my brother to divide the _family_ inheritance with me.” + +**14** But He said to him, “Man, who appointed Me a judge or arbitrator over you?” + +**15** Then He said to them, “Beware, and be on your guard against every form of greed; for not _even_ when one has an abundance does his life consist of his possessions.” + +**16** And He told them a parable, saying, “The land of a rich man was very productive. + +**17** “And he began reasoning to himself, saying, ‘What shall I do, since I have no place to store my crops?’ + +**18** “Then he said, ‘This is what I will do: I will tear down my barns and build larger ones, and there I will store all my grain and my goods. + +**19** ‘And I will say to my soul, “Soul, you have many goods laid up for many years _to come;_ take your ease, eat, drink _and_ be merry.” ’ + +**20** “But God said to him, ‘You fool! This _very_ night your soul is required of you; and _now_ who will own what you have prepared?’ + +**21** “So is the man who stores up treasure for himself, and is not rich toward God.” + +Bible Chapel of Shawnee +October 1st, 2017 +Part of Life of Christ series + +**Outline** + +1. Question and Response (13-15) + + 1. Question from man in the crowd (v13) + 2. Jesus cannot answer (v14) + 3. Jesus warns against greed (v15) + + 1. Warning: be on your guard against greed + 2. Reason: our lives never consist of our possessions +2. A Parable (16-20) + + 1. A rich man's land was productive (v16) + 2. The rich man reasoned with himself what to do with the extra produce (v17) + 3. The rich man decides to build bigger barns (v18) + 4. The rich man comforts himself (v19) + 5. God requires the rich man's soul that night (v20) +3. Summary (21) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2018.02.04 Galatians 57-12.md b/OneNote/Ben's Notebook/Messages/2018.02.04 Galatians 57-12.md new file mode 100644 index 0000000..b7bcb73 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2018.02.04 Galatians 57-12.md @@ -0,0 +1,138 @@ +Bible Chapel of Shawnee +February 4th, 2018 +Galatians series + +Lesson 2: Understand the situation + +**Rhetorical theme**: Understand the situation. + +**Full theme**: As a father with children, Paul wants the Galatians to understand their situation to prepare their hearts to return to living in the gospel of justification by faith. + +1. Introduction + + 1. Come to the application part of Paul's teaching + + 1. Defended the gospel source + 2. Defended the gospel truth + 3. Now he's reinforcing how they can walk + 2. Mostly struck a forceful, even harsh tone so far, but Paul is like a father + 3. As a father myself: + + 1. I find myself being forceful to make sure Ethan understands + 2. But, always wanting to show tenderness afterwards + + 1. I want him to succeed + 2. I want a good relationship for the future + 4. First lesson in 5:1-6 + + 1. Understand the stakes + 2. It's all freedom or all slavery + 5. Now, the second lesson in 5:7-12 + + 1. Understand the situation + 2. It's serious, but definitely recoverable 3. How you got here (vv7-9) + + 1. Racing analogy - they started off well + + 1. Mixing analogies? + + 1. 5:1 - stand firm, things of the mind, doctrine, faith + 2. 5:7 - running well, things of action, works + 3. Not separate concepts--definitely intertwined + 2. Hints in Galatians + + 1. 3:1-5 + + 1. Hearing with faith + 2. Suffer for faith + 3. Miracles happening among them + 2. 4:14-15 + + 1. Received Paul well + 2. Sense of blessing and sacrifice + 3. 5:5-6 + + 1. Wait for the hope of righteousness + 2. Faith working in love + 2. Current state + + 1. 1:6 - quickly deserting Christ + 2. 3:1 - bewitched by someone + 3. 5:2-4 - in danger of: + + 1. Christ of no benefit + 2. Enslaved to entire Law + 3. Severed from Christ + 4. Fallen from grace + 3. Active hindrance + + 1. Encouraging on one hand - if we're running well, we won't suddenly wake up some day and be on the wrong track + 2. Warning on the other hand - watch out for deceivers, false teachers + + 1. Jesus warns of them - Matt. 7:15-16 + 2. Paul warns of them - 2 Cor. 11:12-15 + 3. Peter warns of them - 2 Pet. 2:1 + 4. John warns of them - 1 John 4:1 + 5. Jude warns of them - Jude 4 + 4. Foreign persuasion + + 1. Simply put, not from God + 2. How do we know? Paul told us in chapters 3-4_Paul outlined how the Galatians could have known they were believing something not from God. He did so from many different angles:_ + + 1. Experience + 2. Historical examples (Abraham) + 3. Knowing God's character + 4. Culture (heir in a household) + 5. Analogy (Sarah and Hagar) + 6. Scripture (purpose of Law, promises of God) + 3. Galatians were not vigilant enough. Perhaps it sounded spiritual, so they believed it without much discernment. + 5. Dangerous doctrine + + 1. Leaven + + 1. Several definitions: lump from old dough mixed into new dough + 2. Multiples until entire lump of dough is "infected" + 2. Law for justification + + 1. Maybe just started with circumcision? + 2. Infected their entire doctrine: Gal. 2:21 + 3. Other things + + 1. Mistrust of Paul, Gal. 4:16 + 2. Hints of relational issues, Gal. 5:15 5. You're not beyond recovering (v10)_You can simply adopt the same view you had, that I still have now. The ones in trouble are the false teachers. They will bear their judgment._ + + 1. Worried Galatians + + 1. Paul's tone strongly suggests they ARE in trouble + 2. Humble hearts would be turned by this point in the letter! + 3. Natural to wonder if they're past the point of no return + 2. Their task: adopt no other view than what they once had + + 1. The work of the Lord + 2. The grace of the Lord + 3. There is trouble for the false teachers: their greater responsibility means judgment. James 3:1 7. You can trust me (v11)_I haven't changed since we first met. I'm still persecuted because I'm still placing the stumbling block in front of the Jews by preaching the cross of Christ._ + + 1. Paul's points from chapter 1 + + 1. 17 years passed but doctrine still lined up with the other apostles + 2. Stood firm, even to Peter + 2. Since then: + + 1. His message has been consistent + 2. Evidenced by his continued persecution + 3. Motivated by the knowledge that doing otherwise would remove the cross of Christ from his teaching 9. I'm not mad at you (v12)_Paul only wishes that the false teachers would go away._ + + 1. Despite his tone, he loves the Galatians + + 1. Gal. 4:11-12, 19-20 + 2. The fact that he wrote this letter! + 2. His desire is just that the false teachers would leave them alone +10. Conclusion + + 1. Paul is a loving father speaking encouragement to his children + 2. Made two points now + + 1. Understanding the stakes + 2. Understanding their situation + 3. Prepared now to return to the right mindset (view) + 4. Next: how to live by the Spirit \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2018.03.25 Galatians 513-15.md b/OneNote/Ben's Notebook/Messages/2018.03.25 Galatians 513-15.md new file mode 100644 index 0000000..1430026 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2018.03.25 Galatians 513-15.md @@ -0,0 +1,125 @@ +Bible Chapel of Shawnee +March 25th, 2018 +Galatians series + +Lesson 3: Understand that freedom is a tool + +**Rhetorical theme**: Understand that freedom is a tool. + +**Full theme**: Freedom is a tool which we are called to use according to its purpose, without abusing or neglecting it. + +1. Introduction + + 1. A hammer + + 1. A tool for what? + 2. Can you misuse it? + 3. What if you never use it? + 2. Lesson 3 of the last section of Galatians: restoring confidence in the freedom of the gospel + + 1. Paul has so far taught two lessons: + + 1. The stakes are high: all freedom or all slavery (vv1-6) + 2. The situation is serious, but recoverable (vv7-12) + 2. Now: freedom is a tool (vv13-15) + + +2. Christ has called us to use it (v13a)_We have a responsibility to use freedom._ + + 1. "Freedom" - what is it? + + 1. Of course, opposite of slavery + 2. Context of chapter 4: story of Abraham, Sarah and Hagar + + 1. Following God's purpose by faith brought about His plan + 2. Forcing (or, trying to force) God's purpose by the flesh (son through Hagar) brought conflict, anger, frustration and trouble. + 3. Summarized form: freedom to accomplish God's purpose through us by faith. It is the opposite of slavery which is trying to work God's purpose through us by the flesh. + 4. Specific context of Galatians: freedom from the pursuit of righteousness on our own. The opposite of continually pursuing (and never attaining) righteousness through following the Law. + + + 2. "Calling" + + 1. Definition: + + to urgently invite someone to accept responsibilities for a particular task, implying a new relationship to the one who does the calling—‘to call, to call to a task.’56 + + + + _Louw, J. P., & Nida, E. A. (1996). Greek-English lexicon of the New Testament: based on semantic domains (electronic ed. of the 2nd edition., Vol. 1, p. 423). New York: United Bible Societies._ + + 5. By Christ: **Galatians 5:1** + 6. Implications + + 1. Not an optional calling, like a benefit + 2. Our freedom comes with responsibility. +3. It can be abused (v13b)_Like any tool, freedom can be abused._ + + 1. Abuse type 1: an excuse for the flesh, "I'm already righteous, now I can do what I want." + 2. Abuse type 2: an excuse for self-centered freedom + + 1. **1 Corinthians 8:4-13** - a great example, eating meat sacrificed to idols + 2. **1 Corinthians 10:23-33** - continuing with the example of meat sacrificed to idols +4. It has a specific purpose (v13c)_To be free to lovingly serve one another._ + + 1. Like any tool, freedom has a specific purpose: to serve one another with love. + 2. How is this freedom's purpose? When we are concerned with our righteousness, we are enslaved to always wondering if we have achieved it. + + 1. We can eternally ask questions: + + 1. Am I righteous? + 2. Did I sin today? + 3. Did I do that right thing with the wrong motive and lose my righteous standing? + 2. In Christ, we _have already_ attained His righteousness by faith. As we continue in this faith, we are free from focusing on ourselves to be able to focus on others. + 3. How Jesus used His freedom + + 1. **Matthew 9:9-13** - Jesus eats with sinners and tax collectors + 2. **John 4:7-9** - Jesus meets and speaks with the Samaritan woman + 3. Notice how Jesus did not cater to everyone. He used His freedom to meet the needs of the "sick". You might see the Pharisees as one who are "weak in conscience" but Jesus did not see them that way. Rather, He saw through their hypocrisy. + 4. How Paul used his freedom + + 1. **1 Corinthians 9:1-23** - Paul does not sin with his freedom, but he focuses on others 6. Using it fulfills the whole Law (v14) + + 1. Not a new thought from Paul + + 1. **Matthew 7:8** - the golden rule + 2. **Matthew 22:36-40** - the greatest commandment + 2. **Romans 13:8-10** - much (or perhaps all) of the Law is how to treat your neighbor to some degree or another. If we always loved our neighbor, we would always be keeping the Law. + 3. Remember: purpose is not to conclude that the Law is evil, but that seeking righteousness through it is working by the flesh and will never achieve righteousness--it is slavery. + + 1. The Law reveals out sin: **Romans 7:7** + 2. The Law is good: **1 Timothy 1:8-9a** 8. It can be neglected (v15)_Finally, we neglect to use our freedom at all and instead seek to enslave each other by our biting and devouring._ + + 1. Unsure I can say for sure why Paul has this here? + 2. The consequences of abuse? + + 1. We use our freedom as a club to, instead of serving each other, we nit-pick each other's strength in freedom + 2. The result is not that we spur each other on to greater use of a our freedom, rather we consume (use up) each other. Our freedom is expended. + 3. The natural result of neglecting our freedom? + + 1. Paul could be answering the question of what happens when we don't use our freedom + 2. We would do what the Galatians are doing + + 1. Not trusting in righteousness being done in Christ + 2. Turning back to the Law for righteousness + 3. We become Pharisees, biting and devouring each other's adherence to the Law until we consume each other + 4. Everyone is paralyzed and no one grows or serves--we are again in slavery + + +9. Conclusion + + 1. Paul has explained two lessons so far: + + 1. The stakes involved: all freedom or all slavery--no middle ground + 2. The present situation: serious, but recoverable + 2. Now: that freedom is a tool which we are called use according to its purpose, without abusing or neglecting it. + + 1. Christ has called us to use it + 2. It can be abused + 3. It has a specific purpose + 4. Using it fulfills the whole Law + 5. It can be neglected + 3. The freedom we have in Christ has been given to us for the purpose of serving each other in love. + + 1. It's not a license to sin + 2. It's not a club to crush each other + 3. It's the rest we have in Christ that our righteousness is accomplished and secure with Him. This peace of mind allows us to now focus outward toward each other in love. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2018.04.15 Galatians 516-26.md b/OneNote/Ben's Notebook/Messages/2018.04.15 Galatians 516-26.md new file mode 100644 index 0000000..b81dda4 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2018.04.15 Galatians 516-26.md @@ -0,0 +1,165 @@ +Bible Chapel of Shawnee +April 15th, 2018 +Galatians series + +Lesson 4: Understand the reason to walk in the Spirit (vv16-26) + +**Rhetorical theme**: Understand the reason to walk in the Spirit. + +**Full theme**: Walking in the Spirit is the means by which we properly wield the tool of freedom to combat the flesh and yield the fruit of the Spirit. + +1. Introduction + + 1. Paul is teaching the Galatians to trust their freedom in the gospel of justification again with several lessons + + 1. Lesson 1) 5:1-6 the stakes are high, they have to choose freedom or slavery, no inbetween + 2. Lesson 2) 5:7-12 their situation is serious, but they can easily recover by adopting the view they previously had + 3. Lesson 3) 5:13-15 freedom is a tool for serving one another in love, but it can be abused or neglected + 2. Lesson 4 today - understand the reason to walk in the Spirit 3. The promise of walking in the Spirit (v16) + + 1. But? - in reference to the last section + + 1. Freedom is powerful tool + + 1. Potential for abuse + 2. Potential for neglect + 3. Potential for great reward + 2. How do we wield is properly? + 2. Notice the action words + + 1. Walk + 2. Not carry out + 3. Application, not thinking only! + 3. The promise is: you will not carry out the deeds of the flesh + 4. Introduces two implied questions_A tantalizing promise! But…_ + + 1. What is walking in the Spirit? + 2. Why does walking in the Spirit work? 5. The reason walking in the Spirit works (v17-24) + + 1. The Spirit fights the flesh (v17) + + 1. Desires that are diametrically opposed to one another_[Glory (movie) - final scene, Union army attacking the fort while Confederate army defends. Their desires were opposed to one another. The Union army desired to chase the Confederates from the fort while the Confederate army desired to stay firmly put. ]_ + 2. Both have the same goal: shape your actions_[Glory (movie) - while both armies had opposing desires, they had the same goal: control of the fort. There was no room for compromise. One or the other was going to prevail. This is what Paul means when he says "that we may not do what we wish." There is no third option (our will), there is only following the flesh or following the Spirit.]_ + 2. The Spirit frees us from the Law (vv18-24) + + 1. Statement of truth (v18) + 2. Deeds of the flesh (vv19-21) + + 1. Observations + + 1. These are _deeds_ of the flesh, things that the desires of the flesh will lead you to do + 2. These are evident, or obvious, "pertaining to being clearly and easily able to be known". + 3. Categories of sin + + 1. Abuse of ourselves (sexual, sensual sins) + 2. Abuse of worship (idolatry, sins toward God) + 3. Abuse of others (relational, sins toward men) + 4. Abuse of things (alcohol, drugs) + 5. Encompass all aspects of life + 2. Consequences, "Those who practice such things" + + 1. Perhaps three ways to interpret + + 1. These are things unbelievers do, so don’t be associated with them + 2. There is real danger, as a believer, of practicing these things and losing reward + 3. Or, those who practice such things, claiming to be a believer or not, prove they are not + 2. I favor #2 - real danger for believers + + 1. It explains why Paul is warning them (and why this was not the only time!) + 2. 1 Cor. 3:15 + 3. Fruit of the Spirit (vv22-23) + + 1. Categories + + 1. Upward (gifts from God) + + 1. Love: Romans 5:5 + 2. Joy: John 15:11 + 3. Peace: John 14:27 + 2. Outward (patience, kindness, goodness) + 3. Inward (faithfulness, gentleness, self-control) + 4. These are developed in YOU as you walk in the Spirit. Walking in the Spirit does not necessarily produce fruit in others. + 2. Fruit belongs to the Spirit, these are not works + + The contrast between works and fruit is important. A machine in a factory works, and turns out a product, but it could never manufacture fruit. Fruit must grow out of life, and, in the case of the believer, it is the life of the Spirit (Gal. 5:25). When you think of “works” you think of effort, labor, strain, and toil; when you think of “fruit” you think of beauty, quietness, the unfolding of life. The flesh produces “dead works” (Heb. 9:14), but the Spirit produces living fruit. And this fruit has in it the seed for still more fruit (Gen. 1:11). Love begets more love! Joy helps to produce more joy! + + + + Wiersbe, W. W. (1996). The Bible exposition commentary (Vol. 1, p. 719). Wheaton, IL: Victor Books. + + 6. There is no Law against these things + + 1. Explanation of first statement in v18 + 2. The Spirit leads us to bear this fruit + 3. The Law identifies sinfulness of the fleshly deeds + 4. But the fruit is the exact opposite of the deeds. + + 1. You can't be loving and jealous + 2. You can't be peaceful and full of strife + 3. You can't be joyful amidst outbursts of anger + 5. Therefore, you don't need to be under the Law to avoid the sins of the flesh--following the Spirit will exclude these sins_[Illustration: imagine you've been placed in a dark room, no lights on. Then you hear a voice telling you, "Don't run into the sofa, don't step on the kids' toys, don't trip over that chair. Now, make your way to the door." This is what it's like to be under the Law. To be led by the Spirit would be like have a lighted path shine in the room, guiding your right the door (think of airplane emergency lights). With the right path perfectly visible, you don't need "the Law" to tell you all the things you avoid--you know you'll be in danger of hitting them if you stray from the lighted path.]_ + 4. Consider the flesh as crucified + + 1. Not dead yet (still makes its presence known) + 2. Sure to die (conquered, no power) 7. Summary statement (vv25-26) + + 1. We were made alive by the Spirit (salvation) + 2. We must not walk in the same way + + 1. "Walk" not the same word as in v16 + 2. "Keep in step", "follow", military connotation of walking in rank and file + 3. We joined this army by the recruitment of the Spirit, we are going to succeed only by continuing to follow that same Spirit + 3. Not giving into the fleshly desires +8. The meaning of walking in the Spirit + + 1. Paul didn't define it + + 1. He told us why it works, but not what it is + 2. Galatians already had experienced walking by the Spirit (Gal. 3:1-5) + 3. Paul didn't need to define it for the Galatians + 2. What it means + + 1. One thing may be obvious: operate within the fruit of the Spirit + + 1. Love + 2. Be joyful + 3. Be at peace + 4. Be patient, kind, good, faithful, gentle and full of self-control + 5. We usually know when we've not been loving or kind or gentle + 2. But…? + + 1. What if we don't know how to be loving? (someone who's dealing with sickness) + 2. What if being loving will not result in peace? (confronting someone's sin) + 3. What if two fruits seem to conflict? (Jesus cleaning out the temple--not gentle, but faithful) + 3. How Jesus presented the Spirit to the disciples + + 1. John 14:16-17 + 2. John 14:26 + 3. John 15:26 + 4. John 16:7-15 + 5. Truth is the Spirit's primary objective, even revealing things Jesus was not able to reveal to His disciples + 6. It seems many traditional habits are exactly what enable us to be walking in the Spirit--reading Scripture, going to church, praying, fellowship + 3. Can the Spirit lead through hunches, nudges and feelings? + + 1. Of course, but we should be careful + + _[Dad's hunch to look for a German tutor again]_ + + 3. When we "feel" led + + 1. Pray + 2. Search the Scriptures + 3. Ask more mature believers for advice + 4. Don't _only_ trust our feelings + + +9. Conclusion + + 1. Paul gives us + + 1. What walking by the Spirit promises: victory over the flesh + 2. The reason walking in the Spirit works + + 1. It fights the flesh by having the opposite desires + 2. It frees us from the law by leading us in the fruit of the Spirit + 2. Our application is then to let the Spirit teach us how to walk through truth and let Him produce His fruit in us \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2018.05.06 Galatians 61-5.md b/OneNote/Ben's Notebook/Messages/2018.05.06 Galatians 61-5.md new file mode 100644 index 0000000..cc75487 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2018.05.06 Galatians 61-5.md @@ -0,0 +1,138 @@ +Lesson 5: Be humble (6:1-5) + +**Rhetorical theme**: Be humble. + +**Full theme**: We must be humble as we walk in the freedom that we have in the Spirit. + +1. Introduction + + 1. Before starting let's take a quick refresher + + 1. Chapters 1-2: Paul defends the source of the gospel - from God, not men + 2. Chapters 3-5: Paul defends the truth of the gospel - it has been God's way from the start + 3. Chapter 5: Paul teaches the Galatians how to walk in the freedom of the gospel + + 1. The stakes are high: they must understand that the only alternative to freedom is total slavery + 2. Their situation is serious: they must understand how they departed from freedom and how to get back + 3. Freedom is a tool: they must understand that freedom is tool used to lovingly serve others + 4. Walk by the Spirit: they must understand that the only way to wield the tool of freedom is to walk by the Spirit + 2. Now Paul turns to some very practical lessons is using freedom--what it looks like to walk by the Spirit + 3. [Read 6:1-5] 3. In dealing with sin (v1) + + 1. Observations + + 1. "Caught" - "learn something by surprise" + + 1. Not an intentional sin + 2. Who does the catching? + + 1. Most likely the brother himself + 2. Notice, it does not say "when you are spiritual catch a brother by surprise in his sin" + 3. Does to be implied that we are not to be on the prowl for other believers sinning. If it catches the brother himself by surprise, so to say, then it ought to surprise us too. + 2. "You who are spiritual" + + 1. A mature believer, walking in the Spirit: 1 Cor. 2:14-15, 3:1-3 + 2. Probably not usually a task a young believer should take on + 3. Emphasized by the next observation…he must know how to watch out himself + 3. "Restore" + + 1. Definition: set a broken bone, mending fish nets + 2. Connection to the body of Christ - mending a member + 4. "Looking to yourself" + + 1. Not "I'm doing better than you so let me help you figure it out" + 2. Humility to recognize that we can also be overtaken by sin in the same way + 2. What it does _not_ look like: John 8:3–5 + + 1. It seems they may have set a trap + 2. They publically shamed the woman--not gentle at all + 3. No interest in restoration, the woman was just a tool to trap Jesus + 3. _[Dad dealing with Horst in the fallout of his sin]_ 5. In bearing one another's burdens (v2) + + 1. Observations + + 1. "Burdens": _baros,_ a burden too heavy for one man to carry, "hardship which is regarded as particularly burdensome and exhausting" + 2. "The law of Christ": John 13:34, 15:12 + 3. The context + + 1. Bearing the fallout from sin with a brother + 2. Application not only in the context of sin: Rom. 15:1 + 2. In contrast to legalists: Matt. 23:2-4 + 3. _[Ada dying: entire family and chapel rallied around us, Joel and Annette cancelled vacation and stayed with us, Dad came home early from Austria and helped with funeral arrangements, everyone came the funeral]_ + 4. _Transition:_ + + 1. The spiritual person (the one walking by the spirit) looks for others who have a burden that needs help in carrying and comes alongside them + 2. The legalist looks for someone else to bury under a burden so that, in comparison, he looks righteous, this is what Paul warns of next: the spiritual one will avoid this legalistic tendency if he is humble in his view of himself +6. In our view of ourselves (v3) + + 1. Definitions + + 1. Humble: "not proud or haughty: not arrogant or assertive" + 2. Proud: "having or displaying excessive self-esteem" + 3. Arrogant: "exaggerating or disposed to exaggerate one's own worth or importance often by an overbearing manner" + 4. Notice the words "excessive" and "exaggerate" + 5. So: not being proud or arrogant means having the _right_ amount of self-esteem and the _right_ understanding of one's worth or importance + 6. Not: seeing one's self as worthless or good-for-nothing + 2. Think of ourselves with sound judgement: Rom. 12:3 + 3. NLT has a nice interpretation: "If you think you are too important to help someone, you are only fooling yourself. You are not that important." + 4. _[Melissa from our NKC Bible study a few years ago: she came late one time because she had needed to stop by QuikTrip first. While there, she saw a woman sitting outside against the building who was obviously strung out on drugs. Instead of passing her by, she took her into her car and drove her all the way down south to a rehab facility of some kind to get her help.]_ + + +7. In examining works (vv4-5) + + 1. Observations + + 1. "Examine" + + 1. "try to learn the genuineness of something by examination and testing" + 2. Same word as in 1 Cor. 11:28 -- one of the aspects of the breaking of bread + 2. "Own work" - not another's work + 3. "Reason for boasting" + + 1. Other translations + + 1. NKJV - "rejoicing" + 2. NLT - "the satisfaction of a job well done" + 2. Not something bad + + 1. Phil. 1:26 "proud confidence" + 2. 2 Cor. 9:3 "boasting" about them + 3. Heb. 3:6 "boast of our hope" + 4. "In regard to another" + + 1. Not to compare ourselves to others + 2. Rather, compare our works to God's asking of us--have we done well? Are we walking in the Spirit? + 5. "will bear his own load" + + 1. The reason why to examine our own work + 2. "Will" is future tense + 3. "Load" + + 1. Not the same word as in v2 + 2. Used of a pack for marching soldiers, ship cargo, etc + 3. A bearable, measured, appropriate load--something we can and should bear + 4. Several different takes on this in commentaries + 5. Future judgment for the believer + + 1. 1 Cor. 3:10-15 + 2. Romans 14:10-13 - very similar context + 2. Bearing each other's loads does not give us a free pass to be easy on ourselves + 3. It is the opposite of what a legalist does + + 1. He does not honestly evaluate his own works + 2. He concentrates on primarily examining the work of others so that he can feel righteous in comparison 9. Conclusion + + 1. We are to: + + 1. Be humble in dealing with sin + 2. Be humble in bearing one another's burdens + 3. Be humble in our view of ourselves + 4. Be humble in examining our own works + 2. Paul continues his last third of the letter with his fifth lesson on the freedom of the gospel of justification by faith + 3. Simply put, Paul is admonishing the Galatians to walk in humility: this is a key component to walking by the Spirit + 4. He uses dealing with sin as a his example, it highlights the differences between legalists and those who walk by the Spirit + + +Bible Chapel of Shawnee +May 6th, 2018 +Galatians series \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2018.07.29 Galatians 66-10.md b/OneNote/Ben's Notebook/Messages/2018.07.29 Galatians 66-10.md new file mode 100644 index 0000000..f99ade4 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2018.07.29 Galatians 66-10.md @@ -0,0 +1,149 @@ +Lesson 6: Do Good (6:6-10) + +**Rhetorical theme**: Do good. + +**Full theme**: Walking in freedom means doing good in very practical ways. + +1. Introduction + + 1. Paul is concluding his letter to the Galatians with encouragement to walk by the Spirit--that is, to have confidence in the freedom of the gospel of justification by faith. + + 1. Chapter 5 - described that freedom and how walking by the Spirit accomplishes it + 2. Chapter 6 - practical lessons in walking in freedom + 3. 6:1-5 last time - the first practical, to be humble + 4. 6:6-10 this time - second practical lesson, do good + 2. [Read 6:6-10] + + +2. Do good…to our teachers (v6) + + 1. Two questions + + 1. Why does Paul bring this up specifically here? + + 1. Transition from previous section -- an example of sharing burdens + 2. Useful in overall context + + 1. Galatians had believed these teachers + 2. When we pay for something we value it more + 3. Perhaps this mindset is intended to encourage better scrutiny of teaching + 2. Is this really how it's supposed to be, that we trade material things for spiritual things? + + 1. Lots of support from other Scripture + 2. Matt. 10:9-10, Luke 10:4-7 + + 1. Sending of the 12 (Matt.) and 70 (Luke) + 2. No money, no bag, no shoes + 3. Eat and drink what is given + 4. A worker is worthy of his wages + 5. Not going to offer carpentry services, going out to preach the kingdom, heal the sick + 3. Rom. 15:26-27 - Gentiles indebted to share material things, having received spiritual things + 4. 1 Cor 9:6-14 + + 1. Paul defends his and others' right to reap material benefit from sowing spiritual things + 2. Refers to Jesus' words + 3. Refers to OT + 2. Application + + 1. For teachers + + 1. Expect a return? + + 1. I can't imagine preparing for a message with the expectation of being recompensed + 2. Motivation would be polluted + 3. Risk of skewing a message to please instead of being faithful to the Lord + 2. Adopt Paul's attitude - [Read rest of 1 Cor. 9:14-18] + + 1. Did not make use of his right + 2. Not expecting it either + 3. Looking to God's reward + 4. Offer teaching without charge + 5. A goal of winning more to the truth + 2. For the one being taught + + 1. Remember -- all kinds of teachers, not just ones standing up front + 2. Remember that teachers are worthy of a wage + 3. Don't take their work for granted--it's difficult_[Whit Merrifield interview about his approach to hitting]_ + 4. Proactively think of ways to share good things with them + + 1. Definitely not always material things + + 1. Not all teachers need or want that kind of return + 2. We have a different context today + + 1. Seems easier to imagine teachers needing to give up wage earning time back then or in other nations + 2. We are a rich nation with lots of free time + 2. Is he sacrificing regular wage-earning time to teach you? + 3. Is he traveling to teach you? + 4. Is he financially completely fine but could always use encouragement?_[I heard the story of someone here at the chapel who decided to give his former Sunday school teacher a hug every Sunday because he loved her lessons so much. I heard this meant quite a bit to the former teacher.]_ +3. Do good…to reap eternal life (v7-8) + + 1. Paul is getting at the motivation behind doing good + 2. Foundational rules of how God made the world to work -- you can't escape the way God created the relationship between actions and consequences. + 3. This has been observed from ancient times: Job 4:7-9 + + 1. Eliphaz was false to assert this of Job + 2. He confused suffering with the consequences of sin + 4. Still true today_[Tiger Woods: confession in press statement (2010)___ + + _I knew my actions were wrong. But I convinced myself that normal rules didn't apply. I never thought about who I was hurting. Instead, I thought only about myself. I ran straight through the boundaries that a married couple should live by. I thought I could get away with whatever I wanted to. I felt that I had worked hard my entire life and deserved to enjoy all the temptations around me. I felt I was entitled. Thanks to money and fame, I didn't have far -- didn't have to go far to find them._ + + + + _I was wrong. I was foolish. I don't get to play by different rules. The same boundaries that apply to everyone apply to me. I brought this shame on myself. I hurt my wife, my kids, my mother, my wife's family, my friends, my foundation, and kids all around the world who admired me.]_ + + 8. Not just a warning or all negative: what a wonderful that sowing to the Spirit reaps something so good as eternal life! + + 1. John 17:3 - As we walk in the Spirit, we come to know God more + 2. 1 John 1:2 - eternal life was made manifest to them: Jesus + 3. The fruits of the Spirit manifested in us +4. Do good…with perseverance (v9) + + 1. Paul acknowledges that doing good can become wearisome + 2. The simple encouragement is that God is faithful: we _will_ reap in due time + + 1. Like real farming, reaping is not immediate + + 1. We must plant + 2. We must water + 3. We must weed + 4. We must wait + 2. Unlike real farming + + 1. No single harvest time when we can expect to reap + 2. Only God knows when the harvest is due + 3. Do we trust God in this way? +5. Do good…with a sense of urgency and priority (v10) + + 1. A sense of urgency + + 1. Eschatological sense + + 1. Christ is coming + 2. We have a limited time on earth to do His work + 2. Historical/broad sense + + 1. While we have peace and prosperity + 2. Jews during WWII -- their capacity to do good was severely diminished + 3. Our years are limited! + 3. Specific sense + + 1. People come and go in and out of our lives, we have a limited time to affect them + 2. Our children grow up and our influence decreases + 2. A priority + + 1. Our fellow believers take priority + 2. But our focus should not _only_ be on believers + 3. Our resources can be limited - give to believers first_[Easy to illustrate with our own families. Most of us seem to intuitively know that if we do good for all sorts of people, but neglect our own wives, husbands and kids, we're doing damage and we're out of balance.]_ 7. Conclusion + + 1. Paul's points + + 1. Do good…to our teachers + 2. Do good…to reap eternal life + 3. Do good…with perseverance + 4. Do good…with a sense of urgency and priority + 2. If you want a simple challenge to apply this passage: go home and write down the names of 3 or 4 people who have taught you spiritual truths. Once you've got those names, think of a good thing you can do for them. Send them a card, a check, call them on the phone, give them a hug the next time you see them, go mow their lawn or clean their windows. Tell them you're thankful for their investment in you. + +Bible Chapel of Shawnee +July 29th, 2018 +Galatians series \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2018.10.21 Galatians 611-18.md b/OneNote/Ben's Notebook/Messages/2018.10.21 Galatians 611-18.md new file mode 100644 index 0000000..b4bdd3f --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2018.10.21 Galatians 611-18.md @@ -0,0 +1,165 @@ +Bible Chapel of Shawnee +October 21st, 2018 +Galatians series + +Lesson 7: Be Honest (6:11-18) + +**Rhetorical theme**: Be Honest + +**Full theme**: Being honest in the truth is how we stay the course in the freedom of righteousness by faith. + +1. Introduction + + 1. Paul is concluding his letter to the Galatians with encouragement to walk by the Spirit--that is, to have confidence in the freedom of the gospel of justification by faith. + + 1. Chapter 5 - described that freedom and how walking by the Spirit accomplishes it + 2. Chapter 6 - practical lessons in walking in freedom + + 1. 6:1-5 - the first practical, **be humble** + + 1. Be humble in dealing with sin + 2. Be humble in bearing one another's burdens + 3. Be humble in our view of ourselves + 4. Be humble in examining our own works + 2. 6:6-10 - second practical lesson, **do good** + + 1. Do good…to our teachers + 2. Do good…to reap eternal life + 3. Do good…with perseverance + 4. Do good…with a sense of urgency and priority + 3. 6:11-18 - this time, **be honest** + 2. [Read 6:11-18] + 3. Outline + + 1. Who You Should Not Trust (those guys) + 2. Who You Should Trust (this guy) + 3. How You Can Tell the Difference (you guys) + + +2. Pay attention (v11) + + 1. Observations + + 1. Using large letters (11a) + 2. This is a personal greeting (11b) + 2. Two views + + 1. Paul has vision problems + + 1. 2 Cor. 12:7 - Thorn in the flesh + 2. 2 Thess. 3:17 - distinguishing mark + 2. Paul was writing in all-caps for emphasis + 3. Either way, safe to say, Paul is calling attention to this last section + + 1. If Paul had vision problems + + 1. Might be embarrassing to write in large letters (like a child?) + 2. Might take extra effort + 2. If Paul is writing in all-caps: same reasons we might do that today--it's hard to miss! 4. Who You Should Not Trust (those guys) (v12-13) + + 1. Characteristics + + 1. Want to impress in the flesh (12a) + 2. Want to avoid persecution associated with the cross of Christ (12c) + 3. Are teaching for their _own_ gain, not the Galatians' + 4. Do not keep the Law (13a) + 5. Have selfish motives for wanting others circumcised (13b) + 2. Conclusion: they're false, they're not being honest about + + 1. Their teaching + + 1. Compel them to circumcision for righteousness + 2. Can't even keep the law themselves + 2. Their motives + + 1. Not for the Galatians' good + 2. To escape persecution + 3. To boast in the numbers following them + 3. Themselves + + 1. Saying righteousness comes through the Law + 2. Can't keep the law themselves + 4. Like the Pharisees that Jesus condemned: Matt. 23:27-28 + 3. Application + + 1. Are we in danger of following such men? + + 1. So many followed the Pharisees + 2. The Galatians were being led astray + 3. We are in danger + 2. But we have this book and Paul's warning, let's ask ourselves a few questions + + 1. Does he honestly speaks of his need for the cross? + 2. Is he willing to suffer for the truth or does he avoid it? + 3. Is he the one benefiting from his teaching or are those he's teaching? + 4. What do his motives look like? Self-sacrificial or selfish? 6. Who You Should Trust (this guy) (v14-15) + + 1. Characteristics + + 1. Refuses to boast in anything for righteousness but the cross of Christ (14a) + 2. Knows the cross is the end of any means of righteousness in the world for him (14b) + 3. Knows the cross is the end of the world ever considering him righteous (14c) + 4. Knows the only thing the matters for righteousness is the new creation (15) + + 1. 2 Cor. 5:17-21 + 2. All who are in Christ + 3. It is God's work + 4. By it we become the righteousness of God + 2. Conclusion: he's real, he's honest about his righteousness + + 1. He had so many credentials to rely on: Phil. 3:2-6 + 2. He knew he needed the cross--it was his only means of righteousness + 3. He knew his righteousness was 100% the new creation of the Lord + 3. Application + + 1. No accident that Paul resembles Christ + + 1. He suffered for us + 2. He lived what He taught + 3. His concern was for us + 4. We benefitted from Him + 2. Can we find people like this today? + 3. Are we people 8. How You Can Tell The Difference (you guys) (v16-18) + + 1. Should go forward walking by this simple rule: the new creation is all that matters (16) + + 1. …when it comes to righteousness + 2. Future tense: there is hope for the Galatians + 3. Be honest considering others: are they a new creation or not? + 4. Be honest considering ourselves: we're only righteous because of God's work! + 2. Should stop causing me trouble (17) + + 1. One final bit of proof about who to trust + 2. Contrast to the false teacher + + 1. False teachers wanted to mark the Galatians' bodies for their own gain + 2. Paul was willing to have his body marked for the Galatians' gain + 3. Paul bore the visible proof of his service to Christ on his own body, it was time to stop doubting him + 4. Who can we trust? + + 1. Determining who we should trust can be impossible by what each person is telling us + 2. Paul gives us the key: the proof is in the pudding. Who is _living_ out what they are teaching?_[My story of situation where I didn't know who to trust. The actions of the one were to accuse the other and attempt to destroy his reputation in his church and further, never admitting any failure.______The actions of the other were to seek wise council, strive for Biblical accuracy (even publicly admitting when he had failed in this) and seek reconciliation and repair of the damage done. Once I thought of things in these terms, it was easy to know whose story to trust.]_ + 3. Are still my brothers in Christ (18) + + 1. Called them brethren throughout the book + 2. Unique greeting among Paul's writings + 3. Paul's heart: truly _for_ them + + 1. Enduring lesson of this book: our hearts should be for the restoration of our brothers, not their rejection, not doubting their salvation + 2. Debate about others being in Christ? + + 1. Paul never once doubts this for the Galatians + 2. 2 Cor. 13:5 - Paul calls on them to examine _themselves_, not for him to come examine them + 4. Application: trust those who sacrificially love us. +9. Conclusion + + 1. Being honest in the truth is how we stay the course in the freedom of righteousness by faith. + 2. We can avoid false teaching (and teachers) by examining their honesty + + 1. Are they honest in their need for the cross? + 2. Are they honest in living out their teaching? + 3. Are they honest in their care for us? + 3. We can avoid straying ourselves by examining our honesty + + 1. Be honest about our need for the cross + 2. Don't hide behind any false means of righteousness (through worldly/fleshly means) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2018.11.18 Galatians 1-6 - Final Message.md b/OneNote/Ben's Notebook/Messages/2018.11.18 Galatians 1-6 - Final Message.md new file mode 100644 index 0000000..0079c16 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2018.11.18 Galatians 1-6 - Final Message.md @@ -0,0 +1,187 @@ +Bible Chapel of Shawnee +November 18th, 2018 +Galatians series + +Big Lessons: Lessons from the book as a whole + +**Rhetorical theme**: Lessons from the whole book. + +**Full theme**: Viewed as a whole, the book of Galatians gives us some rich, practical lessons. + +1. Introduction + + 1. Final message on Galatians + 2. What can we take away from the book as a whole? + 3. Paul has three big lessons: + + 1. You can trust the source of the gospel of justification by faith: it comes directly from God + 2. You can trust in the truth of the gospel of justification by faith: there are many proofs, going back all the way to Abraham + 3. You can trust in the freedom the gospel of justification by faith gives you: you wield with love by walking in the Spirit + 4. Through-out the book, several things stood out to me + + 1. Some obvious and directly stated + 2. Some between the lines, by viewing the book all together + 5. My hope + + 1. You have some of your own you've learned through our study + 2. Here are some of mine 3. Lesson 1 - It can happen to us + + 1. It should never have happened to the Galatians + + 1. They were steadfast believers + + 1. Called a church (1:2) + 2. Called brethren 9 times (1:11, 3:15, 4:12, 4:28, 4:31, 5:11, 5:13, 6:1, 6:18) + 3. Called children of promise (4:28,31) + 4. Abandoning the gospel (must have been in it) (1:6) + 5. Received the Spirit (3:2) + 6. Suffered for the faith (3:4) + 7. Know/known by God (4:9) + 8. Consequences of taking on circumcision indicate they are in Christ now (5:4) + 9. Were running well (5:7) + 2. They had Paul + + 1. He preached the gospel to them (1:8) + 2. He cared for them like children (4:19) + 3. They experienced the power of the Gospel (3:5) + 2. So how did it happen? + + 1. Paul himself not exactly sure (1:6, 4:20) + 2. They listened to false teachers (4:17, 5:10) + 3. Practical application + + 1. Galatians fell, despite many advantages + 2. It is worth examining ourselves for temptation that we might succumb to an go into legalism + + 1. Desire for a measure for comparison + 2. Fear we're failing, so false reassurance + 3. Learn discern false from true teachers (6:12) + 4. Key difference: what do they do with Christ? + + 1. Like major religions + 2. Christ their only boast? + 3. Christ their primary shame? + + +4. Lesson 2 - God has always justified by faith + + 1. To say this, we must know: + + 1. God justified by faith at the beginning + 2. God never changed His methods + 3. God still does today + 2. These 3 are exactly the proofs chapter 3 gives us + 3. The beginning: Abraham (3:6) + + 1. Genesis in two parts + + 1. 1-11: how rebelling leads to death (all the earth) + 2. 12-50: how God will save (one man's family--Abraham) + 2. Abraham, father of all those justified by faith + 4. Never changed: God's promise cannot be undone (3:15-18) + 5. Still today: belonging to Christ makes you an heir of Abraham's promises (3:29) + 6. Practical application + + 1. Ever been confused by difficult Scriptures? + + 1. Rich young ruler - Matt 19:16 + 2. Live by the Law? - Lev 18:5 - help us pick up the nuance of the requirement of _doing_ all of the Law + 2. Helps to prevent misusing frameworks: dispensationalism (don't go into hyper-dispensationalism) + + +5. Lesson 3 - The purpose of the Law + + 1. My main goal in wanting to study Galatians--how does the Law relate to us today? + 2. Clear what it is not intended to do + + 1. Never to justify (2:16, 3:11) + 2. Never to give life (3:21) + 3. Clear what it IS intended to do + + 1. Reveal sin (3:19) + 2. Point us to Christ (3:22-24) + 4. Practical application + + 1. Parts of the Law + + 1. Sacrificial/ceremonial - out because of Christ + 2. Temple operations - no temple + 3. Civil - we're not Israel + 4. Moral/ten commandments - point us to Christ + 2. Remind us of our need for Christ + 3. Show others their shortcoming before God's righteousness, to lead them to Christ (1 Tim. 1:8-9) + 4. Great example: Ray Comfort's method + + +6. Lesson 4 - Walking in the Spirit produces His fruit + + 1. Hard concept for me grasp--what does it mean to walk in the Spirit? + 2. Two things clear + + 1. No list of deeds that make up "walking by the Spirit" + + 1. Except…it's not the deeds of the flesh (5:16) + 2. The deeds of the flesh are evident, the deeds of the Spirit are not? (5:19) + 2. It will produce the fruit of the Spirit (5:22-24) + + 1. Not necessarily the deeds of the Spirit + 2. The fruit the Spirit produces in us as we walk in Him + 3. Practical application + + 1. Evaluate past actions - did it produce the fruit of the Spirit in me? + 2. Choose future actions - what, most likely, will produce the fruit of the Spirit? + + 1. Know His word (we can't predict the future) + 2. Trust His commandments are right + + +7. Lesson 5 - Pursue those who are straying + + 1. Paul's example of pursuing the Galatians + 2. Observations of how Paul went about it + + 1. Took the time + + 1. Not as easy to write a letter and deliver it as it is today + 2. Long letter + 3. Lots of explanation + 4. Lots of doctrine + 5. Lots of thought + 2. Direct with the truth + + 1. Abandoning the gospel (1:6) + 2. Behaving is foolish (3:1) + 3. Blunt with the consequences (5:2-5) + 3. Explains Scriptural truth (chapters 3 and 4) + 4. Explains practical application (chapters 5 and 6) + 5. Reminds them of their close relationship + + 1. How they met (4:12-18) + 2. Calls them his children (4:19) + 3. Wants to be with them (4:20) + 4. Calls them brethren throughout and up to the end (6:18) + 3. Practical application + + 1. Need to be close to people--personal relationships + + 1. Time + 2. Willingness to attach + 2. Need to have a firm grasp on wielding Scripture to use is accurately, gently and lovingly + 3. Need to take the time to go after people + + +8. Conclusion + + 1. Wonderful summarizing (in my mind) thought from Warren Wiersbe: + + The contrast between works and fruit is important. A machine in a factory works, and turns out a product, but it could never manufacture fruit. Fruit must grow out of life, and, in the case of the believer, it is the life of the Spirit (Gal. 5:25). When you think of “works” you think of effort, labor, strain, and toil; when you think of “fruit” you think of beauty, quietness, the unfolding of life. The flesh produces “dead works” (Heb. 9:14), but the Spirit produces living fruit. And this fruit has in it the seed for still more fruit (Gen. 1:11). Love begets more love! Joy helps to produce more joy! + + + + Wiersbe, W. W. (1996). The Bible exposition commentary (Vol. 1, p. 719). Wheaton, IL: Victor Books. + + + 6. If we want living fruit to grow and multiply in our lives, we'll take the lessons of Galatians to heart: + + 1. Spurning the temptation to measure our righteousness + 2. Embracing the act of faith of walking in the Spirit \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2019.01.27 Bartimaeus healed (Mark 1046-52, Luke 1835-43).md b/OneNote/Ben's Notebook/Messages/2019.01.27 Bartimaeus healed (Mark 1046-52, Luke 1835-43).md new file mode 100644 index 0000000..38898e3 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2019.01.27 Bartimaeus healed (Mark 1046-52, Luke 1835-43).md @@ -0,0 +1,156 @@ +Blind Bartimaeus: Persistence toward God + +**Rhetorical theme**: Persistence in prayer toward God reveals the quality of our faith in Him. + +**Full theme**: Persistence reveals faith + +1. Introduction + + 1. _[Read Mark 10:46-52]_ + 2. Two requests of Jesus + + 1. Same phrase, "What do you want me to do for you?" + 2. Approaches + + 1. Very different + 2. James and John came demanding something in selfish ambition + 3. Bartimaeus came begging mercy + 3. Response from Jesus is the same + 4. Questions asked are similar + + 1. Wanting something only Jesus could give + 2. Wanting something for themselves + 5. Outcomes were different + + 1. Jesus unable to give His left and right seats away + 2. Bartimaeus given his sight + 3. More similarities in how Jesus responds: + + 1. With grace + 2. With kindness + 3. With some explanation + 3. Somewhat of a theme in these two stories: how we interact with the Lord and why He may respond in the way he does + 4. How we approach God reveals the quality of our faith + + 1. In James and John, their manner of approaching Jesus revealed their ambition + 2. In Bartimaeus, his manner of approaching Jesus revealed a faith unto salvation + 3. One particular aspect is highlighted: persistence 3. What does persistence look like? + + 1. **Persistence shown by Bartimaeus** + + 1. Manner of his calling out + + 1. As soon as Jesus was near (v47)_He begin crying out as soon as he heard Jesus was the one passing by.___ + 2. Loud, obnoxious calling out (v47, krazo) + + _κράζω is a word like “croak,” It uses kr + vowel + guttural to suggest a rough or raucous sound. It is based on the croaking of ravens.1 The meaning is a. “to croak or cry with a loud and raucous voice_ + + + + _Grundmann, W. (1964–). κράζω, ἀνακράζω, κραυγή, κραυγάζω. G. Kittel, G. W. Bromiley, & G. Friedrich (Eds.), Theological dictionary of the New Testament (electronic ed., Vol. 3, p. 898). Grand Rapids, MI: Eerdmans._ + + + 7. Continual calling out (v47 "began to cry"; v48 "kept crying out", "all the more")_The verbs indicate ongoing action, not a one-time action._ + + 9. Despite resistance (v48)_He continued calling despite many sternly telling him to be quiet._ + + 11. With undiminishing hope (v50)_He was ready and expecting when Jesus called him (not surprised he was finally answered)._ + + + 2. Content of his calling out + + 1. "Jesus" - knew Jesus + 2. "Son of David" - knew His heritage + 3. "Have mercy on me" - knew his own need + + + _[Transition: why did Bartimaeus have to show such persistence to get Jesus' attention? Why is it so highlighted in this story?____Was it just happenstance in this instance?_ + _Or, is this something expected of us too?]_ + + + + 2. **Persistence encouraged by Christ** + + 1. Luke 11:5-13 - two parables + + 1. Neighbor needing bread: persistence is rewarded + 2. Son asking for a fish or egg: when good is asked, evil is not given! + 2. Luke 18:1-8 + + 1. Purpose: pray at all times, not lose heart + 2. Conclusion: if even an unrighteous judge is moved by persistence, how much more will our righteous God and Father + + + _[Transition: why does Jesus teach such persistence?____What's the purpose of it?_ + _It's one of the more confusing aspects of the Christian life to me. Are we annoying God into doing something for us? Is He testing us to see if we stick with it?____Jesus tells Bartimaeus: "Your faith has made you well."_ + _Jesus asked, "will He find faith on earth?"._ + _I think this the key to the purpose and effect of persistence. It is a matter of faith.]_ + + + +4. How does persistence reveal faith? + + 1. **How did Bartimaeus show faith?** + + 1. Jesus said, "Your faith has made you well". + 2. We saw in Bartimaeus + + 1. Persistence + 2. Virgo + 3. Expectation + 4. Hope + 3. What does this tell us about what was going on in his head? + + 1. Jesus' authority: He believed Jesus could grant him mercy + 2. Jesus' compassion: He believed Jesus would not reject his call + 3. Jesus' power: He believed Jesus could heal his blindness + 4. Jesus' trustworthiness: He believe Jesus would not trick him + 2. **Why might God have us wait and show persistence?** + + 1. The biggest reason: we don't know the big picture + + 1. We simply can't see how it all fits together + 2. God can see all of it and knows the right timing to give an answer + 3. Look at Christ's genealogy + + 1. What happened because Abraham and Sarah couldn't wait for a baby? + + 1. Turmoil in the family + 2. Ishmael born and from him a people that have continually been at odds with Israel + 2. What if Rahab doesn't believe the two spies and leaves her house during the attack? + 3. What if Ruth doesn't go back with Naomi? + 4. What if Joseph caved to pressure to put Mary away? + 5. God would have worked things another way, but it shows how small, seemingly unrelated events in our lives affect the big picture. + 4. It takes faith to believe this + + 1. Trust that God is doing what is the very best for us and everyone + 2. Trust that temporary (even life-long temporary) suffering may fit best into the whole picture + 2. Test our own conviction of the need + + 1. Ever been convinced you needed something or something needed to happen? But then, when it didn't, over time you realized how unimportant it was? + 2. TV shows for me illustrate the experience + + 1. Have to watch the next episode!! + 2. But when we just go to bed, sometimes I forget we were even watching the series + 3. Or maybe the opposite? As time passed, you realized all the more how important it was to do something--you become more sure it is right. + 3. Practical reasons: Daniel 10:10-14 + + 1. God answers prayers in practical ways: not magic + 2. Gabriel needed to be the one to answer Daniel, but he was delayed, so Daniel had to wait 6. Conclusion + + 1. In Bartimaeus we see his faith revealed in his persistence in calling out to Christ for mercy + 2. What we see revealed is what he truly believed about God + + 1. He is good + 2. He will hear me + 3. He will not turn me away + 4. He will show compassion + 5. He will answer at the right time + 6. He will do me good + + + + +Bible Chapel of Shawnee +January 27th, 2019 +Adult Sunday School \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2019.04.31 Learning to handle emotions.md b/OneNote/Ben's Notebook/Messages/2019.04.31 Learning to handle emotions.md new file mode 100644 index 0000000..6165f94 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2019.04.31 Learning to handle emotions.md @@ -0,0 +1,171 @@ +Bible Chapel of Shawnee +April 31st, 2019 + +Learning to handle emotions + +**Rhetorical theme**: Learning to handle emotions + +**Full theme**: Learning to handle emotions involves telling the Lord, depending on the Lord and remembering the Lord. + +1. Introduction + + 1. Psalm 40:10 + + I have not hidden Your righteousness within my heart; I have spoken of Your faithfulness and Your salvation; I have not concealed Your lovingkindness and Your truth from the great congregation. + + 3. Psalm 66:16Come and hear, all who fear God, And I will tell of what He has done for my soul. + + 5. Some of the story of Ada's death + + 1. Three years ago on March 19th + 2. Born at 32 weeks and died 10 hours later + 3. Sorrow we had never known before + 6. How we read the Psalms afterward + 7. What we noticed as we read + + 1. Emotions freely and frankly expressed + 2. Character of God clearly described + 3. Comfort came a result + 8. Began to understand how to deal with our sorrow + 9. Want to share those encouragements with you +2. Tell the Lord (Psalm 13:1-2)_To deal with our emotions, we must start by telling the Lord.___ + + 1. Psalm 13 + + 1. Fear + 2. Loneliness + 3. Despair + 4. Sorrow + 2. After Ada died + + 1. Deep sorrow + 2. Confusion + + 1. Why would God allow this? + 2. With so much abortion in the world, why would God take a wanted baby? + 3. How is He compassionate and gracious but also allow such heartbreak? + 4. In other words, our emotions were not neat or clean + 5. Are these things you can tell the Lord? + 6. Do we have to sort out our emotions before we come to Him? + 3. Examples + + 1. 1 Kings 19:1-18 Elijah after Carmel - despair, exhaustion, fear + 2. Habakkuk 1 Habakkuk - confusion, anger + 3. Job - injustice, anger + 4. Observations + + 1. Frank, honest with the Lord + 2. They told the Lord even though + + 1. The emotions seemed to betray lack of faith in God + 2. The emotions seemed to be accusations against God + 3. God responded with grace and gentleness + + 1. Elijah + + 1. Provided food + 2. Comfort + 3. Gentle questions + 4. Gracious answers + 2. Habakkuk + + 1. Gentleness + 2. Reassurance of God's character (righteousness) + 3. Job + + 1. A sharp rebuke + 2. But, restoration and forgiveness + 5. We can expect the Lord to be the same with us + + 1. Gentle + 2. Kind + 3. Comforting + 4. Restoring + + +3. Depend on the Lord (Psalm 13:3-4)_When we approach the Lord, it must be with the right attitude of dependence on the Lord.___ + + 1. Psalm 13 + + 1. Call for the Lord to answer + 2. Call for the Lord to enlighten + 3. Call for the Lord to deliver + 2. Examples + + 1. Elijah + + 1. Quite literally put himself in a position where only the Lord could rescue him + + 1. Deep into the wilderness + 2. Servant left behind + 2. Responded to the Lord's questions + 3. Probably no accident that he went to the mountain of the Lord--he sought His presence + 2. Habakkuk + + 1. Calling upon the Lord's righteous character + 2. Standing and watching for an answer from the Lord + 3. Not turning away in his confusion in anger, going to the Lord instead + 3. Job + + 1. Though self-righteous + 2. Seeking out God's judgement + 3. Calling out to God for explanation + 3. Common theme + + 1. Going to God, looking for His answer + 2. Trusting God and His explanation + 3. Trusting God that He will answer + 4. What our attitude must be with one caveat of feelings of doubt: God honors an honest pursuit of truth, even if we feel uncertainty about whether He is the true God + + + _[Transition: Dependence on the Lord is key because it reveals an inner agreement with the truth regardless of how strong they are, our emotions don't tell the whole story. So, there is danger in following the path our emotions lead us down. God is the only one with the whole picture who can contextualize our emotions properly and return us to a right, sober mind.]_ + +4. Remember the Lord (Psalm 13:5-6)_To put our emotions in the right context, we must remember the Lord.___ + + 1. 5a Refresh our knowledge of God's character + + 1. What you can find in the Psalms + + 1. King forever and ever (10:16) + 2. Is righteous, loves righteousness (11:7) + 3. A refuge (14:6) + 4. My rock, fortress, deliverer (18:2) + 5. My shepherd (23:1) + 6. My light, my salvation (27:1) + 7. My strength, my shield (28:7) + 8. Good (34:8) + 9. Against evildoers (34:16) + 10. Sustainer of my soul (54:4) + 11. On and on… + 2. The objective truth: this is who God is + 3. Step of faith: believe it or our emotions? + 2. 5b Remember God's historical works + + 1. God has been consistent in all His actions + 3. 6 Remember God's personal dealings + + 1. God has been consistent personally, in my life +5. Conclusion + + 1. Psalm 18:1-19 + + 1. Read at Ada's funeral + 2. Encapsulated how the Lord comforted us + + 1. He's a refuge and deliverer + 2. He hears us + 3. He answers us and brings comfort swiftly + 2. We saw the Lord put His comforting Word into action through His people + + 1. Grace's parents cancelled vacation, sat with us + 2. Dad cut his Austria trip short, helped me with the funeral + 3. Entire family came for the funeral, including all of Grace's sibling with their spouses and kids + 4. Countless friends brought meals, spoke encouraging words, things I still remember today + 3. Grace's remark in conversation + + 1. Shocking how something so painful can so firmly be behind us + 2. The memories of it are emotion + 3. The pain is healed and we are restored + + +_[Transition: But we have to be careful too, dumping our emotions on the Lord can be done in an unrighteous way.]_ \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2019.05.19 Jesus' Authority Challenged (Matt. 2123-27, Mark 1127-33, Luke 201-8).md b/OneNote/Ben's Notebook/Messages/2019.05.19 Jesus' Authority Challenged (Matt. 2123-27, Mark 1127-33, Luke 201-8).md new file mode 100644 index 0000000..861ea06 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2019.05.19 Jesus' Authority Challenged (Matt. 2123-27, Mark 1127-33, Luke 201-8).md @@ -0,0 +1,178 @@ +Bible Chapel of Shawnee +May 19th, 2019Life of Jesus series + +How to Guarantee You'll Never See the Truth + +**Rhetorical theme**: How to Guarantee You'll Never See the Truth + +**Full theme**: We can guarantee we'll never fully see the truth by maintaining pride and fearing men. + +1. Introduction + + 1. Continue the Life of Christ series + 2. As others have said, getting into the last days and hours of Christ--His last words to some groups of people + 3. Context + + 1. Triumphal entry + 2. Entered the temple and cleaned it out, then went back out of the city + 3. Cursed the fig tree + 4. Re-entered the temple and taught the people + 5. Was confronted by chief priests, elders, Pharisees and Sadduccees + + 1. Questioning His authority + 2. Parable of the two sons + 3. Parable of the landowner + 4. Parable of the marriage feast + 5. Question about tribute to Caesar + 6. Question about resurrection + 7. Question of the greatest commandment + 6. Eight woes: tremendous condemnation of the hypocrisy of the scribes and Pharisees + 7. Leaves the temple + 8. Judas' betrayal, arrest, judgement, sentencing and crucifixion + 4. What starts this final series of challenges is our passage today + + + _Read 21:23-27_ + 3. Why the question? + + 1. From the immediate context + + 1. Recent events might prompt anyone to ask the question + + 1. Triumphal entry + 2. Temple cleansing + 3. Received praise from the people + 2. Religious authorities would need to ask the question + + + _[Illustration: if someone knocked on your door, demanding to come in and search your house, you would have the right to ask the same thing. What authority do you have to search my house? Who gave you this authority? If it turned out the man was a police officer (showing you his badge) you would know he was demanding to search your house by the authority of his position as police officer. If he then showed you search warrant, you would know a judge gave him that authority.]_ + + + + 2. From the broader context + + 1. More to the story, of course + 2. Pharisees, scribes, chief priests so far + + 1. Matt. 9:3 - **accused** Jesus of blaspheming when He forgave the paralytic from his sins + 2. Matt. 9:11 - **questioned** Him eating with tax collectors and sinners + 3. Matt. 9:34, 12:24 - accused Him of casting out demons by the ruler of the demons + 4. Matt. 12:2 - **accused** his disciples of breaking the law of the Sabbath when they picked and ate heads of grain + 5. Matt. 12:14 - **conspired** to destroy Him after He healed the man with the withered hand on the Sabbath + 6. Matt. 12:38, 16:1 - **asked** for a sign (despite all the miracles they personally witnessed) + 7. Matt. 15:1 - **accused** Jesus' disciples of breaking the tradition of the elders when they didn't wash their hands--which may have been their only true accusation + 8. Matt. 19:3 - **tested** Him with a question about divorce + 9. Matt. 21:15 - became **indignant** when they saw what He did upon entering Jerusalem (wonderful things, receiving praise from children) + + + _[Illustration: now our illustration doesn't seem to match the scenario so well. You would be justified to demand the credentials of the man at your door if you didn't know him. But, it would be a completely different story if you knew the man at your door very well. So, to be more accurate in the illustration, we'd have to say that this was the police officer who rescued your cat from a tree last week, caught the man who stole your wife's purse a month ago, pulled you over for speeding yesterday, investigated the break-in of your car last year and waved at your every time he drove by while you were mowing your lawn.]_ + + + + 3. Why the question? + + 1. Clear it was most likely not from good motives + 2. Most likely: undermine Jesus' popularity in the minds of the people + + 1. As in many previous encounters + 2. Setting: Jesus teaching people (people around) + 4. Application + + 1. Most frightening about the religious leaders? + + 1. So deceived and blinded: didn't see their own Messiah + 2. Would they have believed you if you told them they would reject and kill their own Messiah? + 2. Lots of similarities between us and religious leaders + + 1. Have the Scripture + 2. Lots of time has passed since God last spoke + 3. Lots of man-made institutions built up + 3. How do we keep from landing in the same mess? Talk about it with the last point… +_==>_ +_Transition: Seems clear that Jesus would be justified in simply sending them away! Why counter with a question about John? Why not skip right to the woes at the end of ch. 23?_ +_==>_ + 7. Why the response? + + 1. Grace - giving them another chance + + 1. Even though they were not honest + 2. Even though it was His last days/hours to be with His disciples + 3. Religious leaders' last chance to change course + + 1. Chapters 21-23 in the temple, answering questions, teaching + 2. Chapters 24-25 answer disciples questions about end times + 3. Chapters 26-27 last supper, Judas betrays, Jesus goes to the cross + 4. Bringing them back to the beginning: John + + 1. John's ministry was done + 2. The fruit of it could be clearly seen and evaluated + 3. If they could see John truthfully (the forerunner to the Messiah), they would have to conclude Jesus was the Messiah + + + _[Illustration: Let's say you're a math teacher teaching multiplication. Your students challenge you on why they should trust you that this multiplication stuff really works. You might ask them, "Well, your teacher last year taught you addition. Was his teaching correct or not?" If they didn't trust their last teacher who prepared them before you for your class, how would they trust you? Jesus was doing the same thing. John and Jesus' authority came from the same source. John taught the truth, preparing the people for Jesus. If they didn't believe John, why would they believe Him?]_ + + + + 2. Exposing their hypocrisy to themselves + + 1. The way they had to reason with themselves + 2. An opportunity to realize how ridiculous it was that they couldn't honestly answer a simple question that the "simple" people had figured out long ago + 3. Application + + 1. Not be afraid to approach the Lord with honest questions + 2. For dishonest men, He: + + 1. Heard them + 2. Gave them a chance to hear an answer + 3. Gave them an opportunity to honestly reflect on themselves + 3. How much more for an honest man? +_==>_ +_Transition: It was clear to so many people at the time that John was a prophet. And now that some time had past, there was even more opportunity to see the fruits of his ministry and his disciples and see whether his message and baptism was from God or not. So why did they have to reason it out? Why wasn't the answer obvious?_ +_==>_ + 11. Why the reasoning? + + 1. Two halves + + 1. Unwilling to be corrected + 2. Fearful of men + 2. Amazing arrogance + + 1. Jesus says: John's baptism was from heaven + 2. People say: John's a prophet + 3. We say: there's no way we believe John + 3. Why the reasoning? They had no interest in the truth. + + 1. If they had been interested, they could have said either answer + + 1. Heaven or men + 2. Jesus would have answered either way + 2. Would have cost them something + + 1. If from heaven: exposed to have failed to believe John + 2. If from men: lost stature with the people + 3. Wasn't it worth knowing the Messiah? + 4. Application + + 1. Make the simple realization: the religious leaders were hindered from understanding truth because they refused to humble themselves + + 1. See the conversion of John's disciples (tax collectors and prostitutes!), they still refused to believe + 2. Seeing all the miracles of Jesus, they refused to believe He was the Messiah + 3. Given an opportunity to hear truth from Christ, they refused to humble themselves and admit they did not believe John + 2. Be willing to be perceived as foolish by some when we are confronted with having been wrong 13. Conclusion + + 1. Beginning of a series of challenges and tests + 2. Looked at three questions about the passage + + 1. Why the question? + 2. Why the response? + 3. Why the reasoning? + 3. We saw: + + 1. The blindness of the religious leaders, refusing to recognize their Messiah right before them + 2. The grace of the Lord to offer one last avenue of opportunity to believe, change course + 3. The true motive of the religious leaders + + 1. Maintain their pride + 2. Maintain their standing among men + 4. Which lead to the truth being hidden from them + 4. We can be challenged to always be willing be humbled or risk the same fate of never perceiving the truth \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2019.06.23 When To Keep Silent.md b/OneNote/Ben's Notebook/Messages/2019.06.23 When To Keep Silent.md new file mode 100644 index 0000000..d668cbd --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2019.06.23 When To Keep Silent.md @@ -0,0 +1,156 @@ +Bible Chapel of Shawnee +June 23rd, 2019 + +**Rhetorical theme**: When to keep silent + +**Full theme**: There are times when it is better to keep silent with what we know. + +1. Introduction + + 1. In Scripture and probably in our experience, the tongue is dangerous tool + + 1. James 3:2-12 + 2. Matthew 12:33-37 + 3. Should we ever say anything again?? + 4. We need to be careful with what we say + + + 2. Especially difficult when we know something + + 1. A new article we read + 2. A juicy tidbit about someone + 3. Question: what age do we live in? + + 1. Answer: Information/Digital Age + 2. So many tools to gain knowledge + 3. How long is a beluga whale? 14ft + 4. Not only tools to gain, but also spread knowledge + + 1. To hundreds, thousands or even millions + 2. With no barriers (a tool for it is in most of our pockets right now) + + 1. No faces in front of us to gives us pause + 2. No fear of immediate repercussions + 5. General, cultural consensus: this is very good + + 1. People are saying things like: + + Knowledge is power. Information is power. The secreting or hoarding of knowledge or information may be an act of tyranny camouflaged as humility. - Robin Morgan + + > From <[https://www.brainyquote.com/quotes/robin_morgan_271953](https://www.brainyquote.com/quotes/robin_morgan_271953)> + 4. When we know something we should share it + + + 3. Is this what God says about sharing knowledge? Living in the digital age, I feel an urgency to know what Scripture says about sharing the things I think I know so freely._[Read Proverbs 25:11-13]____[Read Proverbs 12:23]____[Read Proverbs 11:13]_ + + 5. Verses like these give us the impression that sharing knowledge isn't an essential good. It isn't always good to share what we know. So, how do we know when to keep silent? + + 1. There are some ways that are obvious + + 1. If it's not true + 2. If it's motivated by sin (hate, jealousy, pride, anger) + 2. But, there are less obvious times where we might feel within our rights to speak. + 3. There is wisdom in the Proverbs to guide us when not to + + 1. When it would separate intimate friends + 2. When it is part of a broader, unknown picture + 3. When it cannot be made acceptable + + +2. When it would separate friends (Prov. 17:9) + + 1. Seems like an obvious one: of course bringing up a friend's sin over and over would be bad + + 3. After all, we have a biblical duty to confront each other's sin + + James 5:19–20 + 19 My brethren, if any among you strays from the truth and one turns him back, + 20 let him know that he who turns a sinner from the error of his way will save his soul from death and will cover a multitude of sins. + + + + Galatians 6:1 + 1 Brethren, even if anyone is caught in any trespass, you who are spiritual, restore such a one in a spirit of gentleness; each one looking to yourself, so that you too will not be tempted. + + + 8. I have found it hard to know, motivated to keep our friends from sin + + 1. Friend who I thought was marrying an unbeliever + 2. Friends whose daughter was marrying someone they thought she should not + 3. Where do you draw the line between going to far and working hard to turn a sinner from his error? + + 10. Key word is "repeat" + + 1. We do have that duty to confront each other in sin, to perhaps win them back + + 3. But, we can go too far: with my friend_[Illustration: Kept emailing him to convince him, even with warning to the result of a broken friendship]_ + + 1. My friend did not repent (I might have been wrong) + 2. But this would especially be so when a friend has repented + + + 4. A good balance: friends with their daughter + + 1. She was moving forward regardless + 2. They, seeking a continued loving relationship, after making their objections known, chose to keep the relationship to continue to be part of their daughter's life and help her when the inevitable difficulties came + + + 5. Application + + 1. At some point, it is best to remain silent for the purpose of keeping a loving relationship + 2. Run the risk of saying nothing at all, when we need to remember the biblical mandate to confront each other in love 4. When it is part of an unknown broader picture (Prov. 10:14) + + 1. Interesting imagery of storing up knowledge_[Illustration: collecting tools to do a job, wisdom to know all that you need, not just one or two tools, but the whole set]_ + + 3. Idea of knowing there is always more to know + + Proverbs 1:5 + 5 A wise man will hear and increase in learning, And a man of understanding will acquire wise counsel, + + + + Proverbs 9:9 + 9 Give instruction to a wise man and he will be still wiser, Teach a righteous man and he will increase his learning. + + + 8. Could paralyze us to never speak, not what we want + + 10. But, knowing the vastness of things we do not know should keep us from the temptation to speak of things we really know nothing about + + 12. Story of Job and God's response to him + + 1. God humbles Job! Job 38:1-11 + 2. Job realizes he spoke of things he did not know: Job 42:1-6 6. When it cannot be made acceptable (Prov. 15:2) + + 1. A wisdom of its own: wisdom to make wisdom acceptable + + 3. About the speaker (us) and hearer + + 1. What mood am I in? + 2. What mood are they in? + 3. What circumstances are they currently in? + 4. Are you in private or public setting? + 5. What kind of relationship do you have? Friend? Close friend? Stranger? Family? + + + 4. Risk of never speaking as we never know how someone will receive it, not what we want + + 6. Paul's Mars Hill sermon a great example: Acts 17:22-34 + + 1. Presented the gospel in a way they could hear it + 2. Clearly spoke of the resurrection, even though he probably knew they _wouldn't_ receive it + 3. He presented in a way that _could be acceptable_ (even though did not accept the resurrection) + 4. Walked the balance perfectly: not afraid to speak truth, but presented it in such a way as to be acceptable + 5. Some believed and followed + + + 7. Application: rather be silent when we don’t have the wisdom to make knowledge acceptable, but be mindful of simply being fearful of rejection 8. Conclusion + + 1. Christian duty today to evaluate what is good or not in our culture + 2. One to be careful about: knowledge is always meant to be shared + 3. Scripture gives us the wisdom to know when this is not true, three today + + 1. When it separates intimate friends + 2. When it's part of a broader, unknown picture + 3. When it can't be made acceptable + > From <[https://www.brainyquote.com/quotes/robin_morgan_271953](https://www.brainyquote.com/quotes/robin_morgan_271953)> \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2019.09.29 Faith in the life of Abraham.md b/OneNote/Ben's Notebook/Messages/2019.09.29 Faith in the life of Abraham.md new file mode 100644 index 0000000..de6cea0 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2019.09.29 Faith in the life of Abraham.md @@ -0,0 +1,201 @@ +Bible Chapel of Shawnee +September 29th, 2019 + +**Rhetorical theme**: Faith in the life of Abraham + +**Full theme**: There are many observations we can make about walking in faith by observing it in the life of Abraham. + +1. Introduction + + 1. I ask myself questions somethings, sometimes hear others asking the same things + + 1. I wanted to do this thing, does that mean it's of the flesh--not walking by faith? + 2. I did all my homework, sought counsel, read my Bible, prayed, weighted the pros and cons, but never felt like I got a specific answer from God. Does that mean I don't know God's will yet? Do I need to wait? + 3. Where does God's will come into play when I don't seem to hear His specific answers to my questions and prayers? + + + 2. All questions of what it looks like to walk in faith + + 4. All questions motivated by _wanting_ to walk in faith + + 6. Abraham a great study for answer to what it means to walk in faith_[Abraham's life slide]_ 3. Walking in faith is a process of growth + + 1. See how God speaks to Abraham_[Handout of the three pairs of God's communication with Abraham]_ + + 1. Phase 1: Simple command (go), then lots of repetition and expansion of God's promises + 2. Phase 2: Difficult command (covenant), then more repetition and expansion of God's promises + 3. Phase 3: Impossible command (sacrifice), then more repetition and expansion of God's promises + + + 2. Each command is more difficult + + 4. Each command is achievable + + 1. Certainly challenging + 2. But, God had built the foundation for Abraham to be able: His proven faithfulness. + + + 5. Take the long view + + 1. We are all somewhere along the process desires for us + 2. First thing God asked of Abraham was to just continue the journey his father started + 3. Greater things, more challenging, more rewarding may come later 5. Walking in faith will include mistakes + + 1. Several mistakes recorded about Abraham + + 1. Twice feared for his life because of Sarah + + 1. With Pharaoh + + 1. Thought he would be killed to get her + 2. Very early on, young in faith? + 2. With Abimelech + + 1. Thought he would be killed to get her + 2. Much later, old habits die hard? + 3. Not hard to figure out this was a mistake + + 1. Pharaoh - early on, yes, but how could God make him a father of many nations if he was dead? + 2. Abimelech - much later, heir specifically promised through Sarah, what was he thinking?? + + 1. After Isaac had been promised within a year + 2. Sarah potentially pregnant at this time + 3. Was he thinking: God doesn't need me anymore??? + 4. The Lord rescued him both times + + 1. Great plagues for Pharaoh and his household + 2. A dream to Abimelech + 5. Consequences still + + 1. Hard times with Sarah? Not told, but seems likely! + 2. Kicked out of Egypt + 3. Strained relationship with Abimelech + 4. Not mention + + 1. Plagues brought on Pharaoh! + 2. Barrenness brought on Abimelech! + 2. Took Hagar when Sarah was barren + + 1. Clearly not God's way: descendants named through Isaac + 2. The Lord rescued him + + 1. Blessed Ishmael too + 2. Told Hagar to submit to Sarah + 3. Consequences still + + 1. Problems between Hagar and Sarah + 2. Problems between Ishmael and Israel + + + 2. Nothing derailed God's fulfillment of His promises + + 4. Knowing this, we should not fear + + 1. Of course, can't be lazy to do well + 2. We know difference between + + 1. Intentional sin + 2. Mistakes and lapses 7. Walking in faith will include living with mystery + + 1. Many things Abraham did not know + + 1. "Go" without knowing where to stop + 2. Promised the land while many nations still dwelt there + 3. Rescued Lot with no guarantee of success + 4. Promised a son with a barren, old wife + 5. Told to sacrifice without knowing how God would let him live + + + 2. Why things this way? + + 1. Difference between being told and experiencing + 2. Experience is the better teacher + 3. Teachers, mentors, bosses: ever purposefully not explained something? + 4. Parents + + 1. Even with warnings, experience is often the final teacher + 2. Take them to Grand Canyon instead of just describing + 3. Christmas: keep gifts a secret + + + 3. The hard part: why didn't God just tell Abraham how his son would be born? + + 1. Led to messing up with Hagar? + 2. Avenue for us to accuse God? + 3. First, let's be clear: sort out responsibilities + + 1. Abraham's choice to take Hagar + 2. Pretty easy to know it was wrong: God's way from the beginning was one man, one woman, produce family + 4. Let's not pretend like God "could have prevented some huge tragedy" + + 1. What huge tragedy? + 2. God blessed Ishmael + 3. Millions of people born through Ishmael, many nations + 4. Abraham not somehow responsible for choice of Ishmael's descendants + 5. By not knowing + + 1. Abraham experienced first-hand God's + + 1. Power over nature (Isaac's conception) + 2. Power to redeem through failure + 2. Prepared to trust God's miraculous power with offering Isaac 9. Walking in faith is done mostly without specific direction from God + + 1. Three instances of specific direction in entire 175 year life_[Slide of God speaking to Abraham]_ + + 1. Go out of Haran (75) + 2. Keep the covenant (99, 25 years later) + 3. Sacrifice Isaac (115? 15 years later?) + 4. One of the most significant characters in Scripture it only tells us of three times God gave him direction + + + 2. Only two with lasting elements of obedience + + 1. Live in Haran, direction for the rest of his days + 2. Keep covenant, activity for the rest of his days + + + 3. Significant things in rest of his life + + 1. Going to Egypt + 2. Deceiving Pharaoh about Sarah + 3. Separating from Lot + 4. Going to war, rescuing Lot + 5. Having Ishmael with Hagar + 6. Pleading with the Lord about the righteous in Sodom + 7. Deceiving Abimelech about Sarah + 8. Burying Sarah, negotiating the burial plot + 9. Finding a wife for Isaac + 10. Marrying Keturah + + + 4. Many other intervening years we know nothing about with no specific direction from the Lord, as far as we know + + 6. Point is this: + + 1. If God needs to accomplish as great of things through you as He did through Abraham + + 1. Birth a nation + 2. Start the line of the most significant person in all of history (Christ) + 3. Establish a pattern of righteousness through faith for all generations afterwards + + + 2. He won't need to tell more than 3 specific things + + 4. If on the same schedule as Abraham, but live to 100, you're going to hear from him at 42, 56 and 65--and that's it! + + 6. What are you going to be doing the rest of the time?? + + 1. Waiting for Him to tell you what to do next? + 2. Does He do that? + 3. Instead: grow in wisdom and knowledge of God to take action accordingly. Each of Abraham's "non specific" actions: + + 1. Either done well by knowing something of God (ex. separating from Lot accomplished peace) + 2. Or done poorly by failing to act according to the knowledge of God (ex. Marriage being avenue of children, not Hagar!) + + + 7. More likely we are like Ruth or Esther: no specific direction from God, but must rely on His wisdom and knowledge of who he is 11. Conclusion + + 1. Walking in faith is a process of growth + 2. Walking in faith will include mistakes + 3. Walking in faith will include living with mystery + 4. Walking in faith is done mostly without specific direction from God \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2019.12.29 1 Thessalonians 49-12.md b/OneNote/Ben's Notebook/Messages/2019.12.29 1 Thessalonians 49-12.md new file mode 100644 index 0000000..e3afa23 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2019.12.29 1 Thessalonians 49-12.md @@ -0,0 +1,159 @@ +Bible Chapel of Shawnee +December 29th, 2019 + +Rhetorical theme: Love of the brethren + +Logical theme: The love of the brethren is a primary occupation of the believer. + +Outline + +1. Introduction + + 1. Interesting time of year + + 1. Reflect on what has happened + 2. Look forward to what is to come + 3. You hear a lot about resolutions + + 1. Things to start + 2. Things to stop + 3. Things to keep doing + 2. If you're having trouble thinking of things to work on this new year…there's one thing we as Christians can always have on our list: loving the brethren. + + 1. If we're not doing it, we should certainly start + 2. If we're avoiding it, we should certainly stop. + 3. If we're doing it, we should certainly grow in it. + 3. Thessalonians are a wonderful example of love + + 1. In 1 Thess. Paul praises them for their love + 2. Broadly known throughout the Macedonian region + 3. Yet, Paul encourages them to excel still more in love +[Read 1 Thess. 4:9-12] + 5. Love of the brethren is **learned** but **living**. (4:9-10) + + + 2. Learned (v9) + + 1. Taught by God, not men + 2. Go a little beyond this passage to understand details + + 1. How are we taught? + + 1. 1 John 2:27 anointing in us teaches us + 2. John 14:26 the Helper teaches all things + 2. Why not from men? + + 1. He is the example: 1 John 3:16 we know love by Christ's sacrifice + 2. He gave us the commandment: 1 John 3:23 love one another + 3. He is the source: 1 John 4:7-8 love is from God + 4. Can we learn from other men? + + 1. Men can show God's love but it is just that: God's love + 2. There is no "building onto" God's love and expanding it, we either reflect it or not + 3. A student can exceed the skill of his master in almost any earthly skill. But the student of God's love can never do this, never exceed God's love. + 3. Living (v10) + + 1. Though taught, never accomplished + + _[Illustration: many analogies to more tangible skills. How many college graduates do you know with a specific degree who were set for their career for life? Probably no one. It's understood that an education (college, trade school, on-the-job training) is just the beginning. So it is with love, the essential skill of the believer.]_ + + 3. Excel still more in two ways + + 1. Quantitative growth (love more often, love more people) + 2. Qualitative (love better) + + _[Illustration: human growth. Much of our growth at first is adding skills. When we first come out, we learn to breath air. Then we drink, see, smile, laugh, crawl, walk, talk, etc. Our quantity of skills grows. As we mature, we continue to grow, but now more in quality than quantity. We learn to speak more eloquently or think more logically or cook more deliciously.]_ + + + + _[Illustration: Like talents--both natural and nurtured. Lionel Messi, perhaps the best, most naturally-gifted soccer player to ever play. No one could teach him some of the things he can do. Yet, he recently explained in an interview how he has learned to improve his freekick success by careful study of goalkeeper's movements.]_ + 7. Love of the brethren is **private** but **public**. (4:11-12) + + + 2. Private in its ambitions (v11) + + 1. Lead a quiet life + + 1. Quiet - not silent, but calm, peaceful, ordered, see Acts 11:18 + 2. _[Illustration: Ever taken a moment to contemplate modern-day city services? Trash pickup, sewer, water, gas, electricity, etc… They quietly hum along--necessary, essential, important, foundational to the efficiencies of modern living. We don't notice them because they work so well: quietly, organized, efficient, well-run, ordered. Their quiet functioning frees us to do so much that would be impossible if we were concern with hauling water, removing our trash, etc, etc. So, a quiet life for the believer frees us to serve and love others and so is one of the pillars of a smoothly functioning lifestyle that enables loving the brethren.]_ + 2. Mind your own business + + 1. Obvious one, but repeated often--must be a needed message! + 2. Other references + + 1. 1 Peter 4:15, 2 Thess. 3:11, 1 Tim. 5:13 + 2. Prov. 25:17 - the most blunt! + 3. Work with your own hands + + 1. Consistently Paul's own example + 2. Frees you to: + + 1. Provide for others yourself as you are not be a burden to the assembly + 2. This, in turn, frees the assembly to provide for the truly needy + 3. 2 Thess. 3:10-12 is very clear + + 1. Problems are + + 1. Unwillingness to work + 2. Undisciplined lifestyle + 3. Being busybodies + 2. Problems are _not_ + + 1. Those who we support to free them for full time gospel work + 2. Those who we support because they cannot work + + + _Transition: if the private foundation of a believer's life is solid, the fruit can be manifested publicly in his ability to generously love others._ + + + 6. Public in its fruit (v12) + + 1. Proper behavior toward outsiders (unbelievers) + + 1. Well-ordered lives are good testimonies + 2. Loving communities are rare + 3. Perhaps, if we've grown up in Christian, well-ordered homes, we don't realize the profound impact seeing one can have_[Illustration: article about Mormon mommy-blogger reader. These are just blogs which surely don't portray the full breadth of what a real Mormon home is like, just like any other social-media. But they show the power of attraction that a well-ordered, peaceful, restful life can have on someone today when this is so far from the norm.]_ + 2. Not be in need: we have the freedom to be a provider instead of a consumer, contributing to the love expressed by a church and not just consuming it + + + 7. Observations + + 1. Two seem obvious, one less so + + 1. Quiet life: our culture emphasizes/rewards hectic lives--more convicting + 2. Mind your own business: though there are downsides to it, our culture is very private and individualistic, seems pretty obvious to us, as a result + 3. Work with your own hands: our culture rewards hard work and generally punishes laziness + 4. We have some godly values instilled in our culture, some weaknesses too + 2. No pattern prescribed + + 1. No schedule given (10 minutes rest and 50 minutes work per hour, two trips a year, etc) + 2. Each person's gifting, calling, personality, strengths and weaknesses are different + 3. Right application + + 1. Personal conviction + 2. Encouragement to others (help them lead restful lives) + 4. Bad application: "because his schedule would overwhelm me, it must overwhelm him too" + + +8. Conclusion + + 1. The new year is a natural time to take stock of things in our lives + + 1. Reflect on where we started + 2. Consider where we are now + 3. Examine where we are going + 2. As we do so, let's especially consider how we love the brethren + + 1. Look to be taught by God + 2. Remember that our love is a living thing--it should grow in quantity and quality + 3. Resolve to make our ambition to strengthen our private habits + 4. Watch for the public fruit that God brings + + +Why I can't stop reading Mormon housewife blogs + +I'm a young, feminist atheist who can't bake a cupcake. Why am I addicted to the shiny, happy lives of these women? +… +So why, exactly, are these blogs so fascinating to women like us -- secular, childless women who may have never so much as baked a cupcake, let alone reupholstered our own ottomans with thrifted fabric and vintage grosgrain ribbon? +… +Well, to use a word that makes me cringe, these blogs are weirdly "uplifting." To read Mormon lifestyle blogs is to peer into a strange and fascinating world where the most fraught issues of modern living -- marriage and child rearing -- appear completely unproblematic. This seems practically subversive to someone like me, weaned on an endless media parade of fretful stories about "work-life balance" and soaring divorce rates and the perils of marrying too young/too old/too whatever. And don't even get me started on the Mommy Blogs, which make parenthood seem like a vale of judgment and anxiety, full of words like "guilt" and "chaos" and "BPA-free" and "episiotomy." Read enough of these, and you'll be ready to remove your own ovaries with a butter knife. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2020.02.09 Fasting.md b/OneNote/Ben's Notebook/Messages/2020.02.09 Fasting.md new file mode 100644 index 0000000..5b610ba --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2020.02.09 Fasting.md @@ -0,0 +1,388 @@ +Bible Chapel of Shawnee +February 9th, 2020 +Family Bible Hour + +**Rhetorical theme**: Fasting + +**Full theme**: What the Bible teaches about fasting. + +1. Introduction + + 1. Topic of fasting + + 1. Probably not an unfamiliar term to you + 2. "Facebook fasts" + 3. Popular dieting trend: Intermittent fasting + 4. Catholic, Methodist, Lutheran, Anglican practice during lent (starting in a couple of weeks) + 5. In form or another, fasting is present in our culture + 2. Scripture speaks of it too + + 1. Israelites fasted + 2. Moses, Elijah, Hannah, Esther, Nehemiah, Ezra, Jesus and Paul all fasted + 3. Like me? + + 1. Unsure exactly what Bible says + 2. Required or recommended? + 3. Purpose? + 4. Relevant for today? How? 3. Purpose of fasting + + 1. Examine: when does Scripture speak of fasting + + 1. Praying, inquiring of the Lord + + 1. Israel, going into battle against Benjamin (Judges 20:26) + 2. David, baby's life (2 Sam. 12:16) + 3. Jehoshaphat and Israel, huge army coming against them (2 Chron. 20:3) + 4. Ezra and Israel, seeking protection for their journey (Ezra 8:21) + 5. Nehemiah, favor from the king (Neh. 1:4) + 6. Jews, success for Esther (Esther 4:16) + 7. Daniel, answer regarding 70 years in Jeremiah (Dan. 9:3) + 8. Anna, fasted continually in the temple with prayer (Luke 2:37) + 9. Cornelius, praying and fasting (Acts 10:30 [NKJV]) + 10. Antioch believers, praying for Saul and Barnabas (Acts 13:3) + 11. Paul and Barnabas, appoint elders with prayer and fasting (Acts 14:17) + 12. Believers, devoting themselves to prayer and fasting (1 Cor. 7:5 [NKJV]) + 2. Repentance + + 1. Israel, upon return of the ark from the Philistines (1 Sam. 7:6) + 2. God, asking Israel to truly repent (Joel 2:12) + 3. Ninevites, after hearing Jonah's message from God (Jonah 3:5) + 3. Confession of sin + + 1. Nehemiah, Israel's sins (Neh. 1:4) + 2. Israel, having returned to Jerusalem (Neh. 9:1) + 3. Daniel, Israel's sins (Dan. 9:3) + 4. Mourning + + 1. Men, after death of Jonathan and Saul (1 Sam. 31:13, 2 Sam. 1:12, 1 Chron. 10:12) + 2. Jews, hearing Haman's decree (Esther 4:3) + 3. God, asking Israel to fast and mourn (Joel 2:12) + 4. Ezra, mourning unfaithfulness of exiles (Ezra 10:6) + 5. Daniel, after hearing prophecy of Messiah being cut off (Dan. 10:3) + 2. Common theme: humility + + 1. Prayer: we need God's help and guidance + 2. Repentance and confession of sins: we fail and need God's forgiveness + 3. Mourning: we are frail and all succumb to death + 4. David fasted for this purpose (Ps. 35:13) + + +4. Why fasting may be relevant to us + + 1. Rich society + + 1. Such an abundance of all necessities + 2. Rarely, if ever, have we been in true need + 3. I can't think of a single time I ever truly feared for a real necessity: food, shelter, clothing, love + + 1. Closest I got: hail storm on mountain hike, found shelter under a rock, had coats, backpack for protection, lift station not far away if help was needed + 4. I think it's possible for this to lull us into a false sense of security + 2. Reality is, we are much closer than we think + + 1. Food supply illustration + + 1. Not scaring you, but how much is your control? + 2. What did you do to make that food grow? Sun, rain, fertilize? + 3. What farm does your food come from? Is he reliable? + 4. Who does he ship it to? Is their safety good? + 5. What if a few parts break down? Prolonged bad weather? Electricity goes out? Roads aren't maintained? Gas supply runs out for transportation? Refrigeration not possible? + 2. How much do you depend on electricity? + + 1. Even after it gets to your house, do you really control it? + 2. Do you even know what this stuff is? + 3. Where is your power generated? + 4. When your power goes out, you remember how nice it is that there are workers out there who know how to restore it. You're appreciation goes up! Your humility goes up! Your bravado goes down. + 3. Fasting reminds us how dependent we are on the Lord + + 1. Certainly very practical reason: hunger pangs can remind us to pray + 2. But, biggest reason: reminds us how frail and dependent we are, humbles us + + +5. Mechanics of fasting + + 1. Fasting can be done together + + 1. Few: men (1 Sam. 31:13) + 2. Many: all of Judah (2 Chron. 20:3) + 2. Fasting can be done alone + + 1. David (2 Sam. 12:16) + 2. Many others + + 1. Moses on Mt. Sinai (Ex. 34:28) + 2. Elijah going to Mt. Horeb (1 Kings 19:8) + 3. Jesus in the wilderness (Matt. 4:2) + 3. Fasting can be for a short time + + 1. Israel, just a day (1 Sam. 7:6) + 2. Israel, just an evening (Judges 20:26) + 3. Darius, just a night (Dan. 6:18) + 4. Fasting can be for a long time + + 1. Few men: seven days (1 Sam. 31:13) + 2. Moses, Elijah and Jesus for 40 days and nights (Matt. 4:2, Ex. 34:28, 1 Kings 19:8) + 3. Daniel for three weeks (Dan. 10:3) + 5. Fasting can be spontaneous + + 1. David, when his baby was dying (2 Sam. 12:16) + 2. Jehoshaphat and Israel, when large army came against them (2 Chron. 20:3) + 6. Fasting can be planned + + 1. Jews, in response to God's word through Jeremiah (Jer. 36:9) + 2. Jews, feast of booths after returning to Jerusalem (Neh. 9:1) + 3. Purim (Esther 9:31) + 7. Fasting almost always has a favorable outcome for the faster + + 1. Israel, victory against Benjamin (Judges 20:26) + 2. Jehoshaphat, deliverance from large army (2 Chron. 20:3) + 3. Ninevites, God relents of His judgement (Jonah 3:5) + 4. Ezra, protected on journey to Jerusalem (Ezra 8:21) + 5. Nehemiah, favorable answer from the king (Neh. 1:4) + 6. Daniel, seeking answers after observing Jeremiah (Dan. 9:3) + 8. Fasting doesn't always have a favorable outcome for the faster + + 1. David, his baby died (2 Sam. 12:16) + 9. Fasting can be done for yourself + + 1. Daniel, seeking answers (Dan. 9:3) + 2. David, for his child (2 Sam. 12:16) + 3. Ninevites, their own preservation (Jonah 3:5) + 10. Fasting can be done on behalf of others + + 1. Nehemiah for Jerusalem's plight (Neh. 1:4) + 2. Jews for Esther (Esther 4:16) + 3. Ezra, for unfaithfulness of exiles (Ezra 10:6) + 11. Fasting is never commanded: only interpreted as part of the command to "humble your souls" during the Day of Atonement (Lev. 16:29) + + +6. Warnings about fasting + + 1. Fasting cannot manipulate God + + 1. David, true humility, but could not change God's decision (2 Sam. 12:16) + 2. Fasting must reflect the inner man: right with God or a desire to be right with God + + 1. Ahab, difference between 1 Kings 21:4 and 21:27 + + 1. No trouble seeing Ahab's heart in v4 + 2. Surprising true humility in v27 + 3. It was as easy for God to see Ahab's true humility in v27 as it is for us to see his selfishness in v4 + 2. Israel, fasted sincerely, but got this confused (Is. 58:3) + + 1. They bowed their heads, put on sackcloth and ashes, why did God not hear? + 2. But, they mistreated each other, their works, had strife and contention, did not feed the hungry, cloth the naked, house the homeless + 3. Pharisee, proud of his fasting compared to humble tax collector (Luke 18:12) + + 1. Pharisee's fasting did him no good because it did not reflect an inner, humble man + 2. Tax collector had no pretenses of righteousness + 3. Fasting is better done in secret to avoid the praise of men + + 1. Hypocrites, fasted and made sure everyone saw (Matt. 6:16) + 4. Fasting is not the right tool for every battle + + 1. Saul's oath to not eat in battle (1 Sam. 14:24) + + 1. 14:24 Saul commits everyone to fast + 2. 14:29 Jonathan exposes the foolishness of it + 2. Contrast to Christ's fasting before temptation (Matt. 4:2) + + 1. Might think top physical needed to resist + 2. But, it was a spiritual battle and fasting prepared Him + 3. Right tool for spiritual battles, not physical + + 8. Conclusion + + 1. Battle is not against flesh and blood, it is spiritual (Eph. 6:2) + 2. By ourselves, we are no equipped to win this battle! + 3. We depend entirely on the Lord + 4. To with this battle we must rely on Him in total humility + 5. Fasting is a useful weapon in our arsenal to help us humble ourselves + + + +Raw notes from fasting study + +1. What fasting is + + 1. Fasting can be done in groups + + 1. Judah (2 Chron. 20:3) + 2. Israel (Judges 20:26, 2 Sam. 1:12, 1 Sam. 7:6) + 3. Men ( 1 Sam. 31:13) + 2. Fasting can be done alone + + 1. David (2 Sam. 12:16) + 2. Ahab (1 Kings 21:27) + 3. Jesus (Matt. 4:2) + 4. Moses (Ex. 34:28) + 5. Elijah (1 Kings 19:8) + 3. Fasting can be for a short time + + 1. Just an evening (Judges 20:26, 2 Sam. 1:12) + 2. Just a day (1 Sam. 7:6) + 3. Just a night (Dan. 6:18) + 4. Fasting can be for a long time + + 1. Seven days (1 Sam. 31:13) + 2. Long enough to make David weak and thin (Ps. 109:24) + 3. 40 days and nights (Matt. 4:2, Ex. 34:28, 1 Kings 19:8) + 4. Three weeks (Dan. 10:3) + 5. Fasting can be done on behalf of others + + 1. Nehemiah for Israel (Neh. 1:4) + 2. Jews for Esther (Esther 4:16) + 3. David, when his enemies were sick (Ps. 35:13) + 4. Ezra, mourning sins of exiles (Ezra 10:6) + 6. Fasting can be spontaneous + + 1. David, when his baby was dying (2 Sam. 12:16) + 2. Jehoshaphat and Israel, when large army came against them (2 Chron. 20:3) + 3. Ahab, hearing his judgement (1 Kings 21:17) + 4. Ezra and Jews, needing protection for their journey (Ezra 8:21) + 5. Nehemiah, hearing Jerusalem's state (Neh. 1:4) + 6. Jews, for Esther visiting the king (Esther 4:16) + 7. Men, after burying Jonathan and Saul (1 Sam. 31:13, 2 Sam. 1:12, 1 Chron. 10:12) + 7. Fasting can be planned + + 1. Jews, feast of booths after returning to Jerusalem (Neh. 9:1) + 2. Purim (Esther 9:31) + 3. Day of Atonement (Lev. 16:29) + 8. Fasting can make you physically weak + + 1. David (Ps. 109:24) + 9. Fasting may be reproached by others + + 1. David (Ps. 69:10) + 10. Fasting almost always has a favorable outcome for the faster + + 1. Ahab, no judgement in his life (1 Kings 21:27) + 2. Jehoshaphat, deliverance from large army (2 Chron. 20:3) + 3. Ezra, protected on journey to Jerusalem (Ezra 8:21) + 4. Israel, victory against Benjamin (Judges 20:26) + 5. Nehemiah, favorable answer from the king (Neh. 1:4) + 6. Daniel, seeking answers after observing Jeremiah (Dan. 9:3) + 7. Ninevites, God relents of His judgement (Jonah 3:5) + 11. Fasting doesn't always have a favorable outcome for the faster + + 1. David, his baby died (2 Sam. 12:16) + 12. Fasting is an earthly practice and will not be needed when we are with Christ + + 1. Disciples, did not fast when with Jesus (Matt. 9:14) + 13. Fasting is only commanded as part of the Day of Atonement (Lev. 16:29) +2. Purpose of fasting + + 1. Reflect true humility + + 1. Israel, after second defeat against Benjamin (Judges 20:26) + + 1. They asked "who shall go up" (assuming they should) + 2. Then they asked "shall we go up again" + 3. Then they asked again "shall we go up again or cease" (confessing their own sin through the offerings with fasting) + 2. Ahab, after hearing of his judgement (1 Kings 21:27) + 3. Jehoshaphat, powerless against the army (2 Chron. 20:3) + 4. Ezra and Jews, seeking protection for their journey (Ezra 8:21) + 5. God, asking Israel to repent (Joel 2:12) + 2. Accompany humbling events in life + + 1. Fasting can accompany inquiring of the Lord (prayer) + + 1. Israel, going into battle against Benjamin (Judges 20:26) + 2. David, baby's life (2 Sam. 12:16) + 3. Jehoshaphat and Israel, huge army coming against them (2 Chron. 20:3) + 4. Ezra and Israel, seeking protection for their journey (Ezra 8:21) + 5. Nehemiah, praying for Jerusalem (Neh. 1:4) + 6. Jews, success for Esther (Esther 4:16) + 7. Daniel, after observing 70 years in Jeremiah (Dan. 9:3) + 8. Anna, fasted continually in the temple with prayer (Luke 2:37) + 9. Antioch believers, praying for Saul and Barnabas (Acts 13:3) + 10. Paul and Barnabas, appoint elders with prayer and fasting (Acts 14:17) + 11. Believers, devoting themselves to prayer and fasting (1 Cor. 7:5 [NKJV]) + 12. Cornelius, praying and fasting (Acts 10:30 [NKJV]) + 2. Fasting can accompany repentance + + 1. Israel, upon return of the ark from the Philistines (1 Sam. 7:6) + 2. God, asking Israel to truly repent (Joel 2:12) + 3. Ninevites, after hearing Jonah's message from God (Jonah 3:5) + 3. Fasting can accompany mourning + + 1. Men, after death of Jonathan and Saul (1 Sam. 31:13, 2 Sam. 1:12, 1 Chron. 10:12) + 2. David, before death of David and Bathsheba's baby (2 Sam. 12:16) + 3. Ahab, hearing his judgement (1 Kings 21:27) + 4. Nehemiah, hearing the plight of Jerusalem (Neh. 1:4) + 5. Jews, hearing Haman's decree (Esther 4:3) + 6. God, asking Israel to fast and mourn (Joel 2:12) + 7. Jesus, associates fasting and morning (Matt. 9:14) + 8. Ezra, mourning unfaithfulness of exiles (Ezra 10:6) + 9. Daniel, after hearing prophecy of Messiah being cut off (Dan. 10:3) + 4. Fasting can accompany confession of sin + + 1. Israel, after second defeat against Benjamin (Judges 20:26) + 2. Nehemiah, on behalf of Israel (Neh. 1:4) + 3. Israel, during feast of booths upon returning to Jerusalem (Neh. 9:1) + 4. Daniel, on behalf of Israel (Dan. 9:3) + 5. Fasting can accompany service to the Lord + + 1. Anna, fasting and serving in the temple (Luke 2:37) + 2. Antioch believers, fasting and ministering (Acts 13:2) + 6. Fasting can accompany great spiritual tasks + + 1. Moses, receiving ten commandments (Ex. 34:28) + 2. Jesus, resisting Satan's temptation (Matt. 4:2) + 3. Fasting can be for the purpose of humbling yourself + + 1. David (Ps. 35:13) + 4. Fasting can teach us to depend on spiritual strength over physical strength + + 1. Jesus, fasted 40 days before Satan tempted him (Matt. 4:2) + + 1. Certainly physically weak + 2. Yet, showed now weakness in temptation + 3. Full of the Word +3. Warnings regarding fasting + + 1. Fasting should be done in secret rather than for the praise of man + + 1. Hypocrites, fasted and made sure everyone saw (Matt. 6:16) + 2. Fasting cannot manipulate God + + 1. David, stopped when his baby died (2 Sam. 12:16) + 2. Israel, fasting ritually without inward righteousness (Is. 58:3) + 3. Israel, sinning but still fasting (Jer. 14:12) + 3. Fasting is a reflection of the inner man being right with or desiring to be right with the Lord, it is not a ritual to be performed purely out of obedience or habit + + 1. Israel (Is. 58:3) + + 1. Fasted, bowed their heads, put on sackcloth and outwardly humbled themselves + 2. Wondered at not being heard + 3. God responds that He would rather see + + 1. Good treatment of workers + 2. Peace (not contention and strife) + 3. Removing wickedness + 4. Freeing those who are oppressed + 5. Feeding hungry + 6. Clothing the naked + 7. House the homeless + 8. Care for your people + 4. These things would reveal a heart in alignment with the Lord for which fasting is a true benefit + 2. Israel, fasted and confessed, but continued in sin (Jer. 14:12) + 3. Israel, fasting regularly through the year, but without humble hearts (Zech. 7:5) + + 1. God would rather see + + 1. True justice + 2. Kindness + 3. Compassion + 4. No oppression for widows and orphans, stranger or poor + 5. No devising evil in our hearts against one another + 2. Israel would not listen when called to, so fasting (them calling on God) was ignored + 4. Hypocrites, fasted so everyone would see (Matt. 6:16) + 5. Pharisee, proud of his fasting compared to humble tax collector (Luke 18:12) + 4. Fasting is foolish if the battle ahead is physical + + 1. Saul, swore his men to a fast (1 Sam. 14:24) + + 1. Jonathan summarizes the foolishness of it: victory would have been much greater if the men had their strength + 5. Fasting can be done in selfish pouting for no spiritual purpose at all + + 1. Ahab, after Naboth would not give him his vineyard (1 Kings 21:4) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Messages/2020.04.05 Psalm 130.md b/OneNote/Ben's Notebook/Messages/2020.04.05 Psalm 130.md new file mode 100644 index 0000000..abc0ed7 --- /dev/null +++ b/OneNote/Ben's Notebook/Messages/2020.04.05 Psalm 130.md @@ -0,0 +1,208 @@ +Bible Chapel of Shawnee +April 5th, 2020 +Teaching meeting, online with Zoom during coronavirus "stay-at-home" order + +River Valley Christian Fellowship +April 19th, 2020 +Teaching meeting, online with Google meet during coronavirus "stay-at-home" order + +Rhetorical theme: The thought patterns of a mature believer + +Full theme: The thought patterns of a mature believer lead him to mature action in the Lord. + +1. Introduction + + 1. Inner thoughts of a believer + 2. A remarkable transformation + + 1. From depths of despair + 2. To proclaiming hope + 3. How? + + 1. No a super-Christian + 2. Revelation of man's internal thoughts + 4. Thought patterns of a mature believer + + 1. Strengthen upward thoughts + 2. Matures us to expand our thoughts outward + 3. Begins inward +2. Inward (vv1-2) + + 1. He is in trouble + 2. He admits his trouble + 3. He calls out to the Lord +3. Upward (vv3-6) + + 1. Sin and Forgiveness + 2. Waiting and Hoping +4. Outward (vv7-8) + + 1. Seeing the needs of others + 2. Hope for the future +5. Conclusion +# Introduction + +Psalm 130 records the thoughts of a believer who goes through a remarkable transformation: from the depths of despair to proclaiming hope in the Lord to his nation. + +How does this transformation happen? + +This is not a psalm about a unique event or a special tragedy or an especially remarkable man accomplishing a gargantuan feat that no one can again accomplish. This is not a super-Christian battling forces of darkness with fantastic spiritual super powers. + +No, instead, it is the straightforward revelation of a man's internal thoughts as they transform from deep darkness to light; of despair to hope for the future; of desperation for his own rescue to confidence that others can be rescued as well. + +What we see in this psalm are the thought patterns of a mature believer; patterns we ought to emulate and repeat in our own lives. + +Now, when I say "mature believer", I want to make sure you've got the same picture that I do. I don't mean someone who "has it all figured out". I definitely don't mean someone who has reached some "higher spiritual plane". All I mean is someone who has walked with the Lord for a long time and has trained his thoughts in the patterns we'll see. He falls. He fails. He's done it before and he's experienced enough to recognize it and know how to get back up again. + +If we copy these patterns of thought, they will drive us to strengthen our upward confidence in the Lord and then matures us to expand our thoughts outward toward our fellow men. But, it begins where it must: our inward thoughts, thoughts directed toward ourselves. + +_Read Psalm 130._ + +# Inward + +_Read verses 1-2._ + +The author of this psalm begins by revealing the state of his mind: his inward thoughts. He uses only two words to do this: "the depths". + +## He is in trouble + +By themselves "the depths" might conjure up enough for us to imagine that he is in some kind of trouble. He's not feeling good. But, this word isn't just a word for how deep a hole might be. Everywhere else it's used in Scripture, it's used to describe deep waters and especially the depths of the sea. That's another kind of "depths" altogether. + +If you've ever taken a swim you can begin to imagine the analogy he is painting. You've probably felt the slight panic to get back to the surface when you stayed under the water a little too long. You've perhaps felt the water pressure when you dove down to the deep end of the pool. + +But, the swimming pool is nothing like the depths of the sea. When you get down deep, the light disappears. The sunlight fades until there is only utter blackness. If help was on the way to pull you out, you couldn't see it coming. You can't even see your hand in front of your face. You're surrounded by darkness. There are no waypoints. No landmarks to recognize. No signs to point the way of escape. + +All comfort of heat vanishes the deeper you sink. Before much depth, the cold becomes unbearable. + +As the waters above increase, the pressure mounts until it would easily crush you. + +Then, of course, you cannot breath. In the depths of the sea you are far from the surface, far from breath. You will suffocate in a matter of minutes--certainly before you make it to the top on your own. + +Darkness, cold, pressure, suffocation--it paints a desperate, hopeless, life-threatening situation. This man is in great trouble. + +## He admits he's in trouble + +But, notice the first thought pattern we can recognize of a mature believer. It's the one important thing he does first: he admits he's in trouble. There's no denial here. There's no trying to make the situation not seem so bleak. He's in trouble he cannot escape. He knows it and he says so. This is the first thing we can note as the sign of a mature believer. The mature believer makes honest confession of his desperate need. He frankly admits his trouble and makes no attempt to hide it from himself or from the Lord. + +## He calls out to the Lord + +The second thought pattern of a mature believer is quickly noticed next. Admitting his situation has freed him ask for help. + +What would you do if you were sinking, with no one in sight to save you? + +I think my first instinct would be to call out as loudly as I could for someone--anyone at all--to come rescue me! + +My second oldest, Gideon, is not quite able to dress himself yet. When he gets stuck in his shirt or can't quite work the button on his pants, he has the habit of desperately calling out "Somebody! Anybody!". He doesn't care if me or Grace or even his brother (sometimes) helps him. He just needs someone to get this shirt off! + +But, this is not exactly what he does here. He cries out. But he specifically calls out to only one person: the Lord. And there's no doubt who he means. He uses the name of the Lord, Yahweh. He pleads with Him to hear his voice, to hear the voice of his supplications; or, "pleas for mercy" as the ESV translates it. + +It seems counterintuitive to call out for a specific person. If he's truly desperate wouldn't any help be welcome, no matter who it came from? But, this too is a thought pattern of a mature believer. He knows the One who not only _can_ save him, but is _willing_ to save him. There is only One such person and He is the Lord. + +He is the one who will put it on the heart of your spouse to say the right kind word at the right time. Or burden a preacher with an exhortation from the Word that encourages you. Or embolden your brother to give you the strong admonition you need. + +An interesting thing happens next. From a dire situation, his thoughts begin to shift. His calling out to the Lord has shifted his focus from his circumstances to the Lord Himself. He now begins to drift away from his inward thoughts and toward upward thoughts. + +# Upward + +_Read verses 3-6._ + +Notice how his thoughts are still on himself, but no longer inward. His thoughts have turned to who he is in light of his relationship to a holy God. They have turned upward. + +## Sin and Forgiveness + +What would it be like if the Lord marked our iniquities? What if he kept a record and closely watched them? It's obvious--our case would be hopeless! We'd have no chance of standing at that judgment. + +Think of the things this reveals about his view of God in relation to himself: + +- First, he knows he has sinned and does not hide it +- He knows his sin is serious, and it has fearful consequences +- He also knows the Lord knows these sins +- Beyond this, he knows he ought to be rightfully accountable to the Lord for these sins +- But, he also believes that the Lord does not keep a record of these sins +- More than that, he knows it's not a matter of the Lord misplacing the official sin record, but the marks are gone because there is _forgiveness_ with the Lord +- As a result of this forgiveness, he fears the Lord + +So, we can notice the third and fourth thought patterns of a mature believer. + +First, he knows he is a sinner, forgiven by a loving God. This is how he stands, even though he has sinned. This is both a humbling admission and a strengthening encouragement and they are in a kind of balance. Thinking only of ourselves as sinners neglects the truth of God's work to forgive us. Thinking only of the forgiveness we have in the Lord neglects the truth of our sinfulness that necessitated His work in the first place. + +Second, rather than a license to sin, this forgiveness leads him to fall fearfully before the Lord in humble worship. Perhaps, like me, you don't normally associate God's forgiveness with fearing Him. I, for one, am much more likely to associate it with relief or gratefulness or happiness. + +But the connection is perhaps closer than we think. When we acknowledge that God is the one who forgives our sin, at the same time, we're acknowledging that He has the authority and the power to do so. The natural reaction to such a thought is to fear, follow and worship such a God who wields such power over us, but choses instead to forgive us. + +The forgiveness of the Lord also frees a man to leave the things behind him (his sins, weaknesses and failures) and press on in the work of the Lord. In other words, it leads to a greater desire to follow the Lord. As we follow Him, we know Him better. As we know Him better, we can only fear Him more. This certainly seemed to be Paul's mindset in Philippians 3: + +Philippians 3:12–17 +12 Not that I have already obtained it or have already become perfect, but I press on so that I may lay hold of that for which also I was laid hold of by Christ Jesus. +13 Brethren, I do not regard myself as having laid hold of it yet; but one thing I do: forgetting what lies behind and reaching forward to what lies ahead, +14 I press on toward the goal for the prize of the upward call of God in Christ Jesus. +15 Let us therefore, as many as are perfect, have this attitude; and if in anything you have a different attitude, God will reveal that also to you; +16 however, let us keep living by that same standard to which we have attained. +17 Brethren, join in following my example, and observe those who walk according to the pattern you have in us. + +Notice the connection and progression from leaving what lays behind to striving for the upward call to keeping an attitude of holy living. + +## Waiting and Hoping + +Earlier, in verses 1-2, the psalmist honestly admits his circumstances and this leads him to action: to call out to the Lord for rescue. Here too, having turned his thoughts upward to the Lord's forgiveness of his sins, he now takes action. He trains his thoughts on waiting for the Lord and hoping in His word. + +There are at least two things to notice in these two verses. First, the repetition and second, the comparison to the watchmen. + +It's interesting how he repeats, to himself, how he will wait for the Lord. It's almost as if he needs more than one reminder to wait for Him. Perhaps he is retraining his thoughts away from fearfulness and despair to an expectant, waiting hopefulness. + +Keep in mind that we have no indication that his circumstances have changed at all. But his thinking is brightening considerably. His concentration is no longer on his circumstances, but on the Lord who certainly will rescue him. + +Second, we should ask ourselves what the waiting of a watchman for the morning is like. Even for a new watchman, on his first day on the job, I can't imagine he has any question or uncertainty about the morning coming! There is a confidence that the sun will rise and the watch will end. + +The fifth thought pattern of a mature believer now emerges. He trains his thoughts to confidently hope in the Lord, waiting on His rescue, no matter the circumstances. + +As before, now another interesting things happens. As he moves away from inward thinking to upward thinking, he grows in his confidence to trust the Lord as he remembers the lovingkindness of the Lord. In that confidence his thoughts now turn completely away from himself and outward, towards his fellow countrymen. + +# Outward + +_Read verses 7-8._ + +Now, the mood of the psalmist has completely changed from where he started. Far from crying out in desperation for help, he is now calling out to his countrymen to hope in the Lord! + +I think we can notice two more thought patterns of the psalmist to emulate. + +## Seeing the needs of others + +The first is a sense of responsibility to share his confidence in the Lord with others. +His thinking has been so transformed that, though we still have no indication that he has been rescued, he sees the need of his fellow man for the same trusting hope in the Lord. His own issues are no longer the only ones he sees. Others are in similar circumstances, similar "depths". So, he calls on them to hope based on two characteristics of the Lord: His lovingkindness and his abundant redemption. + +## Confidence in the future + +The second is a confidence in the future actions of the Lord. + +How does he know that God will redeem Israel from all his iniquities? + +I think the answer is relatively simple. He has seen the past actions of the Lord in his life. He has observed the character of the Lord worked out in his own life. Having drawn closer to the Lord, he knows Him better and can look out into the future, confident that the Lord will do the same then as He has done in the past. + +# Conclusion + +To summarize this psalm, I think we could say this. The mature believer is not someone who has reached a higher plane of Christian living, never finding himself in the depths, but always thinking upward and outward. I'm confident that every believer finds himself in the depths at some time or another and most likely even quite regularly. + +Remember, the one writing this psalm, who I see as a very mature believer, is one who has fallen! But remember what Proverbs 24:16 says: + +Proverbs 24:16 +16 For a righteous man falls seven times, and rises again, But the wicked stumble in time of calamity. + +Rising again is what the mature believer does. But how? That is what this Psalm spells out for us. + +The mature believer is the one whose has learned certain patterns of thought to a consistent way of thinking that does one simple thing: it always turns him to the Lord for rescue. This then enables him to grow his thoughts from necessary introspection (those inward thoughts), upward, to the joy of the reality of his relationship with the Lord. It also emboldens him to reach outward to share with those around him the bounty of hope and lovingkindness available in the Lord. + +_Don't close in prayer (RVCF meeting…they discuss afterward)._ + +Psalm 130 +A Song of Ascents. +1 Out of the depths I have cried to You, O LORD. +2 Lord, hear my voice! Let Your ears be attentive To the voice of my supplications. + +3 If You, LORD, should mark iniquities, O Lord, who could stand? +4 But there is forgiveness with You, That You may be feared. +5 I wait for the LORD, my soul does wait, And in His word do I hope. +6 My soul waits for the Lord More than the watchmen for the morning; Indeed, more than the watchmen for the morning. + +7 O Israel, hope in the LORD; For with the LORD there is lovingkindness, And with Him is abundant redemption. +8 And He will redeem Israel From all his iniquities. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 1242019.md b/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 1242019.md new file mode 100644 index 0000000..cc1d157 --- /dev/null +++ b/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 1242019.md @@ -0,0 +1,25 @@ +- [x] Smith's +- [x] Carders, lots of hurricane damage for Carders in romblon +- [ ] Kerr's +- [ ] Hains +- [ ] Ottawa Christian fellowship, outreaches going on +- [x] Kid's club +- [x] Rose Hill kids club, from chaos to ok, better this last week +- [ ] Palaka tribe, missionaries there have finished translating Luke, a leader may have Ben saved +- [x] Focus conference in Wichita +- [x] Believers Bible conference +- [x] Paxton has bronchitis +- [x] Louis and Irene, encouragement +- [x] Wanda, encouragement +- [ ] Christmas party on Friday at 6:30pm +- [x] Carlos, contact for Travis and Charles, was not home tonight. Robert was +home, answered the door, talked for a long time, going through hard things, praying for the Lord to show him what to do next, will come this Sunday +- [x] David, here for training, has had chance to talk to sergeant coy about his faith +- [x] Steve Bouchie done in Minnesota, so no more driving back and forth +- [ ] Spanish Bible study on Tuesday nights, church meetings on Sundays at 3pm, some visitors to last study +- [ ] Spanish conference coming up, Dec 14th +- [x] Nozomi's father, having bypass surgery next week +- [x] Caroline's friend Courtney's father has cancer +- [x] Sam's family in Venezuela, no contact in two weeks, limited access to Internet, power outages often +- [x] Reed jozwick, growth, health +- [x] Grayson and Amy, wedding upcoming \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 342020.md b/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 342020.md new file mode 100644 index 0000000..b0c9c8b --- /dev/null +++ b/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 342020.md @@ -0,0 +1,5 @@ +- [ ] Jeff's girlfriend moving +- [x] Janet surgery recovery +- [x] Brandon, wisdom for Emmaus +- [x] Steve and Patrick and Olivia, returning from Israel +- [ ] Carders, problems government regarding coffee house, 75 kids at memory club \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 9112019.md b/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 9112019.md new file mode 100644 index 0000000..586b0d8 --- /dev/null +++ b/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 9112019.md @@ -0,0 +1,20 @@ +- [x] Gus, getting married to Tina on January 4th +- [x] Grayson and amy engaged +- [x] Men's meeting this week on Friday +- [x] Joshua project ongoing +- [ ] 50th anniversary for Jerry and Stephanie Harvey in Lawrence +- [ ] Pauline Truman probably near the end +- [x] Assemblies in Bahamas affected by hurricane, no assembly saints that we know of have died, severe damage building, cmml sending funds +- [x] Dukes leaving to Oklahoma tomorrow then back to California +- [x] Stephanie traveling +- [ ] Brock, things going well, kids club, new believers in Kobayashi, Kelly pregnant +- [ ] Luke and Theresa key possibly moving from Bahamas to KC +- [x] Bruce Carey in rehab at KU, brain infection +- [x] Steve travelling to North Carolina +- [x] Mathew Joy had medical procedure yesterday, did well, hopeful for good results +- [x] Kids club went well, Zach was sick so could not share, Steve shared instead +- [x] Darin, IRS job, MCC interview, family members in Bahamas, uncle Shawn and aunt cleo lost homes +- [x] Rose Hill kids club, 32 kids, couple of tough kids, meeting on Mondays +- [ ] Ian and Evelyn, Evelyn was sick, Ian unable to eat solid foods +- [ ] Thomas and Jackie niece Evelyn having eye surgery +- [ ] Luke Wood leaves to Japan soon, pending visa being issued \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 9272020.md b/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 9272020.md new file mode 100644 index 0000000..70fcdf6 --- /dev/null +++ b/OneNote/Ben's Notebook/Prayer Meetings/Chapel, 9272020.md @@ -0,0 +1,17 @@ +- [x] Travis has girlfriend, Joanna Pearson, both traveling to visit each other, Joanna pursuing studies too +- [x] Joel Hanson, praise for probable migraines, not strokes +- [x] Steve speaking this Sunday and traveling Sunday evening +- [x] Sams brothers not doing well in venezuela, don't feel good +- [x] Friend of Bouchies, 15 years old, foot amputated after auger accident +- [x] Naomi possible job ready for her +- [x] Travis had great witnessing chance with Mr. D, an inmate who was planning on committing suicide +- [x] Kids club, venue is only open until 4, but kids can't even get there until 3:30 +- [x] Government decisions concerning virus and policy +- [x] Elders have wisdom to guide chapel +- [x] Unity among the believers +- [x] Job for Ingrid Spragg +- [x] Rob kerr, loss of Coleen, decisions about a memorial service +- [x] Henderson's leaving ottawa to stevensville, montana +- [x] Ron Spragg recovering from abdominal surgery +- [x] Atwood's recovering from aftermath of covid-19 sickness +- [x] Jeff person traveling to see naomi in Georgia \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Prayer Meetings/Nathan and Ashley Hanson home, 8272019.md b/OneNote/Ben's Notebook/Prayer Meetings/Nathan and Ashley Hanson home, 8272019.md new file mode 100644 index 0000000..ebf6eea --- /dev/null +++ b/OneNote/Ben's Notebook/Prayer Meetings/Nathan and Ashley Hanson home, 8272019.md @@ -0,0 +1,12 @@ +- [x] Better know and understand God (AW Tozer, knowledge of the holy) +- [x] Roy and Bizy Daniel I men India, ministry to commended workers +- [x] Rebecca Durham, Nathan meet with Nic (13) from camp, mom concerned about spiritual state, professes salvation +- [x] Camp follow-up with local kids, time, ability, other people to come alongside +- [x] Fox valley camps, Bryan Jacques camps +- [x] Camp planning for next year, two Bible teachers already chosen, other planning needed +- [x] Mike Stephenson cancer +- [x] Grace, Beth and Kylie Jacques pregnant +- [x] Parenting +- [x] Writing Matt Bell +- [x] Joe in Fargo going to college +- [x] Jon and Juli newly married \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/2002 Coachman Clipper 106 Sport Pop-Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN 1TC1C510X35002745 - Mayo Auction & Realty.md b/OneNote/Ben's Notebook/Quick Notes/2002 Coachman Clipper 106 Sport Pop-Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN 1TC1C510X35002745 - Mayo Auction & Realty.md new file mode 100644 index 0000000..4ffceb2 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/2002 Coachman Clipper 106 Sport Pop-Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN 1TC1C510X35002745 - Mayo Auction & Realty.md @@ -0,0 +1,4 @@ +"Found this clipper for sale that matches ours pretty much exactly. I'm concluding ours is a 2002 because of this." +Clipped from: [https://bids.auctionbymayo.com/auctions/29763/lot/3921926-2002-coachman-clipper-106-sport-pop-up-camper-dometic-refrigerator-suburban-furnace-vitco-2-burner-range-no-propane-tank](https://bids.auctionbymayo.com/auctions/29763/lot/3921926-2002-coachman-clipper-106-sport-pop-up-camper-dometic-refrigerator-suburban-furnace-vitco-2-burner-range-no-propane-tank) + +![LOGIN/REGISTER Auctions AUCTIONS Home / Auctions / Spring Into Adventure Cornerstone Showroom Auction / 2002 Coachman Clipper 106 Span Pop-Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN ITCIC510X35002745 Prev Lot Details Back to Catalog 2002 Coachman Clipper 106 Sport Pop- Up Camper, Dometic Refrigerator, Suburban Furnace, Vitco 2-Burner Range, No Propane Tank, VIN 1 TCIC510X35002745 Next Lot Lot Number: 3 Completed Start Time: 3/11/2024 AM Bid Count: 33 High bidder: 1376 Starting Bid: S 10.00 Bid Increment: 550.00 Bid History Auction Info Terms Item Location Contacts Quick Links Auctions User Links Login / Register Current Bid: S 1,950.00 End Time: 3/26/2024 Bidding complete Removal Times 0000 Print Page Other Information Privacy Policy Terms & Conditions ](Exported%20image%2020240808114234-0.jpeg) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/2021 first family camp devotions.md b/OneNote/Ben's Notebook/Quick Notes/2021 first family camp devotions.md new file mode 100644 index 0000000..447e9c0 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/2021 first family camp devotions.md @@ -0,0 +1,13 @@ +1 Peter 2:9–10 (ESV): But you are a chosen race, a royal priesthood, a holy nation, a people for his own possession, that you may proclaim the excellencies of him who called you out of darkness into his marvelous light. 10 Once you were not a people, but now you are God’s people; once you had not received mercy, but now you have received mercy. + +- Comfort for his readers, going through suffering +- They have an identity +- Humans have a deep desire to belong. We go to great lenths, even gang membership tied to desire to have a family, a group to call their own. +- Readers we're not fitting in to the Roman culture--persecution was there or coming +- Yet they belonged to a world wide, shared identity--the body of Christ +- No ordinary, ho hum club, but royal, preistly and with a mission: to proclaim His excellencies +- We have common fellowship the world over, no matter where we go. +- Common experiences, common faith +- I can see why it was comforting to these suffering believers: they were not alone, but part of a special group: the people of God +- We are too, comforted, invigorated, with a purpose and mission and much to do +- A great gift got Gods through salvation \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Aldi.md b/OneNote/Ben's Notebook/Quick Notes/Aldi.md new file mode 100644 index 0000000..8b97646 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Aldi.md @@ -0,0 +1,19 @@ +- [x] Cauliflower pizza +- [x] Bagels +- [x] Pretzels +- [x] Chocolate PB filled cookies +- [x] Cheddar turtles +- [x] Milk +- [x] Eggs +- [x] Decaf coffee +- [x] Honey +- [x] unsweetened applesauce +- [x] Maple syrup +- [x] Life cereal (generic) +- [x] Sugar +- [x] 4 boxes Waffles +- [x] Frozen corn x2 +- [x] Frozen veggies +- [x] Ground Beef 3-4 lb +- [x] String cheese x2 +- [x] 3 bags of shredded cheese \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Announcements 12172023.md b/OneNote/Ben's Notebook/Quick Notes/Announcements 12172023.md new file mode 100644 index 0000000..b605ec7 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Announcements 12172023.md @@ -0,0 +1,7 @@ +• The speaker for today is Steve Price. +• The speaker next Sunday will be Steve Price. A special Sunday School Christmas presentation is planned. +• The weekly prayer meeting will be at the chapel this Wednesday starting at 7:00. It will be available over Zoom. +• Discipleship weekend with John Heller will be Saturday, Jan 27. +• The chapel will host a spring conference with David Dunlap, March 12-17 (Wed-Sun). Details later. +• The regular Sunday/Wednesday meeting schedules will be kept through the Christmas/New year holidays (weather permitting). +• If you have any question whether a meeting may be canceled because of weather, check the chapel website home page. Any schedule changes will be posted there. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Announcements.md b/OneNote/Ben's Notebook/Quick Notes/Announcements.md new file mode 100644 index 0000000..5703a4b --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Announcements.md @@ -0,0 +1,16 @@ +- Bouchie’s 18th wedding anniversary today +- Speaker this Sunday – Matt Hebert +- Speaker next Sunday – Alfred Lutengya +- The Wednesday night prayer meeting will be at the chapel starting at 7:00. It will be available over Zoom. +- An all-day discipleship meeting is planned for Saturday, September 10. Details will be announced later. +- There is a Sunday School room renovation project going on downstairs from now until September 10. The downstairs will not be available for chapel activities until then. Please keep little children away from the downstairs +- David not ICU. +- Announcement please!🤩 + +- if anyone has any photos from either the chapel game nights or the womens brunch, or the fall fest even, please send them to the chapel email so they can be printed and displayed on bulletin boards + +ladies prayer partner, monthly, let Anne Marie know if you don’t want to do it or join + +All chapel camp out, October 7-9, not fully planned, will have signup sheet on back door, need to know enough spots to have + +Call on Kevin \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Baby sitters.md b/OneNote/Ben's Notebook/Quick Notes/Baby sitters.md new file mode 100644 index 0000000..9720d63 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Baby sitters.md @@ -0,0 +1,14 @@ +| | | +| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Name** | **Notes** | +| Tina Spragg | Might be eager to earn some money, but leaving soon for Iowa | +| Courtney Spragg | Don't know how she'd feel, having had miscarriages and no kids of her own. Can talk to Tina to get some insight, possibly | +| Mom and Dad Ramey | Already doing Fridays with the boys, might be interested in altering the Friday schedule to take David in addition to other boys for a date night | +| Sara and Anthony | Always nice about it and wanting to, but having a baby soon and probably shouldn't count on them being available | +| Emily Bouchie | Lives far away, not sure of availability or desire to come all the way up here | +| Lizzy Bouchie | Also far away, not sure of desire, but probably would do a good job | +| Goodwin girls | Don't know them well enough yet | +| Olivia Price | Would feel strange about asking, easy to imagine she'd feel demeaned | +| Briels | Hard to ask them, what do we offer? They haven't asked us, usually get babysitters | +| Liz Wardell | Would probably be willing, but we don't know their responsibility capacity or much about their parenting style or their marriage | +| | | \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Book recommendations.md b/OneNote/Ben's Notebook/Quick Notes/Book recommendations.md new file mode 100644 index 0000000..7c4ab05 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Book recommendations.md @@ -0,0 +1,2 @@ +- Francis Chan, gospel centered Marriage +- Heirs Together \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Boundaries on Jon & Juli situation.md b/OneNote/Ben's Notebook/Quick Notes/Boundaries on Jon & Juli situation.md new file mode 100644 index 0000000..bcb4f30 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Boundaries on Jon & Juli situation.md @@ -0,0 +1,5 @@ +1. Kids never alone with Jon and JuliZ +2. Kids not to sit under teaching from either, especially if we cannot be present (think kid's Sunday school at RVCF or camp teaching) +3. We're OK with him leading singing (if we are present) because we see the potential damage of his exaggeration as minimal +4. No "limits" or requests for Joel and Annette when they visit to "not talk to Jon while you're here" or "don't talk about the situation". We want to bear their burdens as best we can. We think we should control how we engage in any conversations to encourage, listen, respond, but not try to "figure it out" or offer advice. In other words, try to limit our emotional involvement. +5. We'll answer any calls or texts from Jon or Juli but not engage on anything related to their marriage--directly letting them know that if needed. But, we want to be available to help where it's possible with practical things we know can benefit. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Brisket.md b/OneNote/Ben's Notebook/Quick Notes/Brisket.md new file mode 100644 index 0000000..9c3bfe4 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Brisket.md @@ -0,0 +1,5 @@ +1. 3 hours in brine in frig +2. 1 hour to come to room temp +3. Smoke 9 hrs to 165 +4. Smoke 3 hrs to 205 +5. 2-3 hrs in cooler \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Camp packing list.md b/OneNote/Ben's Notebook/Quick Notes/Camp packing list.md new file mode 100644 index 0000000..8f9abb2 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Camp packing list.md @@ -0,0 +1,10 @@ +- [ ] Pack n play +- [x] Floaties for Abel and Gideon +- [x] Life jacket for Ethan +- [x] Stroller +- [ ] Suitcases +- [x] Emergency tool bag +- [x] Fishing poles and tackle box +- [x] Flashlights +- [x] Slip on sandals +- [x] Swimming trunks \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Chapel announcements 115.md b/OneNote/Ben's Notebook/Quick Notes/Chapel announcements 115.md new file mode 100644 index 0000000..a57bd40 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Chapel announcements 115.md @@ -0,0 +1,12 @@ +- [ ] The speaker for today is Ben Ramey +- [ ] The speaker for next Sunday will be Charlie Fizer. +- [ ] The young people’s Bible study will meet this evening at 6:45, location to be announced. +- [ ] Pathways will meet this Wednesday starting at 5:30. Contact Grayson or Amy Price for details. +- [ ] The weekly prayer meeting will be at the chapel this Wednesday starting at 7:00. It will be available over Zoom. +- [ ] There will be a baby shower at the chapel for Maggie Weaver this Thursday evening starting at 6:15. Contact Jackie Price or Amy Price for details. +- [ ] There will be a men’s meeting this Thursday evening starting at 7:00. Zoom only. +- [ ] There will be a bonfire at the chapel this Friday evening. Details to be announced. 6-9 pm, we know about the conference +- [ ] There will be a traditional chapel potluck meal next Sunday, November 12, following the Family Bible Hour. +- [ ] Friday youth night in Lawrence, Bouchie’s taking people, Scott DeGroff speaking +- [ ] Welcome Gilberto and Alicia Torrens from chihuahua, MX, speaking at Spanish meeting this afternoon +- [ ] Read letter from Sam \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Commentary summary.md b/OneNote/Ben's Notebook/Quick Notes/Commentary summary.md new file mode 100644 index 0000000..d29ce6f --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Commentary summary.md @@ -0,0 +1 @@ +Exegetical summary series \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Countries I've visited.md b/OneNote/Ben's Notebook/Quick Notes/Countries I've visited.md new file mode 100644 index 0000000..532b286 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Countries I've visited.md @@ -0,0 +1,17 @@ +1. US +2. Canada +3. Austria +4. England +5. Kazahkstan +6. Romania +7. Italy +8. Poland +9. Germany +10. Hungary +11. Bulgaria +12. Switzerland +13. Scotland +14. Ireland +15. France +16. Holland +17. Russia \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Cynthia Anderson call.md b/OneNote/Ben's Notebook/Quick Notes/Cynthia Anderson call.md new file mode 100644 index 0000000..eae3be5 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Cynthia Anderson call.md @@ -0,0 +1,19 @@ +Endorsement + +- App to refinance + + - 450 appraisal + - 1500 fee + - 12 months property tax (?) + - 20 yr @ + - 905 = principal + interest +- Endorsement + + - 1100 fee + - No appraisal + - 3.0% + - P + I = 907 + - Less paperwork + - Loan servicing dept. would serve + - Mail, signature + - Acquire appraisal \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/David r obey start point.md b/OneNote/Ben's Notebook/Quick Notes/David r obey start point.md new file mode 100644 index 0000000..9c9c5ad --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/David r obey start point.md @@ -0,0 +1,11 @@ +David r obey start point +Cory, Joey and me have stoves +Ticks are a big deal +Don't think we'll make it to Cornell (nearest town) + +- [ ] Tick spray +- [x] Baby wipes +- [x] 1 gallon Ziplocks +- [ ] More freeze-dried meals (academy sports?) +- [ ] Jerky +- [ ] Trail mix \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Financial planning notes.md b/OneNote/Ben's Notebook/Quick Notes/Financial planning notes.md new file mode 100644 index 0000000..9cefc4d --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Financial planning notes.md @@ -0,0 +1,13 @@ +What we really need a month: +$4060 / month +Giving: $807 +Monthly bills: $1800 +Monthly expense: $1150 +Short-term savings: $250 +Christmas: $60 If wanted to be generous: $4500 **Total extras per month** +Long term disability supplemental: $51.09 / month +Increased term life for Ben: $55 / month +Term life for Grace: $24 / month Total: $110 **Questions** +- Long term disability: what is the indexed income benefit (COLA)? +- What are the long term disability dividends? +- Why does our retirement totals equal about $1.9m but still show a $1.3m shortage when need is shown as just $2m? \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/GIDEON DRAWING 1.md b/OneNote/Ben's Notebook/Quick Notes/GIDEON DRAWING 1.md new file mode 100644 index 0000000..fecc88f --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/GIDEON DRAWING 1.md @@ -0,0 +1 @@ +> [!caution] This page contained a drawing which was not converted. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Grace's birthday shopping list.md b/OneNote/Ben's Notebook/Quick Notes/Grace's birthday shopping list.md new file mode 100644 index 0000000..5b6f0f7 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Grace's birthday shopping list.md @@ -0,0 +1,7 @@ +- [x] Croissants (at least 8) +- [x] Chicken salad +- [x] Chips +- [x] Ice tea +- [x] Lemonade +- [ ] Flowers +- [x] Donuts \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Groceries.md b/OneNote/Ben's Notebook/Quick Notes/Groceries.md new file mode 100644 index 0000000..826fd67 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Groceries.md @@ -0,0 +1,4 @@ +- [x] Milk +- [x] Eggs +- [x] Ice cream +- [x] Half and half \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Hy-vee.md b/OneNote/Ben's Notebook/Quick Notes/Hy-vee.md new file mode 100644 index 0000000..0294706 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Hy-vee.md @@ -0,0 +1,6 @@ +- [x] Chocolate chop cookies for grace +- [x] Flowers +- [x] Card +- [x] Other candy? +- [x] Flour, white unbleached +- [x] Strawberries \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Jeremy Bassett, Burundi work prayer requests.md b/OneNote/Ben's Notebook/Quick Notes/Jeremy Bassett, Burundi work prayer requests.md new file mode 100644 index 0000000..ac6d6d3 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Jeremy Bassett, Burundi work prayer requests.md @@ -0,0 +1,18 @@ +Bible school + +- Thinking about the future, the next generation of teachers +- Looking for knowledge of the word, good character, proximity to the school + +Other work + +- Bible map translation +- Emmaus course translation, 16 when they arrived, 39 now, 9 more in production. Obstacle in printing: only printing machine broke, long time to get part and fixed, now have two printing machines +- Need people who can run machines, need space to lay out pages, need team to put books together, main challenge is electricity availability, on 2 hours a day sometimes, have generator, but fuel shortages +- Pray for ability to print courses + +Work + +- Working with others to overcome barriers in a godly way, not resorting to culturally acceptable things that are ungodly +- Walk rightly, be example +- Do things god’s way, not man’s way +- Challenge for Burundian me who also see these practices as wrong, but face the challenges of speaking against their countrymen and breaking strong interdependent ties \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Jozwick Sam’s list.md b/OneNote/Ben's Notebook/Quick Notes/Jozwick Sam’s list.md new file mode 100644 index 0000000..d38174c --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Jozwick Sam’s list.md @@ -0,0 +1,2 @@ +- [ ] 2 cascade dishwasher pods, total clean 105 pods +- [ ] One normal Sam’s club brand trash bags \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Losing a baby.md b/OneNote/Ben's Notebook/Quick Notes/Losing a baby.md new file mode 100644 index 0000000..3f6e31a --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Losing a baby.md @@ -0,0 +1,16 @@ +It was nice when people… + +- Gave us gift cards so getting and paying for food wasn’t an issue +- Making us meals, Grace still had to recover from delivery +- Gave to us financially for the funeral +- For closer friends: just asking us what we needed, having us over +- Close parents: dad helped me with funeral arrangements +- Close parents: graces parents came and just helped us day to day +- Other moms: Becca and Jackie invited grace to Powell gardens, seeing beautiful things after something awful happened +- Kelly Douglas called grace and asked her what happened and asked her questions like whether she was getting outside and eating, etc that helped grace do some practical things that were good + +Good things we did… + +- Reading scripture at every meal, when we woke up and went to sleep +- Even though it felt strange, getting back to normal things like yard work +- I healed faster than Grace and it was really helpful for Grace when I told her that I wanted her to tell me how she was feeling and to communicate with me, otherwise Grace was feeling like there was distance growing between us that might never have been fixed \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Lowes 1.md b/OneNote/Ben's Notebook/Quick Notes/Lowes 1.md new file mode 100644 index 0000000..b584921 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Lowes 1.md @@ -0,0 +1,4 @@ +- [ ] Straight valve for upstairs toilet +- [ ] Sheetrock anchors for boys hangers +- [ ] Caps for laundry room faucet +- [ ] Cap for laundry room lint exhaust \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Lowes 2.md b/OneNote/Ben's Notebook/Quick Notes/Lowes 2.md new file mode 100644 index 0000000..074b429 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Lowes 2.md @@ -0,0 +1,4 @@ +- [ ] 3/4 PEX pipe +- [x] 3/4 tees (2) +- [ ] 3/4 hose attachment 90s (2) +- [ ] 3/4 anchors \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Lowes 3.md b/OneNote/Ben's Notebook/Quick Notes/Lowes 3.md new file mode 100644 index 0000000..24752fa --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Lowes 3.md @@ -0,0 +1,4 @@ +- [x] Hooks to hang pots +- [ ] Brushed bronze towel rack for kitchen (or oil rubbed bronze) +- [ ] Look at flooring +- [ ] Thompson’s water seal \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Lowes shopping list.md b/OneNote/Ben's Notebook/Quick Notes/Lowes shopping list.md new file mode 100644 index 0000000..6748339 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Lowes shopping list.md @@ -0,0 +1,25 @@ +- [x] Door stopper for boys room +- [x] Drywall anchors for boys hangers +- [x] Concrete wall anchors +- [x] 220 dryer outlet (determine 3 or 4 prong), box and cover +- [ ] 10-gauge wire (measure distance) +- [ ] Conduit for 120 and 220 vertical wire up basement wall? +- [x] Wall box for 120 plug for washer +- [x] Gang box for splitting off 220 going up to current dryer +- [x] Gang box for splitting off 120 going up to current washer outlet +- [x] PEX piping, hot and cold (need to measure distance +- [x] PEX elbows (determine number, at least 2) +- [x] PEX clamps (determine number--at least 4) +- [x] PEX hangers (need every 32 inches for horizontal, every 4-6 feet vertical, determine how many) +- [x] PEX tools +- [x] Copper-to-PEX sharkbite Ts to tee off of copper going to washer +- [x] Washer water spigot box thing +- [ ] Dryer vent piping (determine how many) +- [ ] Dryer vent elbows (determine how many, 45 or 90 or both) +- [x] 3/4 copper pipe hooks +- [ ] Floor vents (4 - 4x10, 1 - 2x10) +- [ ] Floor vent catchers +- [x] 10 gauge wire nuts +- [ ] 6 ft drainpipe +- [ ] 1 3x? Tee +- [ ] 1 thing to stick washer hose in stand pipe \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Lowes.md b/OneNote/Ben's Notebook/Quick Notes/Lowes.md new file mode 100644 index 0000000..50c9917 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Lowes.md @@ -0,0 +1 @@ +Pantry: 70x67x70 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Lowe’s.md b/OneNote/Ben's Notebook/Quick Notes/Lowe’s.md new file mode 100644 index 0000000..a5c27fe --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Lowe’s.md @@ -0,0 +1,4 @@ +- [ ] Long handled flat head screwdriver +- [ ] Blue underlayment +- [ ] Dishwasher drain pan, something like 23“ x 20“ +- [ ] New tool pouch \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Meeting with Bo Merrill, 3232020.md b/OneNote/Ben's Notebook/Quick Notes/Meeting with Bo Merrill, 3232020.md new file mode 100644 index 0000000..e69de29 diff --git a/OneNote/Ben's Notebook/Quick Notes/Messages ideas for 9292019.md b/OneNote/Ben's Notebook/Quick Notes/Messages ideas for 9292019.md new file mode 100644 index 0000000..7543ec4 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Messages ideas for 9292019.md @@ -0,0 +1,38 @@ +1. Faith and works + + 1. How do they work together? + 2. Abraham and Sarah + + 1. God told them they would have a child + 2. Both very old--beyond child-bearing years + 3. Time passed after God promised them a child + 4. Eventually, "gave up" and allowed Hagar into the mixed + 5. God's plan all along was to give them a child through the means that He had always intended for children to be born: from within a marriage--between a man and his wife, no outside interference + 6. Conclusion + + 1. Faith _should_ have meant trusting God that now extra-biblical method was going to be needed to accomplish God's own promise + 2. Knowing God's plan is children within a marriage and give that Abraham and Sarah were already married, though tough, they should have waited for God to accomplish this with in the confines of their marriage + 3. Going at it "according to the flesh" was forcing the promise of God + 4. Going at it by faith would have meant + + 1. God's perfect timing + 2. No marital problems + 3. No generational problems (Ishmael's people are the Arabs) + 3. Paul going to Rome + + 1. God told him he was going to testify in Rome + 2. Even though he was shipwrecked and snake bit him, he knew he would survive and get through all of it (though, I'm sure, nothing felt easy) because he trusted Gods word + 3. So, his actions (works) reflected his faith in God's word because he believed God, no matter what happened in the interim. + 4. Moreover, he simply made his way to Rome. + + 1. Would you mistrust your choice of ship once you saw the foolishness of the captain and storm coming, causing a shipwreck? + 2. Paul didn't seem to really ask any questions--he just went, finding his way along. The "failures" along the way--the amazing resistance he met with (snakes, shipwrecks, delays)--were not in his thinking in terms of causing him to doubt _his_ decision making--that is, that he "must have done something wrong" because it didn't look like he was getting to Rome any time soon +2. Hell + + 1. Words used for it? + 2. How is it described in the NT and OT? + 3. Can I really do it justice in a weeks' worth of study? +3. Book study + + 1. Hebrews? Have only just started…don’t know much yet at all. Seems like Hebrews has been done a lot lately + 2. Something in the OT? \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Mom & Dad's 40th Anniversary.md b/OneNote/Ben's Notebook/Quick Notes/Mom & Dad's 40th Anniversary.md new file mode 100644 index 0000000..eafbb3f --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Mom & Dad's 40th Anniversary.md @@ -0,0 +1,31 @@ +- 36 confirmed people including family +- Going 4-6pm +- 4-4:45 guests arrive, finger food +- + - Coffee + - Cake + - etc +- Sara and Anna at double doors +- Cards at table downstairs +- Sign upstairs pointing people to downstairs +- Photo booth idea: +- + - I take photos of people in front of 40 sign + - Also, random pictures of the party, people, things going on + - Lots of photos + - Will compile pictures into book + - Family photo +- Mom & Dad don’t know program: +- + - White cake with white icing + - 4:45 or so, Ben will announce Mom & Dad to come up and cut cake and stuff in eat other’s mouth + - Anna & Sara cut cake for others + - Ben asks people to take seat with cake for slideshow (about 10 minutes) + - Anna will start slideshow + - Once done, people can stay seated for Story Time (Ben will announce: good stories, sad, happy, memories) + - + - Lane & Aimee (ask Lane to open it up) + - Ray Miller + - Jack Boehner + - Whoever else… + - Official program is over: Ben thanks everyone for coming, please stay as long as you like, etc \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Movies to watch.md b/OneNote/Ben's Notebook/Quick Notes/Movies to watch.md new file mode 100644 index 0000000..e6e883b --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Movies to watch.md @@ -0,0 +1,2 @@ +- [ ] Brooklyn +- [ ] A family thing \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Next book club.md b/OneNote/Ben's Notebook/Quick Notes/Next book club.md new file mode 100644 index 0000000..26de103 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Next book club.md @@ -0,0 +1,4 @@ +Jacobergers +Wardells +Weavers +Grayson Prices \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Nightstand 26 by 17 by 26.md b/OneNote/Ben's Notebook/Quick Notes/Nightstand 26 by 17 by 26.md new file mode 100644 index 0000000..f56b68a --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Nightstand 26 by 17 by 26.md @@ -0,0 +1,5 @@ +Nightstand 26 by 17 by 26 +Headboard 64 by 42 by 3 +Chest of drawers 37 57 19 +Dresser 66 by 19 by 32 +Dresser mirror 56 by 2 and 1/2 by 38 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Notes on Brock's YouTube channel messages regarding the Lord's Supper.md b/OneNote/Ben's Notebook/Quick Notes/Notes on Brock's YouTube channel messages regarding the Lord's Supper.md new file mode 100644 index 0000000..cd3ab7b --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Notes on Brock's YouTube channel messages regarding the Lord's Supper.md @@ -0,0 +1,33 @@ +# Message 1 + +New Testament reformation fellowship – expound Greek of "do this in remembrance of me" newtestamentfellowship.org + +Acts 2:42 – taking their meals together, continuing in breaking of bread (amongst other things) +Sense we get is that Lord's Supper in the context of actual meal together, celebrated often. + +Changes over history: orthodox forbade the taking of meals together (?) in favor of the eucharist. Restricted taking home provisions, having a meal in church building. + +Third counsel of carthage 393 AD and second counsel of orleans, reiterated prohibition on feasting in churches. + +Supper turned into a ritual instead of a meal. Supper was always holy and honorable, but not a ritual. It was a meal together, remembering covenant the Lord made for us. + +In early church, there was no building—perhaps early believers met in the temple. They met in homes. + +"and" (kai) missing from Acts 2:42 between "fellowship" and "breaking of bread". Implication being that fellowship was accomplish by the breaking of bread together. + +# Message 2 + +Topic: practical considerations for "love feasting". + +Good point: we don't like to change in church and one of the reasons is that doing so has to admit that were either ignorant of how we ought to do something or we were doing it wrong or with adjustments needed. + +## How would a large church do a love feast? + +First we need to ask: + +- What is an appropriate church size (locally, of course)? +- What are practical intelligent ways to practice this? + +Of course, after Peter preaches on Pentecost the church goes from 120 to 3000! In one day, the church grew tremendously. Yet, they seemed to adapt quite well. + +Answer is that the ancient church probably never met in groups larger than 60-70 people. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Photo downloads.md b/OneNote/Ben's Notebook/Quick Notes/Photo downloads.md new file mode 100644 index 0000000..b0ba46e --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Photo downloads.md @@ -0,0 +1 @@ +Done through dec 2010 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Possible next five aspects study guys.md b/OneNote/Ben's Notebook/Quick Notes/Possible next five aspects study guys.md new file mode 100644 index 0000000..697c91f --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Possible next five aspects study guys.md @@ -0,0 +1,6 @@ +- Gus Spragg +- Noah Wardell +- Kai? +- Quinn +- Grayson +- Christian \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Prayer requests 3272024.md b/OneNote/Ben's Notebook/Quick Notes/Prayer requests 3272024.md new file mode 100644 index 0000000..dd93302 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Prayer requests 3272024.md @@ -0,0 +1,14 @@ +- [x] Rob Kerrs brother found dead in apartment, unbeliever as far as Rob knows +- [x] Darrin Dorsey, grandmother needing care, mother doing it, home found, Darrin’s timing going to Japan +- [x] Rebekah McAdams grandmother passed away +- [x] Carls dad, episodes of losing consciousness, low blood pressure, having episodes again , protection against falls +- [x] Nicole, out of house, temporary housing for a month, around here or in Wichita, needs hours at work +- [x] Stafford family, younger brother and wife lost baby +- [x] Rose hill kids club going well, better behavior from kids +- [x] Ken has stress test tomorrow, don’t know what to expect +- [ ] Lizzie and Steve Bouchie at bob jones for visiting week, safe travels, wisdom in deciding on college +- [x] Ladies retreat +- [x] Smiths, Hains, Carders +- [x] Ian Barnes getting weaker physically +- [x] Men’s breakfast on April 13th +- [x] Pregnant mothers: Liz, Beulah, Victoria \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Prayer requests.md b/OneNote/Ben's Notebook/Quick Notes/Prayer requests.md new file mode 100644 index 0000000..a936048 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Prayer requests.md @@ -0,0 +1,19 @@ +- Matthew and Beulah (email), travel, back pain, +- Dad traveling? +- Travis and Joanna, settling in in Dallas +- Brock smith, thanks for gift, extension of visa, kids club going well, registering Barzel +- Lyle Rockhold’s funeral +- Mothers, new, about to be, Joanna, Beulah, Liz +- KC shooting at parade, one killed, 22 wounded, half children, George we’re on duty +- Many needs in turkey, earthquake devastation, need for prefab housing +- Moldova, poverty , alcoholism bad, bad living situations +- Steve involved in planning for future CMML outreaches +- Focus conference in Wichita, several traveling +- Darrin leaving Saturday for Florida and then Japan +- Alfred not feeling well, need replacement +- Anna, pray for Reese cast stage four long cancer +- Joseph, coworker Joe his dad passed away Monday, not believers +- Zach Robertson, bad abdominal pain +- Rose hill kids club, incident where some kids are name calling, mother encouraged retaliation, need wisdom in dealing with it +- Ken and Luanne visiting Jenny and Daniel this weekend +- \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Pros and cons of moving to Kansas.md b/OneNote/Ben's Notebook/Quick Notes/Pros and cons of moving to Kansas.md new file mode 100644 index 0000000..63c8e21 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Pros and cons of moving to Kansas.md @@ -0,0 +1,21 @@ +Pros + +1. Financial help for education through Maize school district +2. Closer to the chapel +3. Closer to most people who go to the chapel for easy fellowship, etc +4. More opportunities for the boys to grow friendships with Chapel kids +5. A new house with the right features would make it easier for elderly people or people like David and Rachel to stay with us +6. Doing young peoples things at our house when the the boys are that age would be much +7. We could more easily be involved in ministry to the Chapel like mowing at the chapel, helping people move, being involved in pathways, etc. +8. With the right features, a house could have an office for me, and at least two rooms for the boys, especially as they get older and need more space + + +Cons + +1. Moving away from Ava for boys +2. Losing sentimental attachment for the kids +3. Housing prices are very high +4. Interest rates are very high +5. We don’t have money saved up to move +6. The work of changing addresses, tax things, etc. for moving to a new state +7. Moving is a hassle! \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Q for Anthony.md b/OneNote/Ben's Notebook/Quick Notes/Q for Anthony.md new file mode 100644 index 0000000..7c81d89 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Q for Anthony.md @@ -0,0 +1,4 @@ +Kevin Berger +Daniel mauk + +Ben knows them, does Anthony? \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Questions for PATHAR.md b/OneNote/Ben's Notebook/Quick Notes/Questions for PATHAR.md new file mode 100644 index 0000000..ca1a428 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Questions for PATHAR.md @@ -0,0 +1,38 @@ +Company + +1. Major clients? +2. Future outlook?   + + 1. New products? + 2. Improved products? + 3. What new features? + Technical + +1. Unit tests? +2. Quality assurance process? +3. Version control? +4. Adherence to agile? +5. New products/projects in the works? +6. Release scheduling process? + + 1. Who can release? + 2. Server setup? +7. Continuous integration tools? (Jenkins, Octopus?) +8. Difference in one-software-product work? +9. Team make-up? + + 1. Experience + 2. Who's in charge + 3. How much input does each developer have? +10. Architectural decisions? + + 1. Who makes them? + 2. How much has it changed? +11. How old is Dunami? + HR + +1. Work from home? +2. Vacation? +3. Paid holidays? +4. Salary? +5. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Rory 14 15 20 49, 7 10 12 29.md b/OneNote/Ben's Notebook/Quick Notes/Rory 14 15 20 49, 7 10 12 29.md new file mode 100644 index 0000000..b568080 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Rory 14 15 20 49, 7 10 12 29.md @@ -0,0 +1,4 @@ +Rory 14 15 20 49, 7 10 12 29 +Ben 23 10 5 38, 14 12 7 33 +Nat 15 11 6 32, 13 9 19 41 +Chris 20 16 10 46, 9 11 18 38 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Sam’s Club 1.md b/OneNote/Ben's Notebook/Quick Notes/Sam’s Club 1.md new file mode 100644 index 0000000..da8d169 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Sam’s Club 1.md @@ -0,0 +1,16 @@ +- [x] Contact solution +- [x] Nuts +- [x] Black beans +- [x] Parmesan cheese +- [x] granola bars +- [x] Cheerios (regular) +- [x] Milk (2 gal) +- [ ] Waffles +- [x] Cheese sticks +- [x] Shredded cheese +- [x] Freezies +- [x] Fizzy water +- [x] Tortillas +- [ ] Hose reel +- [x] Dinner rolls +- [x] Cream cheese \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Sam’s club 2.md b/OneNote/Ben's Notebook/Quick Notes/Sam’s club 2.md new file mode 100644 index 0000000..3f62129 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Sam’s club 2.md @@ -0,0 +1,18 @@ +- [ ] Kids smarty pants vitamins +- [x] Shampoo +- [x] Size 4 diapers +- [x] Overnight pull ups +- [x] Nuts +- [x] Meat sticks +- [x] Cheese sticks +- [x] Onion flakes +- [x] Granola Bars +- [x] Natural PB +- [x] PLAIN cheerios +- [x] Yogurt +- [x] Milk +- [x] Salted butter +- [x] Sparkling Water +- [x] Ground beef +- [x] Tortillas +- [x] Waffles \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Sam’s club 3.md b/OneNote/Ben's Notebook/Quick Notes/Sam’s club 3.md new file mode 100644 index 0000000..0ae9c0e --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Sam’s club 3.md @@ -0,0 +1,5 @@ +- [x] Dinner rolls +- [x] Nuts +- [x] Soda water +- [x] Frozen chicken breasts +- [x] Bag of small potatoes \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Sam’s club.md b/OneNote/Ben's Notebook/Quick Notes/Sam’s club.md new file mode 100644 index 0000000..04bb01c --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Sam’s club.md @@ -0,0 +1,17 @@ +Sam’s Club + +- [x] Kids Smarty-pants vitamins (white bottle with orange cap) +- [x] Baby wipes +- [x] Mixed nuts salted 😉 +- [ ] UNBLEACHED all purpose flour +- [x] White vinegar (or apple cider vinegar if you can’t find white) +- [x] Butter +- [x] Half & half +- [x] Big bag of shredded cheese +- [x] Eggs +- [x] Meat sticks +- [x] Paper towels +- [x] Ground beef +- [x] Cheese sticks +- [x] Tortillas +- [x] Cascade dish detergent pods \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Sam’s.md b/OneNote/Ben's Notebook/Quick Notes/Sam’s.md new file mode 100644 index 0000000..d00231a --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Sam’s.md @@ -0,0 +1,18 @@ +- [x] Nuts +- [x] Bread +- [x] Three bags of bakery rolls +- [x] Ground beef +- [x] Sparkling water +- [x] Meat sticks +- [x] Cheese sticks +- [x] Frozen blueberries +- [ ] Popcorn +- [x] Tortillas +- [x] Cream cheese +- [x] Half and half +- [x] Salted butter +- [x] Granola bars +- [x] Parmesan cheese +- [x] Peanut butter +- [x] Chocolate chips +- [x] Crackers \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Scores.md b/OneNote/Ben's Notebook/Quick Notes/Scores.md new file mode 100644 index 0000000..2bca22f --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Scores.md @@ -0,0 +1,2 @@ +David: 36 44 74 85 93 113 +Ben: 10 31 40 64 96 133 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Shades to sell.md b/OneNote/Ben's Notebook/Quick Notes/Shades to sell.md new file mode 100644 index 0000000..01192a7 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Shades to sell.md @@ -0,0 +1,9 @@ +Natural wood +2 29x70 +4 34.5x70 one broken slat + +Wooden Roman shades +2 34.5x70 + +Reddish bamboo Roman shades +2 34.5x70 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Shopping List 1.md b/OneNote/Ben's Notebook/Quick Notes/Shopping List 1.md new file mode 100644 index 0000000..d1682cb --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Shopping List 1.md @@ -0,0 +1,3 @@ +- [x] Bug spray for the house +- [x] CR2016 battery for Ethan's watch +- [x] Large ant traps? \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Shopping list 2.md b/OneNote/Ben's Notebook/Quick Notes/Shopping list 2.md new file mode 100644 index 0000000..eed7358 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Shopping list 2.md @@ -0,0 +1,8 @@ +- [x] Gallon of whole milk +- [x] Two bags of chips +- [x] Two kinds of bread +- [x] Three deli meats +- [x] Two deli cheeses +- [x] Avocado mayo +- [x] Stuff for berry salad +- [x] Paper plates \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Shopping list.md b/OneNote/Ben's Notebook/Quick Notes/Shopping list.md new file mode 100644 index 0000000..47909da --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Shopping list.md @@ -0,0 +1,14 @@ +- [x] Asparagus + +- [x] Two large (family size) Campbell's tomato soup cans +- [x] Parmesan cheese +- [x] Decaf roasterie + +- [x] Block of sharp cheddar +- [x] Two jugs of milk +- [x] Paper towels +- [x] Paper plates +- [x] Dish soap +- [x] Scrubbers + +- [x] Anchors \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Small group ideas 2015.md b/OneNote/Ben's Notebook/Quick Notes/Small group ideas 2015.md new file mode 100644 index 0000000..ebee9c5 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Small group ideas 2015.md @@ -0,0 +1,21 @@ +- Group picnic with other small groups +- Help the Barnes again with gardening +- Ballgame (T-Bones or Royals) +- Christmas gift baskets +- Meals for elderly/needy once a quarter +- Camping (whole chapel? small groups?) +- Movie night was fun (do again) + +Folks to help + +- Barnes +- Ray Miller +- Lucille Sommerville +- (February) Marta Prieto - basket, like for Ray & the Barnes' +- Louis & Irene (rake yard) +- Rosie Williams (yard work) + +More people? + +- Make announcement at the chapel +- Invite Sheri \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Songs.md b/OneNote/Ben's Notebook/Quick Notes/Songs.md new file mode 100644 index 0000000..91eddda --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Songs.md @@ -0,0 +1,3 @@ +- [ ] S179 Jesus loves the Little children +- [ ] H47 Jesus loves me +- [ ] 12 men went to spy in Canaan \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Sunday school songs.md b/OneNote/Ben's Notebook/Quick Notes/Sunday school songs.md new file mode 100644 index 0000000..025a887 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Sunday school songs.md @@ -0,0 +1,3 @@ +H47 Jesus loves me +49 Dear Jesus +47 my sheep hear my voice \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Text to Joel.md b/OneNote/Ben's Notebook/Quick Notes/Text to Joel.md new file mode 100644 index 0000000..49c0e5d --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Text to Joel.md @@ -0,0 +1 @@ +Grace and I are sensing that there’s significant tension in the family about Jon and Juli. It’s hard for us to perceive what’s really going on, coming in from the outside as we are. So, it’s surprising to me that this particular issue seems to be such a big deal. I can’t imagine \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Things to appreciate about Grace.md b/OneNote/Ben's Notebook/Quick Notes/Things to appreciate about Grace.md new file mode 100644 index 0000000..eb6409d --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Things to appreciate about Grace.md @@ -0,0 +1,17 @@ +Things she does + +1. School for the boys + + 1. Planning + 2. Daily work to keep them going +2. Decorating the home +3. Grocery shopping +4. Garden planning and planting +5. Decorative flower planting +6. Daily disciplining the boys +7. Social scheduling, initiative +8. Cooking several nights a week +9. Boys' baths +10. Clothes shopping for the boys (and me sometimes!) +11. Choosing Sunday clothes for the boys +12. Shopping for one-off needed items like ethan's school desk \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Todo.md b/OneNote/Ben's Notebook/Quick Notes/Todo.md new file mode 100644 index 0000000..3eb3c8f --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Todo.md @@ -0,0 +1,6 @@ +- [ ] Water tomatoes and garden +- [ ] Feed bunnies +- [ ] Throw boys laundry in +- [ ] Wash Grace’s sweatpants +- [ ] Bring Grace’s sandals +- [x] Get packages \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Tow of Ranger.md b/OneNote/Ben's Notebook/Quick Notes/Tow of Ranger.md new file mode 100644 index 0000000..5c6399b --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Tow of Ranger.md @@ -0,0 +1,2 @@ +ref number: 7645279 +roadside no.: 866 771 2101 \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Quick Notes/Truck notes.md b/OneNote/Ben's Notebook/Quick Notes/Truck notes.md new file mode 100644 index 0000000..d940135 --- /dev/null +++ b/OneNote/Ben's Notebook/Quick Notes/Truck notes.md @@ -0,0 +1,5 @@ +- Battery testing low, cus I don’t drive it much? +- Coolant ok, showing signs of breakdown +- Transmission fluid ok, showing signs of breakdown +- Temp gauge doesn’t work well, not accurate +- Coolant leak, never noticed before. Not sure how bad \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading Movies/How to read a movie.md b/OneNote/Ben's Notebook/Reading Movies/How to read a movie.md new file mode 100644 index 0000000..61a57bc --- /dev/null +++ b/OneNote/Ben's Notebook/Reading Movies/How to read a movie.md @@ -0,0 +1,148 @@ +I listened to an episode of Listening In in which Ken Boa was interviewed about an article he wrote on "How to 'Read' a Film" with ten steps. + +[http://kenboa.org/culture/how-to-read-a-film/](http://kenboa.org/culture/how-to-read-a-film/) + +Here's the text from the blog post. + +How to “Read” a Film +APRIL 30, 2018 / [KEN BOA](http://kenboa.org/author/kenboa/) / [CULTURE](http://kenboa.org/library/culture/) + +![Image of a camera lens](Exported%20image%2020240808114239-0.jpeg) + +Have you ever left the movie theater brimming with emotion but not quite sure how to describe or assess what you’d just seen and experienced? +Often, we intuitively know whether a movie was “good” or not, but many of us aren’t sure how to glean deeper insights or evaluate the quality and merits of a film.[1](http://kenboa.org/culture/how-to-read-a-film/#easy-footnote-bottom-1) +I have a great appreciation for films (especially ones made outside the USA), and for years I have taught both individual movies and general tips on how to “read” a film for that deeper meaning. While this article doesn’t tell you everything, I hope the 10-step process below will forever enhance the way you see and understand film. +First, a caveat: these 10 steps aren’t necessarily sequential; in other words, you may perform one or more steps out of sequence or even simultaneously. Each is essential to grasping the story and message of the film. +Step 1: Determine the Genre +If possible, try to find out a film’s genre prior to watching it. There are about 25 major genres today, plus a variety of subgenres. Some genres include: +_Western, education, comedy (many kinds, such as screwball, romantic, parody, satire, farce, and black comedy), sports, musical, horror, drama, science fiction, action/adventure, mockumentary, redemption, historical drama, love story, crime_ +Each genre has its own specific conventions in terms of setting, roles, events, and values (although these are not carved in stone). These have an impact on how you evaluate the film. For love stories, for example, the basic question to always ask is, “What’s to stop them?” and “Who are the ‘blocking characters” (the forces opposed to love in the story)? +Comedies differ significantly depending on the subgenre, which are distinguished by two factors: the focus of the comic attack and the degree of ridicule. +To the degree that a film is simply escapist entertainment, it should be viewed as such, and there will be little need for theological dialogue with it. But to the degree that a film, whether through fantasy or realism, and even when primarily entertainment, succeeds in artistically depicting life, it engages our lives. As it does, it educates, inviting our response as whole persons, including our religious convictions. +Step 2: Identify the Protagonist’s Quest & Character Arc +All films have at least one **protagonist** (sometimes more than one). This is the leading character—the hero or heroine who wants something. Protagonists’ journey to obtain the object of their desire (whether it’s love, justice, victory, revenge, freedom, or something else) is called their **quest**. +The **antagonist**(s) is the adversary of the protagonist; he or she (or they) tries to prevent the leading character from getting what he or she (or they) wants. +Character Arc +The finest screenwriting not only reveals true character, but arcs or changes that inner nature, for better or for worse, over the course of the telling. In the original _How the Grinch Stole Christmas!_ (1966) film, for example, the main character arcs from a cold-hearted, Christmas-hating hermit, to a warm-hearted, Christmas-loving friend of the “Whos.” +Point of View +A movie is normally told from one of three points of view: + +- **Omnipotent**: can go anywhere and see anything at any time (multiple perspectives) +- **Over-the-shoulder** of one character (a single perspective) +- **First-person narration** + +Step 3: Identify the Inciting Incident +While stories can always be simplified into three major parts—beginning, middle, and end—I think it is more helpful to consider this five-part design: + +1. Inciting incident +2. Progressive complications +3. Crisis +4. Climax +5. Resolution + +These five parts correspond to Steps 3–7 in this article. +Known as the “big hook” in Hollwood jargon, the **inciting incident** is the first major event of the story, and the primary cause for all that follows. It’s what sets the story into action. The inciting incident radically upsets the balance of forces in the protagonist’s life, swinging the protagonist’s reality to either the negative or the positive. The quest to restore balance forms the spine of the story, connecting the rest of the events. +The inciting incident prompts the story’s **major dramatic question**—and a desire to find out the answer incites and captures the audience’s interest until the last act’s climax. +Key Question to Ask +What does the protagonist want? +Step 4: Identify the Progressive Complications +After you’ve picked out the film’s inciting incident, watch for the **progressive complications** in the protagonist’s quest for the object of his or her desire. In other words, what makes life increasingly difficult for the leading character? More and more conflict arises as he or she faces greater and greater forces of antagonism, creating a succession of events that passes the point of no return. +The Role of Conflict +Conflict is to storytelling what sound is to music. The music of story is conflict. Nothing moves forward in the story without conflict. There are three sources of conflict (or antagonism) in a film (or any story): + +- **Inner conflict** (within the protagonist)—most obvious in the stream of consciousness genre +- **Personal conflict** (between protagonist and others)—clearly seen in soap operas +- **Extra-personal conflict** (an externally imposed threat to the protagonist)—especially evident in the action/adventure and farce genres + +Conflict may come from any one, two, or all three of these sources. Films with all three levels of antagonism offer a rich complexity. +Key Questions to Ask +How is the film creating conflict and resistance to the goal(s) of the protagonist? +Which type(s) of conflict is the protagonist encountering? +Step 5: Identify the Crisis +Crisis is the moment of ultimate decision. A protagonist’s quest has carried him or her through the progressive complications until all actions are exhausted, save one. He now finds himself at the end of the line. The next action is his last. No tomorrow; no second chance. This moment of dangerous opportunity is the point of greatest tension in the story as both protagonist and audience sense that the question “How will this turn out?” will be answered out of the next action. +The crisis is the story’s obligatory scene—the moment the audience has been anticipating since the inciting incident. It’s the encounter with the “dragon” that guards the protagonist’s object of desire. This “dragon” may be literal (as in _Jaws_ or _Jurassic Park_) or merely metaphorical (e.g., the dragon of meaninglessness). +The Crisis Decision +If there’s been any doubt about which **value** is central to the story, as the protagonist makes the crisis decision, the primary value comes to the fore. It’s in this moment that the protagonist’s willpower is most severely tested and, thus, his or her true character revealed. +Values in Film +Story values are the universal qualities of human experience that may shift from positive to negative, or negative to positive, from one moment to the next in a film. (In fact, without these changing value charges, a film isn’t worth watching). Examples of values are love, freedom, truth, courage, justice, loyalty, wisdom, strength, and excitement. These may turn to hate, slavery, lying, cowardice, injustice, betrayal, stupidity, weakness, and boredom (respectively)—and back again—during the course of a film. +Step 6: Identify the Climax +Think of the storyline of a film as beginning with some type of conflict, followed by rising action (progressive complications plus a crisis), culminating into a story climax, which is followed more briefly by falling action and resolution. +Always watch for **turning points** in a film. These twists and turns in a story are centered on the choice a character makes under pressure. Whether they’re minor or major, turning points have a fourfold effect on the audience: surprise, increased curiosity, insight, and new direction. +The ultimate turning point in a story, the **climax** is a revolution in values from positive to negative or negative to positive with or without irony—a value swing at maximum charge that’s absolute and irreversible. The meaning of that change moves the heart of the audience. +William Goldman argues that the key to all story endings is to give the audience what it wants, but not the way it expects. In Aristotle’s words, an ending must be both “inevitable and unexpected.” +The climax should be appropriate to the needs of the story. It may be catastrophic or outwardly trivial. Whatever it is, it’s the moment when the events swing to an absolute, irreversible negative or positive. +Step 7: Identify the Resolution +Resolution is the final step in the five-part story structure. The resolution has three possible uses: + +- To climax a subplot +- To show the spread of climactic effects (i.e., how lives were changed by the climactic action) +- As an audience courtesy (or slow curtain) to help the audience catch its breath, gather its thoughts, and leave the cinema with dignity + +Step 8: Determine the Plot Type +A film’s plot can be defined as the overall plan, scheme, or interrelated pattern of events moving through time to shape the storyline. +Four common plot types are described below. These types of stories differ by the type and number of protagonists or plots, how they present the flow of time, and how they portray reality. + +1. **Archplot**: In these stories, the screenwriter and director are trying to show the audience that life brings positive change, reality has meaning, and life is good and will end well. These stories follow the classic story design outlined above. They’re built around an active protagonist who struggles against primarily external forces of antagonism to pursue his or her desire, through continuous time, within a consistent and causally connected fictional reality, to a closed ending of absolute, irreversible change. (Example: _The Shawshank Redemption_) +2. **Antiplot**: The opposite of the archplot, an antiplot is used to express that life is absurd, and change is random and therefore meaningless. These plots present life not in actuality but “life as thought about.” They’re intended to break the rules of the archplot, as a sort of satire or parody of the archplot, and are full of randomness and coincidence, skipping helter-skelter through time (rather than linearly), within an inconsistent and disconnected fictional reality. (Example: _Monty Python and the Holy Grail_) +3. **Miniplot**: These plots bring the audience a micro or mini slice of life, relating that “life brings little or no change.” These stories are built around one or more passive protagonists who struggle against primarily internal forces of antagonism to pursue their desire, through continuous time, within a consistent and causually connected fictional reality, to an open ending of unanswered questions. A miniplot is much like the archplot, except it may have multiple protagonists with internal rather than external struggles, and they often end leaving the audience with unanswered questions about life or the film’s story. (Example: _Tender Mercies_) +4. **Multiplot**: Resting between the archplot and miniplot is the multiplot. It is essentially an archplot with multiple protagonists and therefore multiple plots. (Example: _Crash_) + +Other plots types: + +- **Nonplot**: In an effort to be original and creative, some scriptwriters push on all traditional boundaries, creating a film in which there is no story. In other words, in these films, no change occurs; there is only stasis. These writers/directors are consciously presenting a mere verisimilitude of life in their attempt to show the absurdity of life, or to present a satire of life. (Example: _Leaving Las Vegas_) +- **Film noir** (dark film): A genre that exploded in the wake of World War II (e.g., _The Maltese Falcon_ in 1941), these films present the dark side of humanity and reflect existential angst (not even the bad guys win). They present a hopeless universe, devoid of feelings other than lust, revenge, and the will to power. Noir characters have an attitude of “kill or be killed.” The finest of contemporary film noir doesn’t revel in evil but haunts our souls by acknowledging our failings and exposing our calculated cover-ups. There is a growing genre of films that may be called **neo-noir**, which are a reimagination of Film Noir. They transcend a coherent story, and weave in postmodern relativism and suspicion about truth. (Examples: _Pulp Fiction_, _Memento_) + +Subplots +You may have wondered about the purpose of subplots, when the focus of the story is on the central plot. Here are three uses for subplots: + +1. To contradict the controlling idea of the central plot and thus enrich the film with irony. +2. To resonate the controlling idea of the central plot and enrich the film with variations on a theme. +3. To complicate the central plot (i.e., as an additional source of antagonism). + +Plot Angles +One key into the heart of a story is to determine which one of four angles is being emphasized in a film: +*_Character-driven_: These stories emphasize character and portray issues of human need or potential. They deal with the question of human nature by offering paradigms of possibility. What is it to be human? +*_Plot-driven_: In these films, the plot is more prominent than any single character. +*_Atmosphere-driven_: These movies find their center of power and meaning in the story’s atmosphere, the unalterable given(s) against which the story is told and the characters developed. Atmosphere is more than just the prevailing mood; it’s the unchanging backdrop against which the story is played out. +*_Point-of-view (POV)-driven_: In these films, the implied narrator’s attitude toward the story’s subject and audience is most prominent. Achieved at many times by voiceovers or monologues, POV can also be conveyed through the movie’s editing, photography, composition, music, pace, and lighting. +Step 9: Identify the Controlling Idea +The **controlling idea** is the film’s main idea or message that it is attempting to convey. It should be expressed in a single sentence describing how and why life undergoes change from one condition of existence at the beginning to another at the end. +This is not to say that a story can be reduced to a rubric. Far more is captured within the web of a story than can ever be stated in words—subtleties, subtexts, conceits, double-meanings, richness of all kinds. +Example +The controlling idea of many love stories is, “Love triumphs because the lovers sacrifice their needs for each other.” +Here are three basic categories of controlling idea progressions: + +- **Idealistic (happy ending)**: These are “up-ending” stories expressing the optimism, hopes, and dreams of mankind, a positively charged vision of the human spirit; life as we wish it to be. The emotional charge of the film’s premise starts negatively, moves positive, then makes increasingly more intense alternating positive and negative charges until the crescendo, the last act climax, which is positively charged. Here, the protagonist gets what he or she wants. (Example: _The Lord of the Rings_ trilogy) +- **Pessimistic (sad ending)**: These “down-ending” films begin with a positive emotional charge, but then move negatively; they make increasingly more intense alternating positive and negative charges until the crescendo of the last act climax, which is negatively charged. Screenwriters here are expressing cynicism, despair, a sense of loss or misfortune, and dark dimensions of life. This is an accurate portrait of reality, they feel. (Example _Chinatown_) +- **Ironic (happy-sad endings)**: Optimism/idealism and pessimism/cynicism merge in these films. Rather than voicing one extreme over the other, the story says both. Up/down-ending stories express our sense of the complex, dual nature of existence, a simultaneously charged positive and negative vision; life at its most complete and realistic. This pattern, particularly used in a **redemption plot**,[2](http://kenboa.org/culture/how-to-read-a-film/#easy-footnote-bottom-2) gives rise to an ending rich in irony: at climax, the protagonist sacrifices his dream (positive), a value that has become a soul-corrupting fixation (negative), to gain an honest, sane, balanced life (positive). (Examples: _Rain Man_, _Schindler’s List_) + +Step 10: Determine the Worldview +A worldview is simply the way a person views truth and reality. When determining the particular worldview of any movie, you need only ask yourself two questions: (1) What does the film say about God? and (2) What does the film say about human beings? +What does the film say about the nature of God? +Although opinions abound, there are really only three basic answer options: + +- There is no God (**atheistic** or **naturalistic worldview**) +- There is a God and He is a personal being (**theistic worldview**) +- There’s a god(s) but it is an impersonal spirit or force (**monistic worldview**) + +Examples of films with each are _Dead Poets Society_ (atheistic), _Les Misérables_ (theistic), and the _Star Wars_ movies (monistic). +What does the film say about the nature of mankind? +In particular, what does the film say about our nature as humans, our origin, and our purpose? Here are the options: + +- _Human nature_: (a) People are basically evil/sinful; (b) people are basically good; or (c) people are like a “blank slate” (neither good nor evil but may be shaped one way or the other). +- _Origin_: (a) Created by a personal Creator (i.e., the God of the Bible); (b) originated from an impersonal agency or force; or (c) evolved (e.g., from impersonal forces of time plus chance, as the Darwinists teach). +- _Purpose_: (a) Others-centered (relationships); (b) self-centered (self-actualization/getting our needs met); or (c) survival or autonomy (no ultimate purpose; the strength survive while the weak perish). + +Overview of 10 Steps to Reading a Film +Identify the … +1. Genre +2. protagonist’s Quest and Character Arc +3. Inciting Incident +4. Progressive Complications +5. Crisis +6. Climax +7. Resolution +8. Plot Type +9. Controlling Idea +10. Worldview + > From <[http://kenboa.org/culture/how-to-read-a-film/](http://kenboa.org/culture/how-to-read-a-film/)> \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading Movies/The Bookshop.md b/OneNote/Ben's Notebook/Reading Movies/The Bookshop.md new file mode 100644 index 0000000..9494950 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading Movies/The Bookshop.md @@ -0,0 +1,76 @@ +The Bookshop +(324) +6.4 +1h 53min +2018 +X-Ray +PG +In 1950s English town, a free-spirited widow follows her lifelong dream by opening a bookshop, spurring a cultural awakening over the objections of conservative locals. + +Genres Drama +Director Isabel Coixet +Starring Emily Mortimer, Bill Nighy, Patricia Clarkson + +# Determine the genre + +drama + +# Identity protagonist's quest and character arc + +The protagonist is Mrs. Green who years before the events of the movie has become a widow. She loves books and reading was an important part to her marriage, which was happy. + +Her antogonists are many including the banker and her lawyer. But the main one is Mrs. ?, the old, rich lady who wants to use the "old house" for her own purposes. + +## Quest and arc + +The quest of Mrs. Green is to open a bookshop and to keep it open. She beings as a widow still mourning 16 years after her husbands death--not profusely, but in the sense that she isn't "doing" anything with her life. This changes when she decides to open the shop by buying the "old house" in downtown of the town she lives in. + +Part of her arc is a rare (for anyone) invitation to Mr. ? 's house where he lays out the forces of resistance against her (in a sympathetic way). She shows expresses courage, as if deciding there to have it, to resist these forces without fear. This seems to revive something in Mr. ?. + +## Point of view + +There is a narrator, but the story is from a first-person point of view. We follow Mrs. Green and only see what she sees, except when the narrator gives us information she doesn't know at the time. The narrator is not Mrs. Green, but knows everything about her. I guess this is the omniscient perspective then. + +# Inciting Incident + +The inciting incident seems to be when Mrs. Green decides to open the bookstore. Suddenly, the whole town knows about it (especially that she's buying the old house for it and living there). This sets the whole town abuzz and especially agitates Mrs. ?. + +What does the protagonist want? Mrs. Green wants to open the store and keep it open. + +# Progressive complications + +First, she has to overcome her own malaise of her life after her husband has died. Not much time is spent on this except to basically mention it at the start of the movie. This is an inner conflict. She will also experience an inner conflict to remain courageous and determined as the personal conflicts mount. + +Second, she experiences a general resistance to her intentions and progress in owning, living in and rehabilitating the old house from various members of the village--especially, passively aggressively expressed by Mrs. ? At the party. This is the beginning of many personal conflicts. + +Third, she experiences resistance and doubt from the banker and her lawyer who we learn are being influenced by Mrs. ?. + +Fourth, she begins to receive more open hostility from Mrs. ? through her lawyer who has correspondence concerning street congestion. + +Fifth, she learns that a rival bookstore has opened. She does not yet know that this is a venture of Mrs. ? to drive her out of business and out of the old house. Her banker condescendingly mentions how little cash she has on hand and that there is a buyer for the old house. She rejects this offer. + +# Identify the Crisis + +This may be the opening of the rival bookstore, but I don't know yet--need to finish the film. + +## Crisis decision + +Don't know yet…although so far it seems she will choose to keep the bookshop open no matter what. + +# Identify the climax + +# Identify the resolution + +# Determine the plot type + +# Identify the controlling idea + +# Determine the worldview + +## Nature of God + +So far, the film doesn't seem to comment on God except through the omission of anything having to do with Him. If anything, the character is positioned in such a way as to say "she will only succeed through her own determination". + +## Nature of mankind + +One thing the film explicitly says about human nature is that there are (can't remember the exact word) destroyers and those who are destroyed, but Mrs. Green did not realize this, or refuses to believe it. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Book notes/Problem of Pain, C.S. Lewis.md b/OneNote/Ben's Notebook/Reading/Book notes/Problem of Pain, C.S. Lewis.md new file mode 100644 index 0000000..e11c4f6 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Book notes/Problem of Pain, C.S. Lewis.md @@ -0,0 +1,3 @@ +> [!caution] This page contained a drawing which was not converted. + +![THE PROBLEM OF PAIN lessly and plaintively into a self-pitying despair. Even so, some, in a similar physical state, will preserve their serenity and selflessness to the end. To see it is a rare but moving experience. Mental pain is less dramatic than physical pain, but it is more common and also more hard to bear. The frequent attempt to conceal mental pain increases the burden: it is easier to say "My tooth is aching" than to say "My heart is broken". Yet if the cause is accepted and faced, the conflict will strengthen and purify the character and in time the pain will usually pass. Sometimes, how- ever, it persists and the effect is devastating; if the cause is not faced or not recognised, it produces the dreary state of the chronic neurotic. But some by heroism overcome even chronic mental pain. They often produce brilliant work and strengthen, harden, and sharpen their characters till they become like tempered steel. In actual insanity the picture is darker. In the whole realm of medicine there is nothing so terrible to contemplate as a man with chronic melancholia. But most of the insane are not unhappy or, indeed, conscious of their condition. In either case, if they re- cover, they are surprisingly little changed. Often they remember nothing of their illness. Pain provides an opportunity for heroism; the opportunity is seized with surprising frequency. 102 ](Exported%20image%2020240808113911-0.png) ![APPENDIX (This note on the observed effects of pain has been kindly supplied by R. Havard, M.D., from clinical experience.) ain is a common and definite event which can easily be recognised: but the observation of character or behaviour is less easy, less complete, and less exact, especially in the transient, if intimate, relation of doctor and patient. In spite of this difficulty certain impressions gradually take form in the course of medical practice which are confirmed as experience grows. A short attack of severe physical pain is overwhelming while it lasts. The sufferer is not usually loud in his complaints. He will beg for relief but does not waste his breath on elaborating his trou- bles. It is unusual for him to lose self control and to become wild and irrational. It is rare for the severest physical pain to become in this sense unbearable. When short, severe, physical pain pass- es it leaves no obvious alteration in behaviour. Long continued pain has more noticeable effects. It is often accepted with little or no complaint and great strength and resignation are developed. Pride is humbled or, at times, results in a determination to con- ceal suffering. Women with rheumatoid arthritis show a cheerful- ness which is so characteristic that it can be compared to the spes phthisica of the consumptive: and is perhaps due more to a slight intoxication of the patient by the infection than to an increased strength of character. Some victims of chronic pain deteriorate. They become querulous and exploit their privileged position' as invalids to practise domestic tyranny. But the wonder is that the failures are so few and the heroes so many; there is a challenge in physical pain which most can recognise and answer. On the other hand, a long illness, even without pain, exhausts the mind as well as the body. The invalid gives up the struggle and drifts help- ](Exported%20image%2020240808113911-1.png) ![Exported image](Exported%20image%2020240808113911-2.png) ![HEAVEN solely Hell. Yet even Hell derives from this law such reality as it has. That fierce imprisonment in the self is but the obverse of the self giving which is absolute reality; the negative shape which the outer darkness takes by surrounding and defining the shape of the real; or which the real imposes on the darkness by having a shape and positive nature of its own. The golden apple of selfhood, thrown among the false gods, became an apple of discord because they scrambled for it. They did not know the first rule of the holy game, which is that every player must by all means touch the ball and then immediately pass it on. To be found with it in your hands is a fault: to cling to it, death. But when it flies to and fro among the players too swift for eye to follow, and the great master Himself leads the revelry, giving Himself eternally to His creatures in the generation, and back to Himself in the sacrifice, of the Word, then indeed the eter- nal dance "makes heaven drowsy with the harmony". All pains and pleasures we have known on earth are early initiations in the movements of that dance: but the dance itself is strictly incompa- rable with the sufferings of this present time. As we draw nearer to its uncreated rhythm, pain and pleasure sink almost out of sight. There is joy in the dance, but it does not exist for the sake of joy. It does not even exist for the sake of good, or of love. It is Love Himself, and Good Himself, and therefore happy. It does not ex- ist for us, but we for it. The size and emptiness of the universe which frightened us at the outset of this book, should awe us still, for though they may be no more than a subjective bye-product of our three dimensional imagining, yet they symbolise great truth. As our Earth is to all the stars, so doubtless are we men and our concerns to all creation ; as all the stars are to space itself, so are all creatures, all thrones and powers and mightiest of the created gods; to the abyss of the self existing Being, who is to us Father and Redeemer and indwelling Comforter, but of whom no man nor angel can say nor conceive what He is in and for Himself, or what is the work that he "maketh from the beginning to the end". For they are all derived and unsubstantial things. Their vision fails them and they cover their eyes from the intolerable light of utter actuality, which was and is and shall be, which never could have been otherwise, which has no opposite. 99 ](Exported%20image%2020240808113911-3.png) ![THE PROBLEM OF PAIN the Word should be God, it must also be with God. The Father eternally begets the Son and the Holy Ghost proceeds: deity intro- duces distinction within itself so that the union of reciprocal loves may transcend mere arithmetical unity or self identity. But the eternal distinctness of each soul — the secret which makes of the union between each soul and God a species in itself will never abrogate the law that forbids ownership in heaven. As to its fellow-creatures, each soul, we suppose, will be eternally engaged in giving away to all the rest that which it receives. And as to God, we must remember that the soul is but a hollow which God fills. Its union with God is, almost by definition, a continual self abandonment — an opening, an unveiling, a surrender, of itself. A blessed spirit is a mould ever more and more patient of the bright metal poured into it, a body ever more completely uncovered to the meridian blaze of the spiritual sun. We need not suppose that the necessity for something analogous to self conquest will ever be ended, or that eternal life will not also be eternal dying. It is in this sense, that, as there may be pleasures in hell (God shield us from them), there may be something not all unlike pains in heaven (God grant us soon to taste them). For in self giving, if anywhere, we touch a rhythm not only of all creation but of all being. For the Eternal Word also gives Him- self in sacrifice; and that not only on Calvary. For when He was crucified He "did that in the wild weather of His outlying prov- inces which He had done at home in glory and gladness" 66 From before the foundation of the world He surrenders begotten Deity back to begetting Deity in obedience. And as the Son glorifies the Father, so also the Father glorifies the Son.67 And, with submis- sion, as becomes a layman, I think it was truly said "God loveth not Himself as Himself but as Goodness; and if there were aught better than God, He would love that and not Himself." 68 From the highest to the lowest, self exists to be abdicated and, by that abdication, becomes the more truly self, to be thereupon yet the more abdicated, and so forever. This is not a heavenly law which we can escape by remaining earthly, nor an earthly law which we can escape by being saved: What is outside the system of self- giving is not earth, nor nature, nor "ordinary life", but simply and 66 - George MacDonald. Unspoken Sermons: 3rd Series, pp. Il, 12. 67 -John 17: 1, 4, 5. 68 - Theol. Germ, xxxll. 98 ](Exported%20image%2020240808113911-4.png) ![HEAVEN name written, which no man knoweth saving he that receiveth it" .63 What can be more a man's own than this new name which even in eternity remains a secret between God and him? And what shall we take this secrecy to mean? Surely, that each of the redeemed shall forever know and praise some one aspect of the divine beauty better than any other creature can. Why else were individuals created, but that God, loving all infinitely, should love each differently? And this difference, so far from impairing, floods with meaning the love of all blessed creatures for one an- other, the communion of the saints. If all experienced God in the same way and returned Him an identical worship, the song of the Church triumphant would have no symphony, it would be like an orchestra in which all the instruments played the same note. Aristotle has told us that a city is a unity of unlikes,64 and St. Paul that a body is a unity of different members. 65 Heaven is a city, and a Body, because the blessed remain eternally different: a so- ciety, because each has something to tell all the others — fresh and ever fresh news of the "My God" whom each finds in Him whom all praise as "Our God". For doubtless the continually successful, yet never completed, attempt by each soul to communicate its unique vision to all others (and that by means whereof earthly art and philosophy are but clumsy imitations) is also among the ends for which the individual was created. For union exists only between distincts; and, perhaps, from this point of view, we catch a momentary glimpse of the meaning of all things. Pantheism is a creed not so much false as hopelessly be- hind the times. Once, before creation, it would have been true to say that everything was God. But God created: He caused things to be other than Himself that, being distinct, they might learn to love Him, and achieve union instead of mere sameness. Thus He also cast His bread upon the waters. Even within the creation we might say that inanimate matter, which has no will, is one with God in a sense in which men are not. But it is not God's purpose that we should go back into that old identity (as, perhaps, some Pagan mystics would have us do) but that we should go on to the maximum distinctness there to be reunited with Him in a higher fashion. Even within the Holy One Himself, it is not sufficient that 63 - Revelation 2: 17. 64 - Politics, 11, 2,4. 65 - ICorinthians 12: 12-30. 97 ](Exported%20image%2020240808113911-5.png) ![THE PROBLEM OF PAIN pearl of great price, but it is not. The thing I am speaking of is not an experience. You have experienced only the want of it. The thing itself has never actually been embodied in any thought, or image, or emotion. Always it has summoned you out of yourself. And if you will not go out of yourself to follow it, if you sit down to brood on the desire and attempt to cherish it, the desire itself will evade you. "The door into life generally opens behind us" and "the only wisdom" for one "haunted with the scent of unseen roses, is work. "61 This secret fire goes out when you use the bel- lows: bank it down with what seems unlikely fuel of dogma and ethics, turn your back on it and attend to your duties, and then it will blaze. The world is like a picture with a golden background, and we the figures in that picture: Until you step off the plane of the picture into the large dimensions of death you cannot see the gold. But we have reminders of it. To change our metaphor, the black-out is not quite complete. There are chinks. At times the daily scene looks big with its secret. Such is my opinion; and it may be erroneous. Perhaps this se- cret desire also is part of the Old Man and must be crucified be- fore the end. But this opinion has a curious trick of evading denial. The desire — much more the satisfaction — has always refused to be fully present in any experience. Whatever you try to identify with it, turns out to be not it but something else: so that hardly any degree of crucifixion or transformation could go beyond what the desire itself leads us to anticipate. Again, if this opinion is not true, something better is. But "something better" — not this or that experience, but beyond it — is almost the definition of the thing I am trying to describe. The thing you long for summons you away from the self. Even the desire for the thing lives only if you abandon it. This is the ultimate law — the seed dies to live, the bread must be cast upon the waters, he that loses his soul will save it. But the life of the seed, the finding of the bread, the recovery of the soul, are as real as the preliminary sacrifice. Hence it is truly said of heaven "in heaven there is no ownership. If any there took upon him to call anything his own, he would straightway be thrust out into hell and become an evil spirit"62 But it is also said "To him that overcometh I will give a white stone, and in the stone a new 61 - George MacDonald. Alec Forbes [ofHowg1en], cap. xxxlll. 62 - Theologia Germanica, Ll. 96 ](Exported%20image%2020240808113911-6.png) ![HEAVEN not tell each other about it. It is the secret signature of each soul, the incommunicable and unappeasable want, the thing we desired before we met our wives or made our friends or chose our work, and which we shall still desire on our deathbeds, when the mind no longer knows wife or friend or work. While we are, this is. If we lose this, we lose all.60 This signature on each soul may be a product of heredity and environment, but that only means that heredity and environment are among the instruments whereby God creates a soul. I am con- sidering not how, but why, He makes each soul unique. If He had no use for all these differences, I do not see why He should have created more souls than one. Be sure that the ins and outs of your individuality are no mystery to Him; and one day they will no longer be a mystery to you. The mould in which a key is made would be a strange thing, if you had never seen a key: and the key itself a strange thing if you had never seen a lock. Your soul has a curious shape because it is a hollow made to fit a particular swelling in the infinite contours of the divine substance, or a key to unlock one of the doors in the house with many mansions. For it is not humanity in the abstract that is to be saved, but you, you, the individual reader, John Stubbs or Janet Smith. Blessed and fortunate creature, your eyes shall behold Him and not another's. All that you are, sins apart, is destined, if you will let God have His good way, to utter satisfaction. The Brocken spectre "looked to every man like his first love", because she was a cheat. But God will look to every soul like its first love because He is its first love. Your place in heaven will seem to be made for you and you alone, because you were made for it — made for it stitch by stitch as a glove is made for a hand. It is from this point of view that we can understand Hell in its aspect of privation. All your life an unattainable ecstasy has hovered just beyond the grasp of your consciousness. The day is coming when you will wake to find, beyond all hope, that you have attained it, or else, that it was within your reach and you have lost it forever. This may seem a perilously private and subjective notion of the 60 - I am not, of course, suggesting that these immortal longings, which we have from the Creator because we are men, should be confused with the gifts of the Holy Spirit to those who are in Christ. We must not fancy we are holy because we are human. 95 ](Exported%20image%2020240808113911-7.png) ![THE PROBLEM OF PAIN ested because he wants to run and leap and walk. Love, by defini- tion; seeks to enjoy its object. You may think that there is another reason for our silence about heaven — namely, that we do not really desire it. But that may be an illusion. What I am now going to say is merely an opinion of my own without the slightest authority, which I submit to the judgement of better Christians and better scholars than myself. There have been times when I think we do not desire heaven; but more often I find myself wondering whether, in our heart of hearts, we have ever desired anything else. You may have no- ticed that the books you really love are bound together by a se- cret thread. You know very well what is the common quality that makes you love them, though you cannot put it into words: but most of your friends do not see it at all, and often wonder why, liking this, you should also like that. Again, you have stood before some landscape, which seems to embody what you have been looking for all your life; and then turned to the friend at your side who appears to be seeing what you saw — but at the first words a gulf yawns between you, and you realise that this landscape means something totally different to him, that he is pursuing an alien vi- sion and cares nothing for the ineffable suggestion by which you are transported. Even in your hobbies, has there not always been some secret attraction which the others are curiously ignorant of — something, not to be identified with, but always on the verge of breaking through, the smell of cut wood in the workshop or the clap-clap of water against the boat's side? Are not all lifelong friendships born at the moment when at last you meet another human being who has some inkling (but faint and uncertain even in the best) of that something which you were born desiring, and which, beneath the flux of other desires and in all the momentary silences between the louder passions, night and day, year by year, from childhood to old age, you are looking for, watching for, lis- tening for? You have never had it. All the things that have ever deeply possessed your soul have been but hints of it —tantalising glimpses, promises never quite fulfilled, echoes that died away just as they caught your ear. But if it should really become manifest — if there ever came an echo that did not die away but swelled into the sound itself you would know it. Beyond all possibility of doubt you would say "Here at last is the thing I was made for". We can- 94 ](Exported%20image%2020240808113911-8.png) ![x HEAVEN It is required You do awake your faith. Then all stand still; On; those that think it is unlawful business I am about, let them depart. SHAKESPEARE, Winter's Tale. Plunged in thy depth of mercy let me die The death that every soul that lives desires. COWPER out of Madame Guion reckon", said St. Paul "that the sufferings of this present time are not worthy to be compared with the glory that shall be re- vealed in us." If this is so, a book on suffering which says noth- ing of heaven, is leaving out almost the whole of one side of the account. Scripture and tradition habitually put the joys of heaven into the scale against the sufferings of earth, and no solution of the problem of pain which does not do so can be called a Christian one. We are very shy nowadays of even mentioning heaven: We are afraid of the jeer about "pie in the sky", and of being told that we are trying to "escape" from the duty of making a happy world here and now into dreams of a happy world elsewhere. But either there is "pie in the sky" or there is not. If there is not, then Chris- tianity is false, for this doctrine is woven into its whole fabric. If there is, then this truth, like any other, must be faced, whether it is useful at political meetings or no. Again, we are afraid that heaven is a bribe, and that if we make it our goal we shall no longer be disinterested. It is not so. Heaven offers nothing that a mercenary soul can desire. It is safe to tell the pure in heart that they shall see God, for only the pure in heart want to. There are rewards that do not sully motives. A man's love for a woman is not mercenary because he wants to marry her, nor his love for poetry mercenary because he wants to read it, nor his love of exercise less disinter- ](Exported%20image%2020240808113911-9.png) ![were extinct before men existed are then only seen in their true light when they are seen as the unconscious harbingers of man. When we are speaking of creatures so remote from us as wild beasts, and prehistoric beasts, we hardly know what we are talking about. It may well be that they have no selves and no sufferings. It may even be that each species has a corporate self that Lionhood, not lions, has shared in the travail of creation and will enter into the restoration of all things. And if we cannot imagine even our own eternal life, much less can we imagine the life the beasts may have as our "members". If the earthly lion could read the proph- ecy of that day when he shall eat hay like an ox, he would regard it as a description not of heaven, but of hell. And if there is nothing in the lion but carnivorous sentience, then he is unconscious and his "survival" would have no meaning. But if there is a rudimen- tary Leonine self, to that also God can give a "body" as it pleases Him a body no longer living by the destruction of the lamb, yet richly Leonine in the sense that it also expresses whatever energy and splendour and exulting power dwelled within the visible lion on this earth. I think, under correction, that the prophet used an eastern hyperbole when he spoke of the lion and the lamb lying down together. That would be rather impertinent of the lamb. To have lions and lambs that so consorted (except on some rare ce- lestial Saturnalia of topsy-turvydom) would be the same as having neither lambs nor lions. I think the lion, when he has ceased to be dangerous, will still be awful: indeed, that we shall then first see that of which the present fangs and claws are a clumsy, and satanically perverted, imitation. There will still be something like the shaking of a golden mane: and often the good Duke will say, "Let him roar again". ](Exported%20image%2020240808113911-10.png) ![ANIMAL PAIN ondly, a future happiness connected with the beast's present life simply as a compensation for suffering — so many millenniums in the happy pastures paid down as "damages" for so many years of pulling carts, seems a clumsy assertion of Divine goodness. We, because we are fallible, often hurt a child or an animal uninten- tionally, and then the best we can do is to "make up for it" by some caress or titbit. But it is hardly pious to imagine omniscience acting in that way — as though God trod on the animals' tails in the dark and then did the best He could about it! In such a botched adjustment I cannot recognise the master-touch; whatever the an- swer is, it must be something better than that. The theory I am suggesting tries to avoid both objections. It makes God the cen- tre of the universe and man the subordinate centre of terrestrial nature: the beasts are not co-ordinate with man, but subordinate to him, and their destiny is through and through related to his. And the derivative immortality suggested for them is not a mere amende or compensation: it is part and parcel of the new heaven and new earth, organically related to the whole suffering process of the world's fall and redemption. Supposing, as I do, that the personality of the tame animals is largely the gift of man — that their mere sentience is reborn to soulhood in us as our mere soulhood is reborn to spirituality in Christ — I naturally suppose that very few animals indeed, in their wild state, attain to a "self" or ego. But if any do, and if it is agreeable to the goodness of God that they should live again, their immortality would also be related to man — not, this time, to individual masters; but to humanity. That is to say, if in any instance the quasi-spiritual and emotional value which human tra- dition attributes to a beast (such as the "innocence" of the lamb or the heraldic royalty of the lion) has a real ground in the beast's nature; and is not merely arbitrary or accidental, then it is in that capacity, or principally in that, that the beast may be expected to attend on risen man and make part of his "train". Or if the tradi- tional character is quite erroneous, then the beast's heavenly life59 would be in virtue of the real, but unknown, effect it has actually had on man during his whole history: for if Christian cosmology is in any sense (I do not say, in a literal sense) true, then all that exists on our planet is related to man, and even the creatures that 59 - That is, its participation in the heavenly life of men in Christ to God; to sug- gest a "heavenly life" for the beast as such is probably nonsense. 91 ](Exported%20image%2020240808113911-11.png) ![THE PROBLEM OF PAIN now going to suggest — though with great readiness to be set right by real theologians — that there may be a sense, corresponding, though not identical, with these, in which those beasts that attain a real self are in their masters. That is to say, you must not think of a beast by itself, and call that a personality and then inquire whether God will raise and bless that. You must take the whole context in which the beast acquires its selfhood — namely "The good man - and - the - goodwife - ruling their children - and - their - beasts - in - the - good - homestead". That whole context may be regarded as a "body" in the Pauline (or a closely sub-Pauline) sense; and how much of that "body" may be raised along with the goodman and the goodwife, who can predict? So much, pre- sumably, as is necessary not only for the glory of God and the beatitude of the human pair, but for that particular glory and that particular beatitude which is eternally coloured by that particular terrestrial experience. And in this way it seems to me possible that certain animals may have an immortality, not in themselves, but in the immortality of their masters. And the difficulty about personal identity in a creature barely personal disappears when the creature is thus kept in its proper context. If you ask, concern- ing an animal thus raised as a member of the whole Body of the homestead, where its personal identity resides, I answer "Where its identity always did reside even in the earthly life — in its rela- tion to the Body and, specially, to the master who is the head of that Body". In other words, the man will know his dog," the dog will know its master and, in knowing him, will be itself. To ask that it should, in any other way, know itself, is probably to ask for what has no meaning. Animals aren't like that, and don't want, to be. My picture of the good sheepdog in the good homestead does not, of course, cover wild animals nor (a matter even more urgent) ill-treated domestic animals. But it is intended only as an illustra- tion drawn from one privileged instance — which is, also, on my view the only normal and unperverted instance of the general principles to be observed in framing a theory of animal resurrec- tion. I think Christians may justly hesitate to suppose any beasts immortal; for two reasons. Firstly, because they fear, by attribut- ing to beasts a "soul" in the full sense, to obscure that difference between beast and man which is as sharp in the spiritual dimen- sion as it is hazy and problematical in the biological. And sec- 90 ](Exported%20image%2020240808113911-12.png) ![ANIMAL PAIN of its resurrected — I was going to say "self", but the whole point is that the newt probably has no self. The thing we have to try to say, on this hypothesis, will not even be said. There is, therefore, I take it, no question of immortality for creatures that are merely sentient. Nor do justice and mercy demand that there should be, for such creatures have no painful experience. Their nervous sys- tem delivers all the letters A, P, N, I, but since they cannot read they never build it up into the word PAIN. And all animals may be in that condition. If, nevertheless, the strong conviction which we have of a real, though doubtless rudimentary, selfhood in the higher animals, and specially in those we tame, is not an illusion, their destiny demands a somewhat deeper consideration. The error we must avoid is that of considering them in themselves. Man is to be un- derstood only in his relation to God. The beasts are to be under- stood only in their relation to man and, through man, to God. Let us here guard against one of those untransmuted lumps of atheistical thought which often survive in the minds of modern believers. Atheists naturally regard the co-existence of man and the other animals as a mere contingent result of interacting bio- logical facts; and the taming of an animal by a man as a purely arbitrary interference of one species with another. The "real" or "natural" animal to them is the wild one, and the tame animal is an artificial or unnatural thing. But a Christian must not think so. Man was appointed by God to have dominion over the beasts, and everything a man does to an animal is either a lawful exer- cise, or a sacrilegious abuse, of an authority by divine right. The tame animal is therefore, in the deepest sense, the only "natural" animal — the only one we see occupying the place it was made to occupy, and it is on the tame animal that we must base all our doctrine of beasts. Now it will be seen that, in so far as the tame animal has a real self or personality, it owes this almost entirely to its master. If a good sheepdog seems "almost human" that is because a good shepherd has made it so. I have already noted the mysterious force of the word "in". I do not take all the senses of it in the New Testament to be identical, so that man is in Christ and Christ in God and the Holy Spirit in the Church and also in the individual believer in exactly the same sense. They may be senses that rhyme or correspond rather than a single sense. I am 89 ](Exported%20image%2020240808113911-13.png) ![THE PROBLEM OF PAIN and seem to like it. It may have been one of man's functions to restore peace to the animal world, and, if he had not joined the enemy he might have succeeded in doing so to an extent now hardly imaginable. 3. Finally, there is the question of justice. We have seen reason to believe that not all animals suffer as we think they do: but some, at least, look as if they had selves, and what shall be done for these innocents? And we have seen that it is possible to believe that animal pain is not God's handiwork but begun by Satan's malice and perpetuated by man's desertion of his post: still, if God has not caused it, He has permitted it, and, once again, what shall be done for these innocents? I have been warned not even to raise the question of animal immortality, lest I find myself "in company with all the old maids" .58 | have no objection to the company. I do not think either virginity or old age contemptible, and some of the shrewdest minds I have met inhabited the bodies of old maids. Nor am I greatly moved by jocular enquiries such as "Where will you put all the mosquitoes?" a question to be answered on its own level by pointing out that, if the worst came to the worst, a heaven for mosquitoes and a hell for men could very convenient- ly be combined. The complete silence of Scripture and Christian tradition on animal immortality is a more serious objection; but it would be fatal only if Christian revelation showed any signs of be- ing intended as a systéme de la nature answering all questions. But it is nothing of the sort: the curtain has been rent at one point, and at one point only, to reveal our immediate practical necessities and not to satisfy our intellectual curiosity. If animals were, in fact, im- mortal, it is unlikely, from what we discern of God's method in the revelation, that He would have revealed this truth. Even our own immortality is a doctrine that comes late in the history of Judaism. The argument from silence is therefore very weak. The real difficulty about supposing most animals to be immortal is that immortality has almost no meaning for a creature which is not "conscious" in the sense explained above. If the life of a newt is merely a succession of sensations, what should we mean by say- ing that God may recall to life the newt that died to-day? It would not recognise itself as the same newt; the pleasant sensations of any other newt that lived after its death would be just as much, or just as little, a recompense for its earthly sufferings (if any) as those 58 - But also with J. Wesley, Sermon LXV. The Great Deliverance. 88 ](Exported%20image%2020240808113911-14.png) ![ANIMAL PAIN eries are made and all errors corrected by those who ignore the "climate of opinion . It seems to me, therefore, a reasonable supposition, that some mighty created power had already been at work for ill on the ma- terial universe, or the solar system, or, at least, the planet Earth, before ever man came on the scene: and that when man fell, some- one had, indeed, tempted him. This hypothesis is not introduced as a general "explanation of evil": it only gives a wider application to the principle that evil comes from the abuse of free-will. If there is such a power, as I myself believe, it may well have corrupted the animal creation before man appeared. The intrinsic evil of the animal world lies in the fact that animals, or some animals, live by destroying each other. That plants do the same I will not admit to be an evil. The Satanic corruption of the beasts would therefore be analogous, in one respect, with the Satanic corruption of man. For one result of man's fall was that his animality fell back from the humanity into which it had been taken up but which could no longer rule it. In the same way, animality may have been encour- aged to slip back into behaviour proper to vegetables. It is, of course, true that the immense mortality occasioned by the fact that many beasts live on beasts is balanced, in nature, by an immense birth-rate, and it might seem, that if all animals had been herbivo- rous and healthy, they would mostly starve as a result of their own multiplication. But I take the fecundity and the death-rate to be correlative phenomena. There was, perhaps, no necessity for such an excess of the sexual impulse: the Lord of this world thought of it as a response to carnivorousness — a double scheme for securing the maximum amount of torture. If it offends less, you may say that the "life-force" is corrupted, where I say that living creatures were corrupted by an evil angelic being. We mean the same thing: but I find it easier to believe in a myth of gods and demons than in one of hypostatised abstract nouns. And after all, our mythology may be much nearer to literal truth, than we suppose. Let us not forget that Our Lord, on one occasion, attributes human disease not to God's wrath, nor to nature, but quite explicitly to Satan.57 If this hypothesis is worth considering, it is also worth consid- ering whether man, at his first coming into the world, had not already a redemptive function, to perform. Man, even now, can do wonders to animals: my cat and dog live together in my house 57 -Luke 13: 16. 87 ](Exported%20image%2020240808113911-15.png) ![THE PROBLEM OF PAIN I will not even guess. It is certainly difficult to suppose that the apes, the elephant, and the higher domestic animals, have not, in some degree, a self or soul which connects experiences and gives rise to rudimentary individuality. But at least a great deal of what appears to be animal suffering need not be suffering in any real sense. It may be we who have invented the "sufferers" by the "pathetic fallacy" of reading into the beats a self for which there is no real evidence. 2. The origin of animal suffering could be traced, by earlier gen- erations, to the Fall of man — the whole world was infected by the uncreating rebellion of Adam. This is now impossible, for we have good reason to believe that animals existed long before men.56 Carnivorousness, with all that it entails, is older than humanity. Now it is impossible at this point not to remember a certain sa- cred story which, though never included in the creeds, has been widely believed in the Church and seems to be implied in several Dominical, Pauline, and Johannine utterances — I mean the story that man was not the first creature to rebel against the Creator, but that some older and mightier being long since became apostate and is now the emperor of darkness and (significantly) the Lord of this world. Some people would like to reject all such elements from Our Lord's teaching: and it might be argued that when He emptied Himself of His glory He also humbled Himself to share, as man, the current superstitions of His time. And I certainly think that Christ, in the flesh, was not omniscient — if only because a human brain could not, presumably, be the vehicle of omniscient consciousness, and to say that Our Lord's thinking was not really conditioned by the size and shape of His brain might be to deny the real incarnation and become a Docetist. Thus, if Our Lord had committed Himself to any scientific or historical statement which we knew to be untrue, this would not disturb my faith in His de- ity. But the doctrine of Satan's existence and fall is not among the things we know to be untrue: it contradicts not the facts discov- ered by scientists but the mere, vague "climate of opinion" that we happen to be living in. Now I take a very low view of "climates of opinion". In his own subject every man knows that all discov- 56 - [Editor's note] Compromise with evolution inevitably lead to such theologi- cal dead ends... In later years (cf. Is Theology Poetry? 1944, The Funeral of the Great Myth 1945 and Evolutionary Hymn 1957) Lewis expressed growing reser- vations regarding the evolutionary cosmology. 86 ](Exported%20image%2020240808113911-16.png) ![ANIMAL PAIN ficiently outside B to notice B now beginning and coming to fill the place which A has vacated; and something which recognises itself as the same through the transition from A to B and B to C so that it can say "I have had the experience ABC." , Now this something is what I call Consciousness or Soul and the process I have just described is one of the proofs that the soul, though experiencing time is not itself completely "timeful". The simplest experience of ABC as a succession demands a soul which is not it- self a mere succession of states, but rather a permanent bed along which these different portions of the stream of sensation roll, and which recognises itself as the same beneath them all." Now it is al- most certain that the nervous system of one of the higher animals presents it with successive sensations. It does not follow that it has any "soul", anything which recognises itself as having had A, and now having B, and now marking how B glides away to make room for C. If it had no such "soul", what we call the experience ABC would never occur. There would, in philosophic language, be "a succession of perceptions"; that is, the sensations would, in fact, occur in that order, and God would know that they were so occurring, but the animal would not know. There would not be "a perception of succession". This would mean that if you give such a creature two blows with a whip, there are, indeed, two pains: but there is no coordinating self which can recognise that "1 have had two pains". Even in the single pain, there is no self to say "I am in pain" — for if it could distinguish itself from the sensation — the bed from the stream — sufficiently to say "I am in pain" it would also be able to connect the two, sensations as its experience. The correct description would be "Pain is taking place in this animal"; not as we commonly say, "This animal feels pain", for the words "this" and "feels" really; smuggle in the as- sumption that it is a "self" or "soul" or "consciousness" standing above the sensations and organising them into an "experience" as we do. Such sentience without consciousness, I admit, we cannot imagine: not because it never occurs in us, but because, when it does, we describe ourselves as being "unconscious". And rightly: The fact that animals react to pain much as we do is, of course, no proof that they are conscious; for we may also so react under chloroform, and even answer questions while asleep. How far up the scale such unconscious sentience may extend, 85 ](Exported%20image%2020240808113911-17.png) ![THE PROBLEM OF PAIN that every flower "enjoyed the air it breathes", but there is no reason to suppose he was right. No doubt, living plants react to injuries differently from inorganic matter; but an anaesthetised human body reacts more differently still and such reactions do not prove sentience. We are, of course, justified in speaking of the death or thwarting of a plant as if it were a tragedy, provided that we know we are using a metaphor. To furnish symbols for spiritual experiences may be one of the functions of the mineral and vegetable worlds: But we must not become the victims of our metaphor. A forest in which half the trees are killing the other half may be a perfectly "good" forest: for its goodness consists in its utility and beauty and it does not feel. When we turn to the beasts, three questions arise. There is, first, the question of fact; what do animals suffer? There is, secondly, the question of origin; how did disease and pain enter the animal world? And, thirdly, there is the question of justice; how can ani- mal suffering be reconciled with the justice of God? 1. In the long run the answer to the first question is, We don't know; but some speculations may be worth setting down. We must begin by distinguishing among animals: for if the ape could understand us he would take it very ill to be lumped along with the oyster and the earth-worm in a single class of "animals" and contrasted to men. Clearly in some ways the ape and man are much more like each other than either is like the worm. At the lower end of the animal realm we need not assume anything we could recognise as sentience. Biologists in distinguishing animal from vegetable do not make use of sentience or locomotion or other such characteristics as a layman would naturally fix upon. At some point, however (though where, we cannot say), sentience almost certainly comes in, for the higher animals have nervous systems very like our own. But at this level we must still distin- guish sentience from consciousness. If you happen never to have heard of this distinction before, I am afraid you will find it rather startling, but it has great authority and you would be ill advised to dismiss it out of hand. Suppose that three sensations follow one another first A, then B, then C. When this happens to you, you have the experience of passing through the process ABC. But note what this implies. It implies that there is something in you which stands sufficiently outside A to notice A passing away, and suf- 84 ](Exported%20image%2020240808113911-18.png) ![ANIMAL PAIN And whatsoever Adam called every living creature, that was the name thereof. Genesis ii, 19. To find out what is natural, we must study specimens which retain their nature and not those which have been corrupted. ARISIOTLE. Politics, I, V, 5. HUS far of human suffering; but all this time "a plaint of guiltless hurt doth pierce the sky" The problem of animal suffering is appalling; not because the animals are so nu- merous (for, as we have seen, no more pain is felt when a million suffer than when one suffers) but because the Christian explana- tion of human pain cannot be extended to animal pain. So far as we know beasts are incapable either of sin or virtue: therefore they can neither deserve pain nor be improved by it. At the same time we must never allow the problem of animal suffering to be- come the centre of the problem of pain; not because it is unim- portant — whatever furnishes plausible grounds for questioning the goodness of God is very important indeed — but because it is outside the range of our knowledge. God has given us data which enable us, in some degree, to understand our own suffering: He has given us no such data about beasts. We know neither why they were made nor what they are, and everything we say about them is speculative. From the doctrine that God is good we may confi- dently deduce that the appearance of reckless divine cruelty in the animal kingdom is an illusion — and the fact that the only suffering we know at first hand (our own) turns out not to be a cruelty will make it easier to believe this. After that, everything is guesswork. We may begin by ruling out some of the pessimistic bluff put up in the first chapter. The fact that vegetable lives "prey upon" one another and are in a state of "ruthless" competition is of no moral importance at all. "Life" in the biological sense has nothing to do with good and evil until sentience appears. The very words "prey" and "ruthless" are mere metaphors. Wordsworth believed ](Exported%20image%2020240808113911-19.png) ![THE PROBLEM OF PAIN But He has done so, on Calvary. To forgive them? They will not be forgiven. To leave them alone? Alas, I am afraid that is what He does. One caution, and I have done. In order to rouse modern minds to an understanding of the issues, I ventured to introduce in this chapter a picture of the sort of bad man whom we most easily perceive to be truly bad. But when the picture has done that work, the sooner it is forgotten the better. In all discussions of Hell we should keep steadily before our eyes the possible damnation, not of our enemies nor our friends (since both these disturb the rea- son) but of ourselves. This chapter is not about your wife or son, nor about Nero or Judas Iscariot; it is about you and me. 82 ](Exported%20image%2020240808113911-20.png) ![HELL blessed in heaven while he knew that even one human soul was still in hell; and if so, are we more merciful than God? At the back of this objection lies a mental picture of heaven and hell co- existing in unilinear time as the histories of England and America co-exist: so that at each moment the blessed could say "The mis- eries of hell are now going on". But I notice that Our Lord while stressing the terror of hell with unsparing severity usually empha- sises the idea not of duration but of finality. Consignment to the destroying fire is usually treated as the end of the story — not as the beginning of a new story. That the lost soul is eternally fixed in its diabolical attitude we cannot doubt: but whether this eternal fixity implies endless duration — or duration at all — we cannot say. Dr. Edwyn Bevan has some interesting speculations on this point.55 We know much more about heaven than hell, for heaven is the home of humanity and therefore contains all that is implied in a glorified human life but hell was not made for men. It is in no sense parallel to heaven: it is "the darkness outside" the outer rim where being fades away into nonentity, Finally, it is objected that the ultimate loss of a single soul means the defeat of omnipotence. And so it does. In creating beings with free will, omnipotence from the outset submits to the possibility of such defeat. What you call defeat, I call miracle: for to make things which are not Itself, and thus to become, in a sense, capa- ble of being resisted by its own handiwork, is the most astonish- ing and unimaginable of all the feats we attribute to the Deity. I willingly believe that the damned are, in one sense, successful, rebels to the end; that the doors of hell are locked on the inside. I do not mean that the ghosts may not wish to come out of hell, in the vague fashion wherein an envious man "wishes" to be happy: but they certainly do not will even the first preliminary stages of that self abandonment through which alone the soul can reach any good. They enjoy forever the horrible freedom they have de- manded, and are therefore self enslaved: just as the blessed, for- ever submitting to obedience, become through all eternity more and more free. In the long run the answer to all those who object to the doctrine of hell, is itself a question: "What are you asking God to do?" To wipe out their past sins and, at all costs, to give them a fresh start, smoothing every difficulty and offering every miraculous help? 55 - Symbolism and Belief, p. 101. 81 ](Exported%20image%2020240808113911-21.png) ![THE PROBLEM OF PAIN am afraid, out of court from the beginning. But it is not necessary to concentrate on the images of torture to the exclusion of those suggesting destruction and privation. What can that be whereof all three images are equally proper symbols? Destruction, we should naturally assume, means the unmaking, or cessation, of the destroyed. And people often talk as if the "annihilation" of a soul were intrinsically possible. In all our experience, however, the destruction of one thing means the emergence of something else. Burn a log, and you have gases, heat and ash. To have been a log means now being those three things. If soul can be destroyed, must there not be a state of having been a human soul? And is not that, perhaps, the state which is equally well described as torment, destruction; and privation? You will remember that in the par- able, the saved go to a place prepared for them, while the damned go to a place never made for men at all.54 To enter heaven is to become more human than you ever succeeded in being in earth; to enter hell, is to be banished from humanity. What is cast (or casts itself) into hell is not a man: it is "remains". To be a complete man means to have the passions obedient to the will and the will offered to God: to have been a man — to be an ex-man or "damned ghost" — would presumably mean to consist of a will utterly cen- tred in its self and passions utterly uncontrolled by the will. It is, of course, impossible to imagine what the consciousness of such a creature — already a loose congeries of mutually antagonistic sins rather than a sinner would be like. There may be a truth in the saying that "hell is hell, not from its own point of view, but from the heavenly point of view". I do not think this belies the severity of Our Lord's words. It is only to the damned that their fate could ever seem less than unendurable. And it must be admitted that as, in these last chapters, we think of eternity, the categories of pain and pleasure, which have engaged us so long, begin to recede, as vaster good and evil looms in sight. Neither pain nor pleasure as such has the last word. Even if it were possible that the experience (if it can be called experience) of the lost contained no pain and much pleasure, still, that black pleasure would be such as to send any soul, not already damned, flying to its prayers in nightmare terror: even if there were pains in heaven, all who understand would desire them. A fourth objection is that no charitable man could himself be 54 - Matthew 25: 34, 41. 80 ](Exported%20image%2020240808113911-22.png) ![HELL which is a good image, because the parts of time are successive and no two of them can co-exist; i.e., there is no width in time, only length — we probably ought to think of eternity as a plane or even a solid. Thus the whole reality of a human being would be represented by a solid figure. That solid would be mainly the work of God, acting through grace and nature, but human free will would have contributed the base-line which we call earthly life: and if you draw your base line askew, the whole solid will be in the wrong place. The fact that life is short, or, in the symbol, that we contribute only one little line to the whole complex figure, might be regarded as a Divine mercy. For if even the drawing of that little line, left to our free will, is sometimes so badly done as to spoil the whole, how much worse a mess might we have made of the figure if more had been entrusted to us? A simpler form of the same objection consists in saying that death ought not to be final, that there ought to be a second chance.53 1 believe that if a million chances were likely to do good, they would be given. But a master often knows, when boys and parents do not, that it is really useless to send a boy in for a certain examination again. Finality must come some time, and it does not require a very robust faith to believe that omniscience knows when. A third objection turns on the frightful intensity of the pains of Hell as suggested by mediaeval art and, indeed, by certain pas- sages in Scripture. Von Hügel here warns us not to confuse the doctrine itself with the imagery by which it may be conveyed. Our Lord speaks of Hell under three symbols: first, that of punish- ment ("everlasting punishment" Matt. xxv, 46); second, that of destruction ("fear Him who is able to destroy both body and soul in Hell," Matt. x, 28); and thirdly, that of privation, exclusion, or banishment into "the darkness outside", as in the parables of the man without a wedding garment or of the wise and foolish virgins. The prevalent image of fire is significant because it combines the ideas of torment and destruction. Now it is quite certain that all these expressions are intended to suggest something unspeakably horrible, and any interpretation, which does not face that fact is, I 53 - The concept of a "second chance" must not be confused either with that of Purgatory (for souls already saved) or of Limbo (for souls already lost). [Ed. note] Neither of these concepts have support in the New Testament, particu- larly that of purgatory, a place where souls can find a second purification from sin. 79 ](Exported%20image%2020240808113911-23.png) ![THE PROBLEM OF PAIN was a thing not good in itself, but a thing which might have a cer- tain goodness in particular circumstances. That is to say, if evil is present, pain at recognition of the evil, being a kind of knowledge, is relatively good; for the alternative is that the soul should be ig- norant of the evil, or ignorant that the evil is contrary to its nature, "either of which", says the philosopher, "is manifestly bad".50 And I think, though we tremble, we agree. The demand that God should forgive such a man while he re- mains what he is, is based on a confusion between condoning and forgiving. To condone an evil is simply to ignore it, to treat it as if it were good. But forgiveness needs to be accepted as well as offered if it is to be complete: and a man who admits no guilt can accept no forgiveness. I have begun with the conception of Hell as a positive retribu- tive punishment inflicted by God because that is the form in which the doctrine is most repellent, and I wished to tackle the strongest objection. But, of course, though Our Lord often speaks of Hell as a sentence inflicted by a tribunal, He also says elsewhere that the judgement consists in the very fact that men prefer darkness to light, and that not He, but His "word", judges men.51 We are therefore at liberty — since the two conceptions, in the long run, mean the same thing — to think of this bad man's perdition not as a sentence imposed on him but as the mere fact of being what he is. The characteristic of lost souls is "their rejection of everything that is not simply themselves" .52 Our imaginary egoist has tried to turn everything he meets into a province or appendage of the self. The taste for the other, that is, the very capacity for enjoying good, is quenched in him except in so far as his body still draws him into some rudimentary contact with an outer world. Death removes this last contact. He has his wish — to live wholly in the self and to make the best of what he finds there. And what he finds there is Hell. Another objection turns on the apparent disproportion between eternal damnation and transitory sin. And if we think of eternity as a mere prolongation of time, it is disproportionate. But many would reject this idea of eternity. If we think of time as a line — 50 - Summa Theol. I, IF, Q. xxxix, Art. 1. 51 -John 3: 19; 12-48. 52 - See von Hügel, Essays and Addresses, 1st series, What do we mean by Heaven and Hell? 78 ](Exported%20image%2020240808113911-24.png) ![HELL place? Let us try to be honest with ourselves. Picture to yourself a man who has risen to wealth or power by a continued course of treachery and cruelty, by exploiting for purely selfish ends the no- ble motions of his victims, laughing the while at their simplicity; who, having thus attained success, uses it for the gratification of lust and hatred and finally parts with the last rag of honour among thieves by betraying his own accomplices and jeering at their last moments of bewildered disillusionment. Suppose, further, that he does all this, not (as we like to imagine) tormented by remorse or even misgiving, but eating like a schoolboy and sleeping like a healthy infant — a jolly, ruddy-cheeked man, without a care in the world, unshakably confident to the very end that he alone has found the answer to the riddle of life, that God and man are fools whom he has got the better of, that his way of life is utterly suc- cessful, satisfactory, unassailable. We must be careful at this point. The least indulgence of the passion for revenge is very deadly sin. Christian charity counsels us to make every effort for the conver- sion of such a man: to prefer his conversion, at the peril of our own lives, perhaps of our own souls, to his punishment; to prefer it infinitely. But that is not the question. Supposing he will not be converted, what destiny in the eternal world can you regard as proper for him? Can you really desire that such a man, remaining what he is (and he must be able to do that if he has free will) should be confirmed forever in his present happiness — should continue, for all eternity, to be perfectly convinced that the laugh is on his side? And if you cannot regard this as tolerable, is it only your wickedness — only spite — that prevents you from doing so? Or do you find that conflict between Justice and Mercy, which has sometimes seemed to you such an outmoded piece of theology, now actually at work in your own mind, and feeling very much as if it came to you from above, not from below? You are moved not by a desire for the wretched creature's pain as such, but by a truly ethical demand that, soon or late, the right should be asserted, the flag planted in this horribly rebellious soul, even if no fuller and better conquest is to follow. In a sense, it is better for the creature itself, even if it never becomes good, that it should know itself a failure, a mistake. Even mercy can hardly wish to such a man his eternal, contented continuance in such ghastly illusion. Thomas Aquinas said of suffering, as Aristotle had said of shame, that it 77 ](Exported%20image%2020240808113911-25.png) ![THE PROBLEM OF PAIN intellectual curiosity. When they have roused us into action by convincing us of a terrible possibility, they have done, probably, all they were intended to do; and if all the world were convinced Christians it would be unnecessary to say a word more on the subject. As things are, however, this doctrine is one of the chief grounds on which Christianity is attacked as barbarous, and the goodness of God impugned. We are told that it is a detestable doc- trine — and indeed, I too detest it from the bottom of my heart — and are reminded of the tragedies in human life which have come from believing it. Of the other tragedies which come from not believing it we are told less. For these reasons, and these alone, it becomes necessary to discuss the matter. The problem is not simply that of a God who consigns some of His creatures to final ruin. That would be the problem if we were Mahometans. Christianity, true, as always, to the complexity of the real, presents us with something knottier and more ambiguous — a God so full of mercy that He becomes man and dies by torture to avert that final ruin from His creatures, and who yet, where that heroic remedy fails, seems unwilling, or even unable, to arrest the ruin by an act of mere power. I said glibly a moment ago that I would pay "any price" to remove this doctrine. I lied. I could not pay one-thousandth part of the price that God has already paid to remove the fact. And here is the real problem: so much mercy, yet still there is Hell. I am not going to try to prove the doctrine tolerable. Let us make no mistake; it is not tolerable. But I think the doctrine can be shown to be moral, by a critique of the objections ordinarily made, or felt, against it. First, there is an objection, in many minds, to the idea of re- tributive punishment as such. This has been partly dealt with in a previous chapter. It was there maintained that all punishment be- came unjust if the ideas of ill-desert and retribution were removed from it; and a core of righteousness was discovered within the vindictive passion itself, in the demand that the evil man must not be left perfectly satisfied with his own evil, that it must be made to appear to him what it rightly appears to others — evil. I said that Pain plants the flag of truth within a rebel fortress. We were then discussing pain which might still lead to repentance. How if it does not — if no further conquest than the planting of the flag ever takes 76 ](Exported%20image%2020240808113911-26.png) ![Vlll HELL What is the world, O soldiers? It is I: I, this incessant snow, This northern sky; Soldiers, this solitude Through which we go Is 1. W. DE LA MARE. Richard loves Richard; that is, I am l. SHAKESPEARE. N an earlier chapter it was admitted that the pain which alone could rouse the bad man to a knowledge that all was not well, might also lead to a final and unrepented rebellion. And it has been admitted throughout that man has free will and that all gifts to him are therefore two edged. From these premises it follows directly that the Divine labour to redeem the world cannot be certain of succeeding as regards every individual soul. Some will not be redeemed. There is no doctrine which I would more will- ingly remove from Christianity than this, if it lay in my power. But it has the full support of Scripture and, specially, of Our Lord's own words; it has always been held by Christendom; and it has the support of reason. If a game is played, it must be possible to lose it. If the happiness of a creature lies in self surrender, no one can make that surrender but himself (though many can help him to make it) and he may refuse. I would pay any price to be able to say truthfully "All will be saved". But my reason retorts, "Without their will, or with it?" If I say "Without their will" I at once per- ceive a contradiction; how can the supreme voluntary act of self surrender be involuntary? If I say "With their will", my reason replies "How if they will not give in?" The Dominical utterances about Hell, like all Dominical say- ings, are addressed to the conscience and the will, not to our ](Exported%20image%2020240808113911-27.png) ![THE PROBLEM OF PAIN or deprived of that proliferous tendency which is the worst char- acteristic of evil in general. 74 ](Exported%20image%2020240808113911-28.png) ![HUMAN PAIN, continued by vague talk about the "unimaginable sum of human misery". Suppose that I have a toothache of intensity x: and suppose that you, who are seated beside me, also begin to have a toothache of intensity x. You may, if you choose, say that the total amount of pain in the room is now 2x. But you must remember that no one is suffering 2x: search all time and all space and you will not find that composite pain in anyone's consciousness. There is no such thing as a sum of suffering, for no one suffers it. When we have reached the maximum that a single person can suffer, we have, no doubt, reached something very horrible, but we have reached all the suffering there ever can be in the universe. The addition of a million fellow-sufferers adds no more pain. 6. Of all evils, pain only is sterilised or disinfected evil. Intel- lectual evil, or error, may recur because the cause of the first er- ror (such as fatigue or bad handwriting) continues to operate: but quite apart from that, error in its own right breeds error — if the first step in an argument is wrong, everything that follows will be wrong. Sin may recur because the original temptation contin- ues; but quite apart from that, sin of its very nature breeds sin by strengthening sinful habit and weakening the conscience. Now pain, like the other evils, may of course recur because the cause of the first pain (disease, or an enemy) is still operative: but pain has no tendency, in its own right, to proliferate. When it is over, it is over, and the natural sequel is joy. This distinction may be put the other way round. After an error you need not only to remove the causes (the fatigue or bad writing) but also to correct the error itself: after a sin you must not only, if possible, remove the tempta- tion, you must also go back and repent the sin itself. In each case an "undoing" is required. Pain requires no such undoing. You may need to heal the disease which caused it, but the pain, once over, is sterile — whereas every uncorrected error and unrepented sin is, in its own right, a fountain of fresh error and fresh sin flowing on to the end of time. Again, when I err, my error infects every one who believes me. When I sin publicly, every spectator either condones it, thus sharing my guilt, or condemns it with imminent danger to his charity and humility. But suffering naturally pro- duces in the spectators (unless they are unusually depraved) no bad effect, but a good one — pity. Thus that evil which God chiefly uses to produce the "complex good" is most markedly disinfected, 73 ](Exported%20image%2020240808113911-29.png) ![THE PROBLEM OF PAIN either redeemed or no further redeemable. A Christian cannot, therefore, believe any of those who promise that if only some re- form in our economic, political, or hygienic system were made, a heaven on earth would follow. This might seem to have a discour- aging effect on the social worker, but it is not found in practice to discourage him. On the contrary, a strong sense of our common miseries, simply as men, is at least as good a spur to the removal of all the miseries we can, as any of those wild hopes which tempt men to seek their realisation by breaking the moral law and prove such dust and ashes when they are realised. If applied to individu- al life, the doctrine that an imagined heaven on earth is necessary for vigorous attempts to remove present evil, would at once reveal its absurdity. Hungry men seek food and sick men healing none the less because they know that after the meal or the cure the or- dinary ups and downs of life still await them. I am not, of course, discussing whether very drastic changes in our social system are, or are not, desirable; I am only reminding the reader that a par- ticular medicine is not to be mistaken for the elixir of life. 3. Since political issues have here crossed our path, I must make it clear that the Christian doctrine of self surrender and obedience is a purely theological, and not in the least a political, doctrine. Of forms of government, of civil authority and civil obedience, I have nothing to say. The kind and degree of obedience which a crea- ture owes to its Creator is unique because the relation between creature and Creator is unique: no inference can be drawn from it to any political proposition whatsoever. 4. The Christian doctrine of suffering explains, I believe, a very curious fact about the world we live in. The settled happiness and security which we all desire, God withholds from us by the very nature of the world: but joy, pleasure, and merriment, He has scattered broadcast. We are never safe, but we have plenty of fun, and some ecstasy. It is not hard to see why. The security we crave would teach us to rest our hearts in this world and oppose an obstacle to our return to God: a few moments of happy love, a landscape, a symphony, a merry meeting with our friends, a bathe or a football match, have no such tendency. Our Father refreshes us on the journey with some pleasant inns, but will not encourage us to mistake them for home. 5. We must never make the problem of pain worse than it is 72 ](Exported%20image%2020240808113911-30.png) ![HUMAN PAIN, continued the whole man to God. They are necessary as a means; as an end, they would be abominable, for in substituting will for appetite and there stopping, they would merely exchange the animal self for the diabolical self. It was, therefore, truly said that "only God can mortify". Tribulation does its work in a world where human beings are ordinarily seeking, by lawful means, to avoid their own natural evil and to attain their natural good, and presupposes such a world. In order to submit the will to God, we must have a will and that will must have objects. Christian renunciation does not mean stoic "Apathy", but a readiness to prefer God to inferior ends which are in themselves lawful. Hence the Perfect Man brought to Gethsemane a will, and a strong will, to escape suffering and death if such escape were compatible with the Father's will, combined with a perfect readiness for obedience if it were not. Some of the saints recommend a "total renunciation" at the very threshold of our discipleship; but I think this can mean only a total readiness for every particular renunciation49 that may be demanded, for it would not be possible to live from moment to moment willing nothing but submission to God as such. What would be the mate- rial for the submission? It would seem self-contradictory to say "What I will is to subject what I will to God's will", for the second what has no content. Doubtless we all spend too much care in the avoidance of our own pain: but a duly subordinated intention to avoid it, using lawful means, is in accordance with "nature" — that is, with the whole working system of creaturely life for which the redemptive work of tribulation is calculated. It would be quite false, therefore, to suppose that the Christian view of suffering is incompatible with the strongest emphasis on our duty to leave the world, even in a temporal sense, "better" than we found it. In the fullest parabolic picture which He gave of the Judgement, Our Lord seems to reduce all virtue to active beneficence: and though it would be misleading to take that one picture in isolation from the Gospel as a whole, it is sufficient to place beyond doubt the basic principles of the social ethics of Christianity. 2. If tribulation is a necessary element in redemption, we must anticipate that it will never cease till God sees the world to be 49 Cf. Brother Lawrence, Practice of the Presense of God, IV th converstation, No- vember 25th, 1667. The "one hearty renunciation" there is "of everything which we are sensible does not lead us to God." 71 ](Exported%20image%2020240808113911-31.png) ![THE PROBLEM OF PAIN this first to the problem of other people's suffering. A merciful man aims at his neighbour's good and so does "God's will", con- sciously co-operating with "the simple good". A cruel man op- presses his neighbour, and so does simple evil. But in doing such evil, he is used by God, without his own knowledge or consent, to produce the complex good — so that the first man serves God as a son, and the second as a tool. For you will certainly carry out God's purpose, however you act, but it makes a difference to you whether you serve like Judas or like John. The whole system is, so to speak, calculated for the clash between good men and bad men, and the good fruits of fortitude, patience, pity and forgive- ness for which the cruel man is permitted to be cruel, presuppose that the good man ordinarily continues to seek simple good. I say "ordinarily" because a man is sometimes entitled to hurt (or even, in my opinion, to kill) his fellow, but only where the necessity is urgent and the good to be attained obvious, and usually (though not always) when he who inflicts the pain has a definite authority to do so — a parent's authority derived from nature, a magistrate's or soldier's derived from civil society, or a surgeon's derived, most often, from the patient. To turn this into a general charter for afflicting humanity "because affliction is good for them" (as Marlowe's lunatic Tamberlaine boasted himself the "scourge of God") is not indeed to break the divine scheme but to volunteer for the post of Satan within that scheme. If you do his work, you must be prepared for his wages. The problem about avoiding our own pain admits a similar so- lution. Some ascetics have used self torture. As a layman, I of- fer no opinion on the prudence of such a regimen; but I insist that, whatever its merits, self torture is quite a different thing from tribulation sent by God. Everyone knows that fasting is a different experience from missing your dinner by accident or through pov- erty. Fasting asserts the will against the appetite — the reward being self mastery and the danger pride: involuntary hunger subjects ap- petites and will together to the Divine will, furnishing an occasion for submission and exposing us to the danger of rebellion. But the redemptive effect of suffering lies chiefly in its tendency to reduce the rebel will. Ascetic practices, which in themselves strengthen the will, are only useful in so far as they enable the will to put its own house (the passions) in order, as a preparation for offering 70 ](Exported%20image%2020240808113911-32.png) ![Vll HUMAN PAIN, continued All things which are as they ought to be are conformed unto this second law eternal: and even those things which to this eternal law are not conformable are notwithstanding in some sort ordered by the first eternal law. Hooker Laws of Eccles. Pol., l, iii, l. n this chapter I advance six propositions necessary to com- plete our account of human suffering which do not arise out of one another and must therefore be given in an arbitrary order. 1. There is a paradox about tribulation in Christianity. Blessed are the poor, but by "judgement" (i.e., social justice) and alms we are to remove poverty wherever possible. Blessed are we when persecuted, but we may avoid persecution by flying from city to city, and may pray to be spared it, as Our Lord prayed in Geth- semane. But if suffering is good, ought it not to be pursued rather than avoided? I answer that suffering is not good in itself. What is good in any painful experience is, for the sufferer, his submis- sion to the will of God, and, for the spectators, the compassion aroused and the acts of mercy to which it leads. In the fallen and partially redeemed universe we may distinguish (l) The simple good descending from God, (2) The simple evil produced by re- bellious creatures, and (3) the exploitation of that evil by God for His redemptive purpose, which produces (4) the complex good to which accepted; suffering and repented sin contribute. Now the fact that God can make complex good out of simple evil does not excuse though by mercy it may save — those who do the sim- ple evil. And this distinction is central. Offences must come, but woe to those by whom they come; sins do cause grace to abound, but we must not make that an excuse for continuing to sin. The crucifixion itself is the best, as well as the worst, of all historical events, but the rile of Judas remains simply evil. We may apply ](Exported%20image%2020240808113911-33.png) ![THE PROBLEM OF PAIN — the affliction which actually or potentially includes all other af- flictions — I would not dare to speak as from myself; and those who reject Christianity will not be moved by Christ's statement that poverty is blessed. But here a rather remarkable fact comes to my aid. Those who would most scornfully repudiate Christian- ity as a mere "opiate of the people" have a contempt for the rich, that is, for all mankind except the poor. They regard the poor as the only people worth preserving from "liquidation", and place in them the only hope of the human race. But this is not compatible with a belief that the effects of poverty on those who suffer it are wholly evil; it even implies that they are good. The Marxist thus finds himself in real agreement with the Christian in those two beliefs which Christianity paradoxically demands — that poverty is blessed and yet ought to be removed. 68 ](Exported%20image%2020240808113911-34.png) ![HUMAN PAIN forty-eight hours and then only by dint of taking everything else away from me. Let Him but sheathe that sword for a moment and I behave like a puppy when the hated bath is over — I shake myself as dry as I can and race off to reacquire my comfortable dirtiness, if not in the nearest manure heap, at least in the nearest flower bed. And that is why tribulations cannot cease until God either sees us remade or sees that our remaking is now hopeless. In the second place, when we are considering pain itself the centre of the whole tribulational system we must be careful to at- tend to what we know and not to what we imagine. That is one of the reasons why the whole central part of this book is devoted to human pain, and animal pain is relegated to a special chapter. About human pain we know, about animal pain we only specu- late. But even within the human race we must draw our evidence from instances that have come under our own observation. The tendency of this or that novelist or poet may represent suffering as wholly bad in its effects, as producing, and justifying, every kind of malice and brutality in the sufferer. And, of course, pain, like pleasure, can be so received: all that is given to a creature with free will must be two-edged, not by the nature of the giver or of the gift, but by the nature of the recipient.48 And, again, the evil results of pain can be multiplied if sufferers are persistently taught by the bystanders that such results are the proper and manly re- sults for them to exhibit. Indignation at other's sufferings, though a generous passion, needs to be well managed lest it steal away patience and humility from those who suffer and plant anger and cynicism in their stead. But I am not convinced that suffering if spared such officious vi- carious indignation, has any natural tendency to produce such evils. I did not find the front-line trenches or the C.C.S. more full than any other place of hatred, selfishness, rebellion, and dishon- esty. I have seen great beauty of spirit in some who were great suf- ferers. I have seen men, for the most part, grow better not worse with advancing years, and I have seen the last illness produce treasures of fortitude and meekness from most unpromising sub- jects. I see in loved and revered historical figures, such as Johnson and Cowper, traits which might scarcely have been tolerable if the men had been happier. If the world is indeed a "vale of soul making" it seems on the whole to be doing its work. Of poverty 48 - On the two-edged nature of pain, see Appendix. ](Exported%20image%2020240808113911-35.png) ![THE PROBLEM OF PAIN my feelings? You know them already: they are the same as yours. I am not arguing that pain is not painful. Pain hurts. That is what the word means. I am only trying to show that the old Christian doctrine of being made "perfect through suffering" 47 is not incred- ible. To prove it palatable is beyond my design. In estimating the credibility of the doctrine two principles ought to be observed. In the first place we must remember that the actu- al moment of present pain is only the centre of what may be called the whole tribulational system which extends itself by fear and pity. Whatever good effects these experiences have are dependent upon the centre; so that even if pain itself was of no spiritual value, yet, if fear and pity were, pain would have to exist in order that there should be something to be feared and pitied. And that fear and pity help us in our return to obedience and charity is not to be doubted. Everyone has experienced the effect of pity in making it easier for us to love the unlovely — that is, to love men not because they are in any way naturally agreeable to us but because they are our brethren. The beneficence of fear most of us have learned during the period of "crises" that led up to the present war. My own experience is something like this. I am progressing along the path of life in my ordinary contentedly fallen and godless condi- tion, absorbed in a merry meeting with my friends for the morrow or a bit of work that tickles my vanity to-day, a holiday or a new book, when suddenly a stab of abdominal pain that threatens seri- ous disease, or a headline in the newspapers that threatens us all with destruction, sends this whole pack of cards tumbling down. At first I am overwhelmed, and all my little happinesses look like broken toys. Then, slowly and reluctantly, bit by bit, I try to bring myself into the frame of mind that I should be in at all times. I remind myself that all these toys were never intended to possess my heart, that my true good is in another world and my only real treasure is Christ. And perhaps, by God's grace, I succeed, and for a day or two become a creature consciously dependent on God and drawing its strength from the right sources. But the moment the threat is withdrawn, my whole nature leaps back to the toys: I am even anxious, God forgive me, to banish from my mind the only thing that supported me under the threat because it is now associated with the misery of those few days. Thus the terrible necessity of tribulation is only too clear. God has had me for but 47 - Hebrews 2: 10. 66 ](Exported%20image%2020240808113911-36.png) ![HUMAN PAIN Light that lighteneth every man presses down upon the minds of all who seriously question what the universe is "about". The pe- culiarity of the Christian faith is not to teach this doctrine but to render it, in various ways, more tolerable. Christianity teaches us that the terrible task has already in some sense been accomplished for us that a master's hand is holding ours as we attempt to trace the difficult letters and that our script need only be a "copy", not an original. Again, where other systems expose our total nature to death (as in Buddhist renunciation) Christianity demands only that we set right a misdirection of our nature; and has no quarrel, like Plato, with the body as such, nor with the psychical elements in our make-up. And sacrifice in its supreme realisation is not ex- acted of all. Confessors as well as martyrs are saved, and some old people whose state of grace we can hardly doubt seem to have got through their seventy years surprisingly easily. The sacrifice of Christ is repeated, or re-echoed, among His followers in very varying degrees, from the cruellest martyrdom down to a self submission of intention whose outward signs have nothing to dis- tinguish them from the ordinary fruits of temperance and "sweet reasonableness". The causes of this distribution I do not know; but from our present point of view it ought to be clear that the real problem is not why some humble, pious, believing people suffer, but why some do not. Our Lord Himself, it will be remembered, explained the salvation of those who are fortunate in this world only by referring to the unsearchable omnipotence of God.46 All arguments in justification of suffering provoke bitter resent- ment against the author. You would like to know how I behave when I am experiencing pain, not writing books about it. You need not guess, for I will tell you; I am a great coward. But what is that to the purpose? When I think of pain — of anxiety that gnaws like fire and loneliness that spreads out like a desert, and the heart-breaking routine of monotonous misery, or again of dull aches that blacken our whole landscape or sudden nauseating pains that knock a man's heart out at one blow, of pains that seem already intolerable and then are suddenly increased, of infuriat- ing scorpion-stinging pains that startle into maniacal movement a man who seemed half dead with his previous tortures — it "quite o'ercrows my spirit". If I knew any way of escape I would crawl through sewers to find it. But what is the good of telling you about 46 - Mark 10: 27. 65 ](Exported%20image%2020240808113911-37.png) ![THE PROBLEM OF PAIN Human will becomes truly creative and truly our own when it is wholly God's, and this is one of the many senses in which he that loses his soul shall find it. In all other acts our will is fed through nature, that is, through created things other than the self through the desires which our physical organism and our heredity supply to us. When we act from ourselves alone — that is, from God in ourselves — we are collaborators in, or live instruments of, crea- tion: and that is why such an act undoes with "backward mutters of dissevering power" the uncreative spell which Adam laid upon his species. Hence as suicide is the typical expression of the stoic spirit, and battle of the warrior spirit, martyrdom always remains the supreme enacting and perfection of Christianity. This great ac- tion bas been initiated for us, done on our behalf, exemplified for our imitation, and inconceivably communicated to all believers, by Christ on Calvary. There the degree of accepted Death reaches the utmost bounds of the imaginable and perhaps goes beyond them; not only all natural supports, but the presence of the very Father to whom the sacrifice is made deserts the victim, and sur- render to God does not falter though God "forsakes" it. The doctrine of death which I describe is not peculiar to Chris- tianity. Nature herself has written it large across the world in the repeated drama of the buried seed and the re-arising corn. From nature, perhaps, the oldest agricultural communities learned it and with animal, or human, sacrifices showed forth for centuries the truth that "without shedding of blood is no remission";43 and though at first such conceptions may have concerned only the crops and offspring of the tribe they came later, in the Mysteries, to concern the spiritual death and resurrection of the individual. The Indian ascetic, mortifying his body on a bed of spikes, preach- es the same lesson; the Greek philosopher tells us that the life of wisdom is "a practice of death".44 The sensitive and noble heathen of modern times makes his imagined gods "die into life".45 Mr. Huxley expounds "nonattachment". We cannot escape the doc- trine by ceasing to be Christians. It is an "eternal gospel" revealed to men wherever men have sought, or endured, the truth: it is the very nerve of redemption, which anatomising wisdom at all times and in all places lays bare; the unescapable knowledge which the 43 - Hebrews 9: 22. 44 - Plato. Phæd. 81, A 64, A). 45 - Keats. Hyperion, 111, 130. 64 ](Exported%20image%2020240808113911-38.png) ![HUMAN PAIN good, something we ought to do even if (by an impossible suppo- sition) God had not commanded it. But in addition to the content, the mere obeying is also intrinsically good, for, in obeying, a ra- tional creature consciously enacts its creaturely röle, reverses the act by which we fell, treads Adam's dance backward, and returns. We therefore agree with Aristotle that what is intrinsically right may well be agreeable, and that the better a man is the more he will like it; but we agree with Kant so far as to say that there is one right act — that of self surrender — which cannot be willed to the height by fallen creatures unless it is unpleasant. And we must add that this one right act includes all other righteousness, and that the supreme cancelling of Adam's fall, the movement "full speed astern" by which we retrace our long journey from Paradise, the untying of the old, hard knot, must be when the creature, with no desire to aid it, stripped naked to the bare willing of obedience, embraces what is contrary to its nature, and does that for which only one motive is possible. Such an act may be described as a "test" of the creature's return to God: hence our fathers said that troubles were "sent to try us". A familiar example is Abraham's "trial" when he was ordered to sacrifice Isaac. With the historicity or the morality of that story I am not now concerned, but with the obvious question "If God is omniscient He must have known what Abraham would do, without any experiment; why, then, this needless torture?" But as St. Augustine points out,42 whatever God knew, Abraham at any rate did not know that his obedience could endure such a command until the event taught him: and the obe- dience which he did not know that he would choose, he cannot be said to have chosen. The reality of Abraham's Obedience was the act itself; and what God knew in knowing that Abraham "would obey" was Abra- ham's actual obedience on that mountain top at that moment. To say that God "need not have tried the experiment" is to say that because God knows, the thing known by God need not exist. If pain sometimes shatters the creature's false self sufficiency, yet in supreme "Trial" or "Sacrifice" it teaches him the self sufficiency which really ought to be his — the "strength, which, if Heaven gave it, may be called his own"; for then, in the absence of all merely natural motives and supports, he acts in that strength, and that alone which God confers upon him through his subjected will. 42 - De Civitate Dei, X VI, xxxii. 63 ](Exported%20image%2020240808113911-39.png) ![THE PROBLEM OF PAIN is to enact the surrender of the self by doing what we like, I know very well from my own experience at the moment. When I under- took to write this book I hoped that the will to obey what might be a "leading" had at least some place in my motives. But now that I am thoroughly immersed in it, it has become a temptation rather than a duty. I may still hope that the writing of the book is, in fact, in conformity with God's will: but to contend that I am learning to surrender myself by doing what is so attractive to me would be ridiculous. Here we tread on very difficult ground. Kant thought that no action had moral value unless it were done out of pure reverence for the moral law, that is, without inclination, and he has been accused of a "morbid frame of mind" which measures the value of an act by its unpleasantness. All popular opinion is, indeed, on Kant's side. The people never admire a man for doing some- thing he likes: the very words "But he likes it" imply the corol- lary "And therefore it has no merit". Yet against Kant stands the obvious truth, noted by Aristotle, that the more virtuous a man becomes the more he enjoys virtuous actions. What an atheist ought to do about this conflict between the ethics of duty and the ethics of virtue, I do not know: but as a Christian I suggest the following solution. It has sometimes been asked whether God commands certain things because they are right, or whether certain things are right because God commands them. With Hooker, and against Dr. Johnson, I emphatically embrace the first alternative. The second might lead to the abominable conclusion (reached, I think, by Pa- ley) that charity is good only because God arbitrarily commanded it that He might equally well have commanded us to hate Him and one another and that hatred would then have been right. I believe, on the contrary, that "they err who think that of the will of God to do this or that there is no reason besides His will" 41 God's will is determined by His wisdom which always perceives, and His goodness which always embraces, the intrinsically good. But when we have said that God commands things only because they are good, we must add that one of the things intrinsically good is that rational creatures should freely surrender themselves to their Creator in obedience. The content of our obedience — the thing we are commanded to do — will always be something intrinsically 41 - Hooker. Laws of Eccl. Polity, I, i, 5. 62 ](Exported%20image%2020240808113911-40.png) ![HUMAN PAIN ters it "unmindful of His glory's diminution". Those who would like the God of scripture to be more purely ethical, do not know what they ask. If God were a Kantian, who would not have us till we came to Him from the purest and best motives, who could be saved? And this illusion of self-sufficiency may be at its strongest in some very honest, kindly, and temperate people, and on such people, therefore, misfortune must fall. The dangers of apparent self sufficiency explain why Our Lord regards the vices of the feckless and dissipated so much more le- niently than the vices that lead to worldly success. Prostitutes are in no danger of finding their present life so satisfactory that they cannot turn to God: the proud, the avaricious, the self righteous, are in that danger. The third operation of suffering is a little harder to grasp. Eve- ryone will admit that choice is essentially conscious; to choose involves knowing that you choose. Now Paradisal man always chose to follow God's will. In following it he also gratified his own desire, both because all the actions demanded of him were, in fact, agreeable to his blameless inclination, and also because the service of God was itself his keenest pleasure, without which as their razor edge all joys would have been insipid to him. The question "Am I doing this for God's sake or only because I happen to like it? did not then arise, since doing things for God's sake was what he chiefly "happened to like". His God-ward will rode his happiness like a well-managed horse, whereas our will, when we are happy, is carried away in the happiness as in a ship racing down a swift stream. Pleasure was then an acceptable offering to God because offering was a pleasure. But we inherit a whole sys- tem of desires which do not necessarily contradict God's will but which, after centuries of usurped autonomy, steadfastly ignore it. If the thing we like doing is, in fact, the thing God wants us to do, yet that is not our reason for doing it; it remains a mere happy coincidence. We cannot therefore know that we are acting at all, or primarily, for God's sake, unless the material of the action is contrary to our inclinations, or (in other words) painful, and what we cannot know that we are choosing, we cannot choose. The full acting out of the self's surrender to God therefore demands pain: this action, to be perfect, must be done from the pure will to obey, in the absence, or in the teeth, of inclination. How impossible it 61 ](Exported%20image%2020240808113911-41.png) ![THE PROBLEM OF PAIN Him. What then can God do in our interests but make "our own life" less agreeable to us, and take away the plausible sources of false happiness? It is just here, where God's providence seems at first to be most cruel, that the Divine humility, the stooping down of the Highest, most deserves praise. We are perplexed to see misfortune falling upon decent, inoffensive, worthy people — on capable, hardworking mothers of families or diligent, thrifty, little trades-people, on those who have worked so hard, and so honestly, for their modest stock of happiness and now seem to be entering on the enjoyment of it with the fullest right. How can I say with sufficient tenderness what here needs to be said? It does not matter that I know I must become, in the eyes of every hos- tile reader, as it were personally responsible for all the suffer- ings I try to explain — just as, to this day, everyone talks as if St. Augustine wanted unbaptised infants to go to Hell. But it matters enormously if I alienate anyone from the truth. Let me implore the reader to try to believe, if only for the moment, that God, who made these deserving people, may really be right when He thinks that their modest prosperity and the happiness of their children are not enough to make them blessed: that all this must fall from them in the end, and that if they have not learned to know Him they will be wretched. And therefore He troubles them, warn- ing them in advance of an insufficiency that one day they will have to discover. The life to themselves and their families stands between them and the recognition of their need; He makes that life less sweet to them. I call this a Divine humility because it is a poor thing to strike our colours to God when the ship is going down under us; a poor thing to come to Him as a last resort, to offer up "our own" when it is no longer worth keeping. If God were proud He would hardly have us on such terms: but He is not proud, He stoops to conquer, He will have us even though we have shown that we prefer everything else to Him, and come to Him because there is "nothing better" now to be had. The same humility is shown by all those Divine appeals to our fears which trouble high-minded readers of scripture. It is hardly complimen- tary to God that we should choose Him as an alternative to Hell: yet even this He accepts. The creature's illusion of self sufficiency must, for the creature's sake, be shattered; and by trouble or fear of trouble on earth, by crude fear of the eternal flames, God shat- 60 ](Exported%20image%2020240808113911-42.png) ![HUMAN PAIN For the same reason when we are going to abuse a man in words we say we are going to "let him know what we think of him". When our ancestors referred to pains and sorrows as God's "vengeance" upon sin they were not necessarily attributing evil passions to God; they may have been recognising the good ele- ment in the idea of retribution. Until the evil man finds evil unmis- takably present in his existence, in the form of pain, he is enclosed in illusion. Once pain has roused him, he knows that he is in some way or other "up against" the real universe: he either rebels (with the possibility of a clearer issue and deeper repentance at some later stage) or else makes some attempt at an adjustment, which, if pursued, will lead him to religion. It is true that neither effect is so certain now as it was in ages when the existence of God (or even of the Gods) was more widely known, but even in our own days we see it operating. Even atheists rebel and express, like Hardy and Housman, their rage against God although (or because) He does not, on their view, exist: and other atheists, like Mr. Huxley, are driven by suffering to raise the whole problem of existence and to find some way of coming to terms with it which, if not Christian, is almost infinitely superior to fatuous contentment with a profane life. No doubt Pain as God's megaphone is a terrible instrument; it may lead to final and unrepented rebellion. But it gives the only opportunity the bad man can have for amendment. It removes the veil; it plants the flag of truth within the fortress of a rebel soul. If the first and lowest operation of pain shatters the illusion that all is well, the second shatters the illusion that what we have, whether good or bad in itself, is our own and enough for us. Eve- ryone has noticed how hard it is to turn our thoughts to God when everything is going well with us. We "have all we want" is a ter- rible saying when "all" does not include God. We find God an interruption. As St. Augustine says somewhere "God wants to give us something, but cannot, because our hands are full — there's no- where for Him to put it." Or as a friend of mine said "we regard God as an airman regards his parachute; it's there for emergen- cies but he hopes he'll never have to use it." Now God, who has made us, knows what we are and that our happiness lies in Him. Yet we will not seek it in Him as long as He leaves us any other resort where it can even plausibly be looked for. While what we call "our own life" remains agreeable we will not surrender it to 59 ](Exported%20image%2020240808113911-43.png) ![THE PROBLEM OF PAIN pains: it is His megaphone to rouse a deaf world. A bad man, happy, is a man without the least inkling that his actions do not "answer", that they are not in accord with the laws of the universe. A perception of this truth lies at the back of the universal human feeling that bad men ought to suffer. It is no use turning up our noses at this feeling, as if it were wholly base. On its mildest level it appeals to everyone's sense of justice. Once when my brother and I, as very small boys, were drawing pictures at the same ta- ble, I jerked his elbow and caused him to make an irrelevant line across the middle of his work; the matter was amicably settled by my allowing him to draw a line of equal length across mine. That is, I was "put in his place", made to see my negligence from the other end. On a sterner level the same idea appears as "retributive punishment", or "giving a man what he deserves". Some enlight- ened people would like to banish all conceptions of retribution or desert from their theory of punishment and place its value wholly in the deterrence of others or the reform of the criminal himself. They do not see that by so doing they render all punishment un- just. What can be more immoral than to inflict suffering on me for the sake of deterring others if I do not deserve it? And if I do deserve it, you are admitting the claims of "retribution". And what can be more outrageous than to catch me and submit me to a disa- greeable process of moral improvement without my consent, un- less (once more) I deserve it? On yet a third level we get vindictive passion the thirst for revenge. This, of course, is evil and expressly forbidden to Christians. But it has perhaps appeared already from our discussion of Sadism and Masochism that the ugliest things in human nature are perversions of good or innocent things. The good thing of which vindictive passion is the perversion comes out with startling clarity in Hobbes's definition of Revengefulness; "desire by doing hurt to another to make him condemn some fact of his own" .40 Revenge loses sight of the end in the means, but its end is not wholly bad — it wants the evil of the bad man to be to him what it is to everyone else. This is proved by the fact that the avenger wants the guilty party not merely to suffer, but to suffer at his hands, and to know it, and to know why. Hence the impulse to taunt the guilty man with his crime at the moment of taking vengeance: hence, too, such natural expressions as "I wonder how he'd like it if the same thing were done to him" or "I'll teach him". 40 - Leviathan, Pt. I, cap. 6. 58 ](Exported%20image%2020240808113911-44.png) ![HUMAN PAIN right in thinking that the first step in education is "to break the child's will". Their methods were often wrong: but not to see the necessity is, I think, to cut oneself off from all understanding of spiritual laws. And if, now that we are grown up, we do not howl and stamp quite so much, that is partly because our elders began the process of breaking or killing our self will in the nursery, and partly because the same passions now take more subtle forms and have grown clever at avoiding death by various "compensations". Hence the necessity to die daily: however often we think we have broken the rebellious self we shall still find it alive. That this pro- cess cannot be without pain is sufficiently witnessed by the very history of the word "mortification". But this intrinsic pain, or death, in mortifying the usurped self, is not the whole story. Paradoxically, mortification, though itself a pain, is made easier by the presence of pain in its context. This happens, I think, principally in three ways. The human spirit will not even begin to try to surrender self will as long as all seems to be well with it. Now error and sin both have this property, that the deeper they are the less their victim sus- pects their existence; they are masked evil. Pain is unmasked, un- mistakable evil; every man knows that something is wrong when he is being hurt. The Masochist is no real exception. Sadism and Masochism respectively isolate, and then exaggerate, a "moment" or "aspect" in normal sexual passion. Sadism39 exaggerates the aspect of capture and domination to a point at which only ill- treatment of the beloved will satisfy the pervert — as though he said, "1 am so much master that I even torment you." Masochism exaggerates the complementary and opposite aspect, and says "I am so enthralled that I welcome even pain at your hands". Unless the pain were felt as evil — as an outrage underlining the complete mastery of the other party — it would cease, for the Masochist, to be an erotic stimulus. And pain is not only immediately recognis- able evil, but evil impossible to ignore. We can rest contentedly in our sins and in our stupidities; and anyone who has watched glut- tons shovelling down the most exquisite foods as if they did not know what they were eating, will admit that we can ignore even pleasure. But pain insists upon being attended to. God whispers to us in our pleasures, speaks in our conscience, but shouts in our 39 - The modern tendancy to mean by "sadistic cruelty" simply "great cruelty", or cruelty specially condemned by the writer, is not useful. 57 ](Exported%20image%2020240808113911-45.png) ![THE PROBLEM OF PAIN of sensation, probably conveyed by specialised nerve fibres, and recognisable by the patient as that kind of sensation whether he dislikes it or not (e.g., the faint ache in my limbs would be recog- nised as an ache even if I didn't object to it). B. Any experience, whether physical or mental, which the patient dislikes. It will be noticed that all Pains in sense A become Pains in sense B if they are raised above a certain very low level of intensity, but that Pains in the B sense need not be Pains in the A sense. Pain in the B sense, in fact, is synonymous with "suffering", "anguish", "tribulation", "adversity", or "trouble", and it is about it that the problem of pain arises. For the rest of this book Pain will be used in the B sense and will include all types of suffering: with the A sense we have no further concern. Now the proper good of a creature is to surrender itself to its Creator — to enact intellectually, volitionally, and emotionally, that relationship which is given in the mere fact of its being a crea- ture. When it does so, it is good and happy. Lest we should think this a hardship, this kind of good begins on a level far above the creatures, for God Himself, as Son, from all eternity renders back to God as Father by filial obedience the being which the Father by paternal love eternally generates in the Son. This is the pat- tern which man was made to imitate — which Paradisal man did imitate and wherever the will conferred by the Creator is thus per- fectly offered back in delighted and delighting obedience by the creature, there, most undoubtedly, is Heaven, and there the Holy Ghost proceeds. In the world as we now know it, the problem is how to recover this self surrender. We are not merely imperfect creatures who must be improved: we are, as Newman said, rebels who must lay down our arms. The first answer, then, to the ques- tion why our cure should be painful, is that to render back the will which we have so long claimed for our own, is in itself, wherever and however it is done, a grievous pain. Even in Paradise I have supposed a minimal self adherence to be overcome, though the overcoming, and the yielding, would there be rapturous. But to surrender a self will inflamed and swollen with years of usurpa- tion is a kind of death. We all remember this self will as it was in childhood the bitter, prolonged rage at every thwarting, the burst of passionate tears, the black, Satanic wish to kill or die rather than to give in. Hence the older type of nurse or parent was quite 56 ](Exported%20image%2020240808113911-46.png) ![HUMAN PAIN Since the life of Christ is every way most bitter to nature and the Self and the Me (for in the true life of Christ, the Self and the Me and nature must be forsaken and lost and die altogether), therefore in each of us, nature hath a horror of it. Theologia Germanica, XX. have tried to show in a previous chapter that the possibility of pain is inherent in the very existence of a world where souls can meet. When souls become wicked they will certainly use this possibility to hurt one another; and this, perhaps, accounts for four-fifths of the sufferings of men. It is men, not God, who have produced racks, whips, prisons, slavery, guns, bayonets, and bombs; it is by human avarice or human stupidity, not by the churlishness of nature, that we have poverty and overwork. But there remains, none the less, much suffering which cannot thus be traced to ourselves. Even if all suffering were man-made, we should like to know the reason for the enormous permission to torture their fellows which God gives to the worst of men.38 To say, as was said in the last chapter, that good, for such creatures as we now are, means primarily corrective or remedial good, is an incomplete answer. Not all medicine tastes nasty: or if it did, that is itself one of the unpleasant facts for which we should like to know the reason. Before proceeding I must pick up a point made in Chapter Il. I there said that pain, below a certain level of intensity, was not resented and might even be rather liked. Perhaps you then wanted to reply "In that case I should not call it Pain", and you may have been right. But the truth is that the word Pain has two senses which must now be distinguished. A. A particular kind 38 - Or perhaps it would be safer to say "of creatures". I by no means reject the view that the "efficient cause" of disease, or some disease, may be a created being other than man (see Chapter IX). In Scripture Satan is specially associ- ated with disease in Job, in Luke 13: 16, ICorinthians 5:5, and (probably) in I Timothy I It is, at the present stage of the argument, indifferent whether all the created wills to which God allows a power of tormenting other crea- tures are human or not. ](Exported%20image%2020240808113911-47.png) ![THE PROBLEM OF PAIN me an impenetrable curtain, but, as I have said, it makes no part of my present argument. Clearly it would be futile to attempt to solve the problem of pain by producing another problem. The thesis of this chapter is simply that man, as a species, spoiled him- self, and that good, to us in our present state, must therefore mean primarily remedial or corrective good. What part pain actually plays in such remedy or correction, is now to be considered. 54 ](Exported%20image%2020240808113911-48.png) ![THE FALL OF MAN the difficulty of the Pauline formula turns on the word in, and that this word, again and again in the New Testament, is used in senses we cannot fully understand. That we can die "in" Adam and live "in" Christ seems to me to imply that man, as he really is, differs a good deal from man as our categories of thought and our three dimensional imaginations represent him; that the sepa- rateness modified only by causal relations — which we discern be- tween individuals, is balanced, in absolute reality, by some kind of "inter-inanimation" of which we have no conception at all. It may be that the acts and sufferings of great archetypal individuals such as Adam and Christ are ours, not by legal fiction, metaphor, or causality, but in some much deeper fashion. There is no question, of course, of individuals melting down into a kind of spiritual con- tinuum such as Pantheistic systems believe in; that is excluded by the whole tenor of our faith. But there may be a tension between individuality and some other principle. We believe that the Holy Spirit can be really present and operative in the human spirit, but we do not, like Pantheists, take this to mean that we are "parts" or "modifications" or "appearances" of God. We may have to sup- pose, in the long run, that something of the same kind is true, in its appropriate degree, even of created spirits, that each, though distinct, is really present in all, or in some, others —just as we may have to admit "action at a distance" into our conception of matter. Everyone will have noticed how the Old Testament seems at times to ignore our conception of the individual. When God promises Jacob that "He will go down with him into Egypt and will also surely bring him up this is fulfilled either by the burial of Jacob's body in Palestine or by the exodus of Jacob's de- scendants from Egypt. It is quite right to connect this notion with the social structure of early communities in which the individual is constantly overlooked in favour of the tribe or family: but we ought to express this connection by two propositions of equal im- portance — firstly that their social experience blinded the ancients to some truths which we perceive, and secondly that it made them sensible of some truths to which we are blind. Legal fiction, adoption, and transference or imputation of merit and guilt, could never have played the part they did play in theology if they had always been felt to be so artificial as we now feel them to be. I have thought it right to allow this one glance at what is for 37 - Genesis 46: 4. 53 ](Exported%20image%2020240808113911-49.png) ![THE PROBLEM OF PAIN one of original Sin, and not merely one of original misfortune, that is because our actual religious experience does not allow us to regard it in any other way. Theoretically, I suppose, we might say "Yes: we behave like vermin, but then that is because we are vermin. And that, at any rate, is not our fault." But the fact that we are vermin, so far from being felt as an excuse, is a greater shame and grief to us than any of the particular acts which it leads us to commit. The situation is not nearly so hard to understand as some people make out. It arises among human beings whenever a very badly brought up boy is introduced into a decent family. They rightly remind themselves that it is "not his own fault" that he is a bully, a coward, a tale-bearer and a liar. But none the less, however it came there, his present character is detestable. They not only hate it, but ought to hate it. They cannot love him for what he is, they can only try to turn him into what he is not. In the meantime, though the boy is most unfortunate in having been so brought up, you cannot quite call his character a "misfortune" as if he were one thing and his character another. It is he — he himself who bullies and sneaks and likes doing it. And if he be- gins to mend he will inevitably feel shame and guilt at what he is just beginning to cease to be. With this I have said all that can be said on the level at which alone I feel able to treat the subject of the Fall. But I warn my readers once more that this level is a shallow one. We have said nothing about the trees of life and of knowledge which doubtless conceal some great mystery: and we have said nothing about the Pauline statement that "as in Adam all die, so in Christ shall all be made alive" .35 It is this passage which lies behind the Patristic doctrine of our physical presence in Adam's loins and Anselm's doctrine of our inclusion, by legal fiction, in the suffering Christ. These theories may have done good in their day but they do no good to me, and I am not going to invent others. We have recently been told by the scientists that we have no right to expect that the real universe should be picturable, and that if we make mental pictures to illustrate quantum physics we are moving further away from reality, not nearer to it.36 We have clearly even less right to demand that the highest spiritual realities should be picturable, or even explicable in terms of our abstract thought. I observe that 35 - ICorinthians 15: 22. 36 - Sir James Jeans' The Mysterious Universe, cap. 5. 52 ](Exported%20image%2020240808113911-50.png) ![THE FALL OF MAN disturbance of the relation between his component parts, and an internal perversion of one of them. God might have arrested this process by miracle: — but this — to speak in somewhat irreverent metaphor would have been to de- cline the problem which God had set Himself when He created the world, the problem of expressing His goodness through the total drama of a world containing free agents, in spite of, and by means of, their rebellion against Him. The symbol of a drama, a symphony, or a dance, is here useful to correct a certain absurdity which may arise if we talk too much of God planning and creat- ing the world process for good and of that good being frustrated by the free will of the creatures. This may raise the ridiculous idea that the Fall took God by surprise and upset His plan, or else — more ridiculously still that God planned the whole thing for conditions which, He well knew, were never going to be realised. In fact, of course, God saw the crucifixion in the act of creating the first nebula. The world is a dance in which good, descending from God, is disturbed by evil arising from the creatures, and the resulting conflict is resolved by God's own assumption of the suf- fering nature which evil produces. The doctrine of the free Fall asserts that the evil which thus makes the fuel or raw material for the second and more complex kind of good is not God's contri- bution but man's. This does not mean that if man had remained innocent God could not then have contrived an equally splendid symphonic whole — supposing that we insist on asking such ques- tions. But it must always be remembered that when we talk of what might have happened, of contingencies outside the whole actuality, we do not really know what we are talking about. There are no times or places outside the existing universe in which all this "could happen" or "could have happened". I think the most significant way of stating the real freedom of man is to say that if there are other rational species than man, existing in some other part of the actual universe, then it is not necessary to suppose that they also have fallen. Our present condition, then, is explained by the fact that we are members of a spoiled species. I do not mean that our suf- ferings are a punishment for being what we cannot now help being nor that we are morally responsible for the rebellion of a remote ancestor. If, none the less, I call our present condition 51 ](Exported%20image%2020240808113911-51.png) ![THE PROBLEM OF PAIN biochemical and environmental facts happened to cause them. And the mind itself fell under the psychological laws of associa- tion and the like which God had made to rule the psychology of the higher anthropoids. And the will, caught in the tidal wave of mere nature, had no resource but to force back some of the new thoughts and desires by main strength, and these uneasy rebels became the subconscious as we now know it. The process was not, I conceive, comparable to mere deterioration as it may now occur in a human individual; it was a loss of status as a species. What man lost by the Fall was his original specific nature. "Dust thou art, and unto dust shalt thou return." The total or- ganism which had been taken up into his spiritual life was allowed to fall back into the merely natural condition from which, at his making, it had been raised — just as, far earlier in the story of crea- tion, God had raised vegetable life to become the vehicle of ani- mality, and chemical process to be the vehicle of vegetation, and physical process to be the vehicle of chemical. Thus human spirit from being the master of human nature became a mere lodger in its own house, or even a prisoner; rational consciousness became what It now is — a fitful spot-light resting on a small part of the cer- ebral motions. But this limitation of the spirit's powers was a lesser evil than the corruption of the spirit itself. It had turned from God and become its own idol, so that though it could still turn back to God,34 it could do so only by painful effort, and its inclination was self ward. Hence pride and ambition, the desire to be lovely in its own eyes and to depress and humiliate all rivals, envy, and restless search for more, and still more, security, were now the at- titudes that came easiest to it. It was not only a weak king over its own nature, but a bad one: it sent down into the psycho-physical organism desires far worse than the organism sent up in to it. This condition was transmitted by heredity to all later generations, for it was not simply what biologists call an acquired variation; it was the emergence of a new kind of man — a new species, never made by God, had sinned itself into existence. The change which man had undergone was not parallel to the development of a new or- gan or a new habit; it was a radical alteration of his constitution, a 34 - Theologians will note that I am not here intending to make any contribu- tion to the Pelagian-Augustinian controversey. I mean only that such return to God was not, even now, an impossilibity. Where the initiative lies in any instance of such return is a question on which I am saying nothing. 50 ](Exported%20image%2020240808113911-52.png) ![THE FALL OF MAN possible even to Paradisal man, because the mere existence of a self — the mere fact that we call it "me" — includes from the first, the danger of self idolatry. Since I am I, I must make an act of self surrender, however small or however easy, in living to God rather than to myself. This is, if you like, the "weak spot" in the very na- ture of creation, the risk which God apparently thinks worth tak- ing. But the sin was very heinous, because the self which Paradisal man had to surrender contained no natural recalcitrancy to being surrendered. His data, so to speak, were a psychophysical organ- ism wholly subject to the will and a will wholly disposed, though not compelled, to turn to God. The self surrender which he prac- tised before the Fall meant no struggle but only the delicious over- coming of an infinitesimal self adherence which delighted to be overcom — of which we see a dim analogy in the rapturous mutual self-surrenders of lovers even now. He had, therefore, no tempta- tion (in our sense) to choose the self — no passion or inclination obstinately inclining that way — nothing but the bare fact that the self was himself Up to that moment the human spirit had been in full control of the human organism. It doubtless expected that it would retain this control when it had ceased to obey God. But its authority over the organism was a delegated authority which it lost when it ceased to be God's delegate. Having cut itself off, as far as it could, from the source of its being, it had cut itself off from the source of power. For when we say of created things that A rules B this must mean that God rules B through A. I doubt whether it would have been intrinsically possible for God to continue to rule the organism through the human spirit when the human spirit was in revolt against Him. At any rate He did not. He began to rule the organism in a more external way, not by the laws of spirit, but by those of nature.33 Thus the organs, no longer governed by man's will, fell under the control of ordinary biochemical laws and suf- fered whatever the inter-workings of those laws might bring about in the way of pain, senility and death. And desires began to come up into the mind of man, not as his reason chose, but just as the 33 - This is a development of Hooker's conception of Law. To disobey your proper law (i. e., the law God makes for a being such as you) means to find yourself obeing one of God's lower laws: e.g., if, when walking on a slippery pavement, you neglect the law of prudence, you suddenly find yourself obe- ing the law of gravitation. 49 ](Exported%20image%2020240808113911-53.png) ![THE PROBLEM OF PAIN of course, as rich in factual context. From Christianity itself we learn that there is a level — in the long run the only level of impor- tance — on which the learned and the adult have no advantage at all over the simple and the child. I do not doubt that if the Para- disal man could now appear among us, we should regard him as an utter savage, a creature to be exploited or, at best, patronised. Only one or two, and those the holiest among us, would glance a second time at the naked, shaggy-bearded, slow-spoken creature: but they, after a few minutes, would fall at his feet. We do not know how many of these creatures God made, nor how long they continued in the Paradisal state. But sooner or later they fell. Someone or something whispered that they could be- come as gods — that they could cease directing their lives to their Creator and taking all their delights as uncovenanted mercies, as "accidents" (in the logical sense) which arose in the course of a life directed not to those delights but to the adoration of God. As a young man wants a regular allowance from his father which he can count on as his own, within which he makes his own plans (and rightly, for his father is after all a fellow creature) so they desired to be on their own, to take care for their own future, to plan for pleasure and for security, to have a meum from which, no doubt, they would pay some reasonable tribute to God in the way of time, attention, and love, but which nevertheless, was theirs not His. They wanted, as we say, to "call their souls their own". But that means to live a lie, for our souls are not, in fact, our own. They wanted some corner in the universe of which they could say to God, "This is our business, not yours." But there is no such cor- ner. They wanted to be nouns, but they were, and eternally must be, mere adjectives. We have no idea in what particular act, or se- ries of acts, the self contradictory, impossible wish found expres- sion. For all I can see, it might have concerned the literal eating of a fruit, but the question is of no consequence. This act of self-will on the part of the creature, which constitutes an utter falseness to its true creaturely position, is the only sin that can be conceived as the Fall. For the difficulty about the first sin is that it must be very heinous, or its consequences would not be so terrible, and yet it must be something which a being free from the temptations of fallen man could conceivably have committed. The turning from God to self fulfils both conditions. It is a sin 48 ](Exported%20image%2020240808113911-54.png) ![THE FALL OF MAN petites to the judgement seat of will not because they had to, but because he chose. Sleep meant to him not the stupor which we undergo, but willed and conscious repose — he remained awake to enjoy the pleasure and duty of sleep. Since the processes of decay and repair in his tissues were similarly conscious and obe- dient, it may not be fanciful to suppose that the length of his life was largely at his own discretion. Wholly commanding himself, he commanded all lower lives with which he came into contact. Even now we meet rare individuals who have a mysterious power of taming beasts. This power the Paradisal man enjoyed in emi- nence. The old picture of the brutes sporting before Adam and fawning upon him may not be wholly symbolical. Even now more animals than you might expect are ready to adore man if they are given a reasonable opportunity: for man was made to be the priest and even, in one sense, the Christ, of the animals — the mediator through whom they apprehend so much of the Divine splendour as their irrational nature allows. And God was to such a man no slippery, inclined plane. The new consciousness had been made to repose on its Creator, and repose it did. However rich and varied man's experience of his fellows (or fellow) in charity and friendship and sexual love, or of the beasts, or of the surrounding world then first recognised as beautiful and awful, God came first in his love and in his thought, and that without painful effort. In perfect cyclic movement, being, power and joy descended from God to man in the form of gift and returned from man to God in the form of obedient love and ecstatic adoration: and in this sense, though not in all, man was then truly the son of God, the proto- type of Christ, perfectly enacting in joy and ease of all the faculties and all the senses that filial self surrender which Our Lord enacted in the agonies of the crucifixion. Judged by his artefacts, or perhaps even by his language, this blessed creature was, no doubt, a savage. All that experience and practice can teach he had still to learn: if he chipped flints, he doubtless chipped them clumsily enough. He may have been ut- terly incapable of expressing in conceptual form his paradisal ex- perience. All that is quite irrelevant. From our own childhood we remember that before our elders thought us capable of "under- standing" anything, we already had spiritual experiences as pure and as momentous as any we have undergone since, though not, 47 ](Exported%20image%2020240808113911-55.png) ![THE PROBLEM OF PAIN themselves, and then as if our pleasure in thinking were the end, and finally as if our pride or celebrity were the end. Thus all day long, and all the days of our life, we are sliding, slipping, falling away — as if God were, to our present consciousness, a smooth inclined plane on which there is no resting. And indeed we are now of such a nature that we must slip off, and the sin, because it is unavoidable, may be venial. But God cannot have made us so. The gravitation away from God, "the journey homeward to ha- bitual self", must, we think, be a product of the Fall. What exactly happened when Man fell, we do not know; but if it is legitimate to guess, I offer the following picture — a "myth" in the Socratic sense,32 a not unlikely tale. For long centuries God perfected the animal form which was to become the vehicle of humanity and the image of Himself. He gave it hands whose thumb could be applied to each of the fin- gers, and jaws and teeth and throat capable of articulation, and a brain sufficiently complex to execute all the material motions whereby rational thought is incarnated. The creature may have existed for ages in this state before it became man: it may even have been clever enough to make things which a modern archae- ologist would accept as proof of its humanity. But it was only an animal because all its physical and psychical processes were di- rected to purely material and natural ends. Then, in the fullness of time, God caused to descend upon this organism, both on its psy- chology and physiology, a new kind of consciousness which could say "I" and "me", which could look upon itself as an object, which knew God, which could make judgements of truth, beauty, and goodness, and which was so far above time that it could perceive time flowing past. This new consciousness ruled and illuminated the whole organism, flooding every part of it with light, and was not, like ours, limited to a selection of the movements going on in one part of the organism; namely the brain. Man was then all con- sciousness. The modern Yogi claims — whether falsely or truly — to have under control those functions which to us are almost part of the external world, such as digestion and circulation. This power the first man had in eminence. His organic processes obeyed the law of his own will, not the law of nature. His organs sent up ap- 32 - l. e., an account of what may have been the historical fact. Not to be confused with "myth" in Dr Niebuhr's sense (i. e., a symbolical representation of non- historical truth). 46 ](Exported%20image%2020240808113911-56.png) ![THE FALL OF MAN sin against the neighbour. And certainly, if we are to hold the doc- trine of the Fall in any real sense, we must look for the great sin on a deeper and more timeless level than that of social morality. This sin has been described by Saint Augustine as the result of Pride, of the movement whereby a creature (that is, an essentially dependent being whose principle of existence lies not in itself but in another) tries to set up on its own, to exist for itself.31 Such a sin requires no complex social conditions, no extended experience, no great intellectual development. From the moment a creature becomes aware of God as God and of itself as self, the terrible alternative of choosing God or self for the centre is opened to it. This sin is committed daily by young children and ignorant peasants as well as by sophisticated persons, by solitaries no less than by those who live in society: it is the fall in every individual life, and in each day of each individual life, the basic sin behind all particular sins: at this very moment you and I are either com- mitting it, or about to commit it, or repenting it. We try, when we wake, to lay the new day at God's feet; before we have finished shaving, it becomes our day and God's share in it is felt as a tribute which we must pay out of "our own" pocket, a deduction from the time which ought, we feel, to be "our own". A man starts a new job with a sense of vocation and, perhaps, for the first week still keeps the discharge of the vocation as his end, taking the pleas- ures and pains from God's hand, as they come, as "accidents". But in the second week he is beginning to "know the ropes": by the third, he has quarried out of the total job his own plan for himself within that job, and when he can pursue this he feels that he is get- ting no more than his rights, and, when he cannot, that he is being interfered with. A lover, in obedience to a quite uncalculating im- pulse, which may be full of good will as well as of desire and need not be forgetful of God, embraces his beloved, and then, quite innocently, experiences a thrill of sexual pleasure; but the second embrace may have that pleasure in view, may be a means to an end, may be the first downward step towards the state of regard- ing a fellow creature as a thing, as a machine to be used for his pleasure. Thus the bloom of innocence, the element of obedience and the readiness to take what comes is rubbed off every activity. Thoughts undertaken for God's sake — like that on which we are engaged at the moment — are continued as if they were an end in 31 - De Dei, XIV, xiii. 45 ](Exported%20image%2020240808113911-57.png) ![THE PROBLEM OF PAIN who make similar artefacts. We must be on our guard here against an illusion which the study of prehistoric man seems naturally to beget. Prehistoric man, because he is prehistoric, is known to us only by the material things he made — or rather by a chance selection from among the more durable things he made. It is not the fault of archeologists that they have no better evidence: but this penury constitutes a continual temptation to infer more than we have any right to infer, to assume that the community which made the superior artefacts was superior in all respects. Everyone can see that the assumption is false; it would lead to the conclu- sion that the leisured classes of our own time were in all respects superior to those of the Victorian age. Clearly the prehistoric men who made the worst pottery might have made the best poetry and we should never know it. And the assumption becomes even more absurd when we are comparing prehistoric men with mod- ern savages. The equal crudity of artefacts here tells you nothing about the intelligence or virtue of the makers. What is learned by trial and error must begin by being crude, whatever the character of the beginner. The very same pot which would prove its maker a genius if it were the first pot ever made in the world, would prove its maker a dunce if it came after millenniums of pot-mak- ing. The whole modern estimate of primitive man is based upon that idolatry of artefacts which is a great corporate sin of our own civilisation. We forget that our prehistoric ancestors made all the most useful discoveries, except that of chloroform, which have ever been made. To them we owe language, the family, clothing, the use of fire, the domestication of animals, the wheel, the ship, poetry and agriculture. Science, then, has nothing to say either for or against the doc- trine of the Fall. A more philosophical difficulty has been raised by the modern theologian to whom all students of the subject are most indebted.30 This writer points out that the idea of sin presup- poses a law to sin against: and since it would take centuries for the "herd-instinct" to crystallise into custom and for custom to harden into law, the first man — if there ever was a being who could be so described — could not commit the first sin. This argument as- sumes that virtue and the herd-instinct commonly coincide, and that the "first sin" was essentially a social sin. But the traditional doctrine points to a sin against God, an act of disobedience, not a 30 - N. P. Williams. The Ideas of the Fall and of Original Sin. p. 516. 44 ](Exported%20image%2020240808113911-58.png) ![THE FALL OF MAN edge, contains a deeper and subtler truth than the version which makes the apple, simply and solely a pledge of obedience. But I assume that the Holy Spirit would not have allowed the latter to grow up in the Church and win the assent of great doctors unless it also was true and useful as far as it went. It is this version which I am going to discuss, because, though I suspect the primitive ver- sion to be far more profound, I know that I, at any rate, cannot penetrate its profundities. I am to give my readers not the best absolutely but the best I have. In the developed doctrine, then, it is claimed that Man, as God made him, was completely good and completely happy, but that he disobeyed God and became what we now see. Many people think that this proposition has been proved false by modern sci- ence. "We now know", it is said, "that so far from having fallen out of a primeval state of virtue and happiness, men have slowly risen from brutality and savagery." There seems to me to be a complete confusion here. Brute and savage both belong to that unfortunate class of words which are sometimes used rhetorically, as terms of reproach, and sometimes scientifically, as terms of description; and the pseudoscientific argument against the Fall depends on a confusion between the usages. If by saying that man rose from brutality you mean simply that man is physically descended from animals, I have no objection. But it does not follow that the further back you go the more brutal — in the sense of wicked or wretched you will find man to be. No animal has moral virtue: but it is not true that all animal behaviour is of the kind one should call "wick- ed" if it were practised by men. On the contrary, not all animals treat other creatures of their own species as badly as men treat men. Not all are as gluttonous or lecherous as we, and no animal is ambitious. Similarly if you say that the first men were "savages , meaning by this that their artefacts were few and clumsy like those of modern "savages", you may well be right; but if you mean that they were "savage" in the sense of being lewd, ferocious, cruel, and treacherous, you will be going beyond your evidence, and that for two reasons. In the first place, modern anthropologists and missionaries are less inclined than their fathers to endorse your unfavourable picture even of the modern savage. In the second place you cannot argue from the artefacts of the earliest men that they were in all respects like the contemporary peoples 43 ](Exported%20image%2020240808113911-59.png) ![THE PROBLEM OF PAIN Fathers may sometimes say that we are punished for Adam's sin: but they much more often say that we sinned "in Adam". It may be impossible to find out what they meant by this, or we may decide that what they meant was erroneous. But I do not think we can dismiss their way of talking as a mere "idiom". Wisely, or foolishly, they believed that we were really — and not simply by le- gal fiction — involved in Adam's action. The attempt to formulate this belief by saying that we were "in" Adam in a physical sense — Adam being the first vehicle of the "immortal germ plasm" — may be unacceptable: but it is, of course, a further question whether the belief itself is merely a confusion or a real insight into spiritual realities beyond our normal grasp. At the moment, however, this question does not arise; for, as I have said I have no intention of arguing that the descent to modern man of inabilities contracted by his remote ancestors is a specimen of retributive justice. For me it is rather a specimen of those things necessarily involved in the creation of a stable world which we considered in Chapter Il. It would, no doubt, have been possible for God to remove by mira- cle the results of the first sin ever committed by a human being; but this would not have been much good unless He was prepared to remove the results of the second sin, and of the third, and so on forever. If the miracles ceased, then sooner or later we might have reached our present lamentable situation: if they did not, then a world, thus continually underpropped and corrected by Divine interference, would have been a world in which nothing important ever depended on human choice, and in which choice itself would soon cease from the certainty that one of the apparent alternatives before you would lead to no results and was therefore not really an alternative. As we saw, the chess player's freedom to play chess depends on the rigidity of the squares and the moves. Having isolated what I conceive to be the true import of the doctrine that Man is fallen, let us now consider the doctrine in itself. The story in Genesis is a story (full of the deepest suggestion) about a magic apple of knowledge; but in the developed doctrine the inherent magic of the apple has quite dropped out of sight, and the story is simply one of disobedience. I have the deepest respect even for Pagan myths, still more for myths in Holy Scrip- ture. I therefore do not doubt that the version which emphasises the magic apple, and brings together the trees of life and knowl- 42 ](Exported%20image%2020240808113911-60.png) ![THE FALL OF MAN To obey is the proper office of a rational soul. MONTAIGNE Il, xii HE Christian answer to the question proposed in the last chapter is contained in the doctrine of the Fall. According to that doctrine, man is now a horror to God and to himself and a creature ill-adapted to the universe not because God made him so but because he has made himself so by the abuse of his free will. To my mind this is the sole function of the doctrine. It exists to guard against two sub-Christian theories of the origin of evil — Monism, according to which God Himself, being "above good and evil", produces impartially the effects to which we give those two names, and Dualism, according to which God produces good, while some equal and independent Power produces evil. Against both these views Christianity asserts that God is good; that He made all things good and for the sake of their goodness; that one of the good things He made, namely, the free will of rational crea- tures, by its very nature included the possibility of evil; and that creatures, availing themselves of this possibility, have become evil. Now this function — which is the only one I allow to the doctrine of the Fall — must be distinguished from two other functions which it is sometimes, perhaps, represented as performing, but which I reject. In the first place, I do not think the doctrine answers the question "Was it better for God to create than not to create?" That is a question I have already declined. Since I believe God to be good, I am sure that, if the question has a meaning, the answer must be Yes. But I doubt whether the question has any meaning: and even if it has, I am sure that the answer cannot be attained by the sort of value-judgements which men can significantly make. In the second place, I do not think the doctrine of the Fall can be used to show that it is "just", in terms of retributive justice, to punish individuals for the faults of their remote ancestors. Some forms of the doctrine seem to involve this; but I question whether any of them, as understood by its exponents, really meant it. The ](Exported%20image%2020240808113911-61.png) ![40 ](Exported%20image%2020240808113911-62.png) ![HUMAN WICKEDNESS 29 thoroughly intended it . This chapter will have been misunderstood if anyone describes it as a reinstatement of the doctrine of Total Depravity. I disbe- lieve that doctrine, partly on the logical ground that if our de- pravity were total we should not know ourselves to be depraved, and partly because experience shows us much goodness in human nature. Nor am I commending universal gloom. The emotion of shame has been valued not as an emotion but because of the in- sight to which it leads. I think that insight should be permanent in each man's mind: but whether the painful emotions that attend it should also be encouraged, is a technical problem of spiritual direction on which, as a layman, I have little call to speak. My own idea, for what it is worth, is that all sadness which is not ei- ther arising from the repentance of a concrete sin and hastening towards concrete amendment or restitution, or else arising from pity and hastening to active assistance, is simply bad; and I think we all sin by needlessly disobeying the apostolic injunction to "re- joice" as much as by anything else. Humility, after the first shock, is a cheerful virtue: it is the high-minded unbeliever, desperately trying in the teeth of repeated disillusions to retain his "faith in hu- man nature" who is really sad. I have been aiming at an intellectu- al, not an emotional, effect: I have been trying to make the reader believe that we actually are, at present, creatures whose character must be, in some respects, a horror to God, as it is, when we re- ally see it, a horror to ourselves. This I believe to be a fact: and I notice that the holier a man is, the more fully he is aware of that fact. Perhaps you have imagined that this humility in the saints is a pious illusion at which God smiles. That is a most dangerous error. It is theoretically dangerous, because it makes you identify a vir- tue (i.e., a perfection) with an illusion (i.e., an imperfection), which must be nonsense. It is practically dangerous because it encour- ages a man to mistake his first insights into his own corruption for the first beginnings of a halo round his own silly head. No; depend upon it, when the saints say that they — even they — are vile, they are recording truth with scientific accuracy. How did this state of affairs come about? In the next chapter I shall give as much as I can understand of the Christian answer to that question. 29 - Serious Call, cap. 2. 39 ](Exported%20image%2020240808113911-63.png) ![THE PROBLEM OF PAIN to cruelty. Even a good emotion, pity, if not controlled by char- ity and justice, leads through anger to cruelty. Most atrocities are stimulated by accounts of the enemy's atrocities and pity for the oppressed classes, when separated from the moral law as a whole, leads by a very natural process to the unremitting brutalities of a reign of terror. 7. Some modern theologians have, quite rightly, protested against an excessively moralistic interpretation of Christianity. The Holiness of God is something more and other than moral perfection: His claim upon us is something more and other than the claim of moral duty. I do not deny it: but this conception, like that of corporate guilt, is very easily used as an evasion of the real issue. God may be more than moral goodness: He is not less. The road to the promised land runs past Sinai. The moral law may ex- ist to be transcended: but there is no transcending it for those who have not first admitted its claims upon them, and then tried with all their strength to meet that claim, and fairly and squarely faced the fact of their failure. 8. "Let no man say when he is tempted, I am tempted of God. "28 Many schools of thought encourage us to shift the responsibility for our behaviour from our own shoulders to some inherent ne- cessity in the nature of human life, and thus, indirectly, to the Creator. Popular forms of this view are the evolutionary doctrine that what we call badness is an unavoidable legacy from our ani- mal ancestors, or the idealistic doctrine that it is merely a result of our being finite. Now Christianity, if I have understood the Pauline epistles, does admit that perfect obedience to the moral law, which we find written in our hearts and perceive to be neces- sary even on the biological level, is not in fact possible to men. This would raise a real difficulty about our responsibility if per- fect obedience had any practical relation at all to the lives of most of us. Some degree of obedience which you and I have failed to attain in the last twenty-four hours is certainly possible. The ulti- mate problem must not be used as one more means of evasion. Most of us are less urgently concerned with the Pauline question than with William Law's simple statement: "if you will here stop and ask yourselves why you are not as pious as the primitive Christians were, your own heart will tell you, that it is neither through ignorance nor inability, but purely because you never 28 -James l: 13. 38 ](Exported%20image%2020240808113911-64.png) ![HUMAN WICKEDNESS our race from disaster even on this planet. The standard which seems to have come into the "pocket" from outside, turns out to be terribly relevant to conditions inside the pocket — so relevant that a consistent practice of virtue by the human race even for ten years would fill the earth from pole to pole with peace, plenty, health, merriment, and heartsease, and that nothing else will. It may be the custom, down here, to treat the regimental rules as a dead letter or a counsel of perfection: but even now, everyone who stops to think can see that when we meet the enemy this neglect is going to cost every man of us his life. It is then that we shall envy the "morbid" person, the "pedant" or "enthusiast" who really has taught his company to shoot and dig in and spare their water bottles. 5. The larger society to which I here contrast the human "pock- et" may not exist according to some people, and at any rate we have no experience of it. We do not meet angels, or unfallen races. But we can get some inkling of the truth even inside our own race. Different ages and cultures can be regarded as "pockets" in relation to one another. I said, a few pages back, that different ages excelled in different virtues. If, then, you are ever tempted to think that we modern Western Europeans cannot really be so very bad because we are, comparatively speaking, humane — if, in other words, you think God might be content with us on that ground — ask yourself whether you think God ought to have been content with the cruelty of cruel ages because they excelled in courage or chastity. You will see at once that this is an impossibil- ity. From considering how the cruelty of our ancestors looks to us, you may get some inkling how our softness, worldliness, and timidity would have looked to them, and hence how both must look to God. 6. Perhaps my harping on the word "kindness" has already aroused a protest in some readers' minds. Are we not really an increasingly cruel age? Perhaps we are: but I think we have be- come so in the attempt to reduce all virtues to kindness. For Plato rightly taught that virtue is one. You cannot be kind unless you have all the other virtues. If, being cowardly, conceited and sloth- ful, you have never yet done a fellow creature great mischief, that is only because your neighbour's welfare has not yet happened to conflict with your safety, self approval, or ease. Every vice leads 37 ](Exported%20image%2020240808113911-65.png) ![THE PROBLEM OF PAIN the fault did not lie with the examiners. Again, many of us have had the experience of living in some local pocket of human so- ciety — some particular school, college, regiment or profession where the tone was bad. And inside that pocket certain actions were regarded as merely normal ("Everyone does it") and cer- tain others as impracticably virtuous and Quixotic. But when we emerged from that bad society we made the horrible discovery that in the outer world our "normal" was the kind of thing that no decent person ever dreamed of doing, and our "Quixotic" was taken for granted as the minimum standard of decency. What had seemed to us morbid and fantastic scruples so long as we were in the "pocket" now turned out to be the only moments of sanity we there enjoyed. It is wise to face the possibility that the whole human race (being a small thing in the universe) is, in fact, just such a local pocket of evil — an isolated bad school or regiment inside which minimum decency passes for heroic virtue and utter corruption for pardonable imperfection. But is there any evidence — except Christian doctrine itself that this is so? I am afraid there is. In the first place, there are those odd people among us who do not accept the local standard, who demonstrate the alarming truth that a quite different behaviour is, in fact, pos- sible. Worse still, there is the fact that these people, even when separated widely in space and time, have a suspicious knack of agreeing with one another in the main — almost as if they were in touch with some larger public opinion outside the pocket. What is common to Zarathustra, Jeremiah, Socrates, Gotama, Christy and Marcus Aurelius, is something pretty substantial. Thirdly, we find in ourselves even now a theoretical approval of this behav- iour which no one practises. Even inside the pocket we do not say that justice, mercy, fortitude, and temperance are of no value, but only that the local custom is as just, brave, temperate and merci- ful as can reasonably be expected. It begins to look as if the ne- glected school rules even inside this bad school were connected with some larger world — and that when the term ends we might find ourselves facing the public opinion of that larger world. But the worst of all is this: we cannot help seeing that only the degree of virtue which we now regard as impracticable can possibly save 27 - I mention the Incarnate God among human teachers to emphasise the fact that the principal difference between Him and them lies not in ethical teach- ing (which is here my concern) but in Person and Office 36 ](Exported%20image%2020240808113911-66.png) ![HUMAN WICKEDNESS which can be dealt with without waiting for the millennium. For corporate guilt perhaps cannot be, and certainly is not, felt with the same force as personal guilt. For most of us, as we now are, this conception is a mere excuse for evading the real issue When we have really learned to know our individual corruption, then indeed we can go on to think of the corporate guilt and can hardly think of it too much, But we must learn to walk before we run. 3. We have a strange illusion that mere time cancels sin. I have heard others, and I have heard myself, recounting cruelties and falsehoods committed in boyhood as if they were no concern of the present speaker's, and even with laughter. But mere time does nothing either to the fact or to the guilt of a sin. The guilt is washed out not by time but by repentance and the blood of Christ: if we have repented these early sins we should remember the price of our forgiveness and be humble. As for the fact of a sin, is it probable that anything cancels it? All times are eternally pre- sent to God: Is it not at least possible that along some one line of His multidimensional eternity He sees you forever in the nursery pulling the wings off a fly, forever toadying, lying, and lusting as a schoolboy, forever in that moment of cowardice or insolence as a subaltern? It may be that salvation consists not in the cancelling of these eternal moments but in the perfected humility that bears the shame forever, rejoicing in the occasion which it furnished to God's compassion and glad that it should be common knowledge to the universe. Perhaps in that eternal moment St. Peter — he will forgive me if am wrong — forever denies his Master. If so, it would indeed be true that the joys of Heaven are for most of us, in our present condition, "an acquired taste" — and certain ways of life may render the taste impossible of acquisition. Perhaps the lost are those who dare not go to such a public place. Of course I do not know that this is true; but I think the possibility is worth keeping in mind. 4. We must guard against the feeling that there is "safety in numbers". It is natural to feel that if all men are as bad as the Christians say, then badness must be very excusable. If all the boys plough in the examination, surely the papers must have been too hard? And so the masters at that school feel till they learn that there are other schools where ninety per cent of the boys passed on the same papers. Then they begin to suspect that 35 ](Exported%20image%2020240808113911-67.png) ![THE PROBLEM OF PAIN Don't be too sure that your friends think you as good as Y. The very fact that you selected him for the comparison is suspicious: he is probably head and shoulders above you and your circle. But let us suppose that Y and yourself both appear "not bad". How far Y 's appearance is deceptive, is between Y and God. His may not be deceptive: you know that yours is. Does this seem to you a mere trick, because I could say the same to Y and so to every man in turn? But that is just the point. Every man, not very holy or very arrogant, has to "live up to" the outward appearance of other men: he knows there is that within him which falls far below even his most careless public behaviour, even his loosest talk. In an in- stant of time — while your friend hesitates for a word — what things pass through your mind? We have never told the whole truth. We may confess ugly facts — the meanest cowardice or the shabbiest and most prosaic impurity — but the tone is false. The very act of confessing — an infinitesimally hypocritical glance — a dash of humour — all this contrives to dissociate the facts from your very self. No one could guess how familiar and, in a sense, congenial to your soul these things were, how much of a piece with all the rest: down there, in the dreaming inner warmth, they struck no such discordant note, were not nearly so odd and detachable from the rest of you, as they seem when they are turned into words. We imply, and often believe, that habitual vices are exceptional single acts, and make the opposite mistake about our virtues — like the bad tennis player who calls his normal form his "bad days" and mistakes his rare successes for his normal. I do not think it is our fault that we cannot tell the real truth about ourselves; the persis- tent, life-long, inner murmur of spite, jealousy, prurience, greed and self-complacence, simply will not go into words. But the im- portant thing is that we should not mistake our inevitably limited utterances for a full account of the worst that is inside. 2. A reaction — in itself wholesome — is now going on against purely private or domestic conceptions of morality, a re-awaken- ing of the social conscience. We feel ourselves to be involved in an iniquitous social system and to share a corporate guilt. This is very true: but the enemy can exploit even truths to our deception. Beware lest you are making use of the idea of corporate guilt to distract your attention from those hum-drum, old fashioned guilts of your own which have nothing to do with "the system" and 34 ](Exported%20image%2020240808113911-68.png) ![HUMAN WICKEDNESS always making impossible demands and always inexplicably an- gry. Most of us have at times felt a secret sympathy with the dying farmer who replied to the Vicar's dissertation on repentance by asking "What harm have I ever done Him?" There is the real rub. The worst we have done to God is to leave Him alone — why can't He return the compliment? Why not live and let live? What call has He, of all beings, to be "angry"? It's easy for Him to be good! Now at the moment when a man feels real guilt — moments too rare in our lives — all these blasphemies vanish away. Much, we may feel, can be excused to human infirmities: but not this — this incredibly mean and ugly action which none of our friends would have done, which even such a thorough-going little rotter as X would have been ashamed of, which we would not for the world allow to be published. At such a moment we really do know that our character, as revealed in this action, is, and ought to be, hate- ful to all good men, and, if there are powers above man, to them. A God who did not regard this with unappeasable distaste would not be a good being. We cannot even wish for such a God — it is like wishing that every nose in the universe were abolished, that smell of hay or roses or the sea should never again delight any creature, because our own breath happens to stink. When we merely say that we are bad, the "wrath" of God seems a barbarous doctrine; as soon as we Perceive our badness, it ap- pears inevitable, a mere corollary from God's goodness. To keep ever before us the insight derived from such a moment as I have been describing, to learn to detect the same real inexcusable cor- ruption under more and more of its complex disguises, is there- fore indispensable to a real understanding of the Christian faith. This is not, of course, a new doctrine. I am attempting nothing very splendid in this chapter. I am merely trying to get my reader (and, still more, myself) over a pons asinorum — to take the first step out of fools' paradise and utter illusion. But the illusion has grown, in modern times, so strong, that I must add a few considerations tending to make the reality less incredible. 1. We are deceived by looking on the outside of things. We sup- pose ourselves to be roughly not much worse than Y, whom all acknowledge for a decent sort of person, and certainly (though we should not claim it out loud) better than the abominable X. Even on the superficial level we are probably deceived about this. 33 ](Exported%20image%2020240808113911-69.png) ![THE PROBLEM OF PAIN such as "Humanitarianism" and "Sentimentality". The real trou- ble is that "kindness" is a quality fatally easy to attribute to our- selves on quite inadequate grounds. Everyone feels benevolent if nothing happens to be annoying him at the moment. Thus a man easily comes to console himself for all his other vices by a convic- tion that "his heart's in the right place" and "he wouldn't hurt a fly", though in fact he has never made the slightest sacrifice for a fellow creature. We think we are kind when we are only happy: it is not so easy, on the same grounds, to imagine oneself temperate, chaste, or humble. The second cause is the effect of Psycho-analysis on the public mind, and, in particular, the doctrine of repressions and inhibi- tions. Whatever these doctrines really mean, the impression they have actually left on most people is that the sense of Shame is a dangerous and mischievous thing. We have laboured to over- come that sense of shrinking, that desire to conceal, which either Nature herself or the tradition of almost all mankind has attached to cowardice, unchastity, falsehood, and envy. We are told to "get things out into the open", not for the sake of self humiliation, but on the ground that these "things" are very natural and we need not be ashamed of them. But unless Christianity is wholly false, the perception of ourselves which we have in moments of shame must be the only true one; and even Pagan society has usually recognised "shamelessness" as the nadir of the soul. In trying to extirpate Shame we have broken down one of the ramparts of the human spirit, madly exulting in the work as the Trojans exulted when they broke their walls and pulled the Horse into Troy. I do not know that there is anything to be done but to set about the re- building as soon as we can. It is mad work to remove hypocrisy by removing the temptation to hypocrisy: the "frankness" of people sunk below shame is a very cheap frankness. A recovery of the old sense of sin is essential to Christianity. Christ takes it for granted that men are bad. Until we really feel this assumption of His to be true, though we are part of the world He came to save, we are not part of the audience to whom His words are addressed. We lack the first condition for understanding what He is talking about. And when men attempt to be Christians without this preliminary consciousness of sin, the result is almost bound to be a certain resentment against God as to one who is 32 ](Exported%20image%2020240808113911-70.png) ![HUMAN WICKEDNESS You can have no greater sign of a confirmed pride than when you think you are humble enough. LAW. Serious Call, cap. XVI HE examples given in the last chapter went to show that love may cause pain to its object, but only on the supposi- tion that that object needs alteration to become fully lov- able. Now why do we men need so much alteration? The Chris- tian answer — that we have used our free will to become very bad — is so well known that it hardly needs to be stated. But to bring this doctrine into real life in the minds of modern men, and even of modern Christians, is very hard. When the apostles preached, they could assume even in their Pagan hearers a real consciousness of deserving the Divine anger. The Pagan mysteries existed to allay this consciousness, and the Epicurean philosophy claimed to deliver men from the fear of eternal punishment. It was against this background that the Gospel appeared as good news. It brought news of possible healing to men who knew that they were mortally ill. But all this has changed. Christianity now has to preach the diagnosis — in itself very bad news — before it can win a hearing for the cure. There are two principal causes. One is the fact that for about a hundred years we have so concentrated on one of the virtues "kindness" or mercy — that most of us do not feel anything except kindness to be really good or anything but cruelty to be really bad. Such lopsided ethical developments are not uncommon, and other ages too have had their pet virtues and curious insensibili- ties. And if one virtue must be cultivated at the expense of all the rest, none has a higher claim than mercy — for every Christian must reject with detestation that covert propaganda for cruelty which tries to drive mercy out of the world by calling it names ](Exported%20image%2020240808113911-71.png) ![THE PROBLEM OF PAIN love Him we must know Him: and if we know Him, we shall in fact fall on our faces. If we do not, that only shows that what we are trying to love is not yet God — though it may be the nearest approximation to God which our thought and fantasy can attain. Yet the call is not only to prostration and awe; it is to a reflection of the Divine life, a creaturely participation in the Divine attributes which is far beyond our present desires. We are bidden to "put on Christ", to become like God. That is, whether we like it or not, God intends to give us what we need, not what we now think we want. Once more, we are embarrassed by the intolerable compli- ment, by too much love, not too little. Yet perhaps even this view falls short of the truth. It is not sim- ply that God has arbitrarily made us such that He is our only good. Rather God is the only good of all creatures: and by neces- sity, each must find its good in that kind and degree of the fruition of God which is proper to its nature. The kind and degree may vary with the creature's nature: but that there ever could be any other good, is an atheistic dream. George Macdonald, in a pas- sage I cannot now find, represents God as saying to men "You must be strong with my strength and blessed with my blessed- ness, for I have no other to give you." That is the conclusion of the whole matter. God gives what He has, not what He has not: He gives the happiness that there is, not the happiness that is not. To be God — to be like God and to share His goodness in creaturely response — to be miserable — these are the only three alternatives. If we will not learn to eat the only food that the universe grows — the only food that any possible universe ever can grow — then we must starve eternally. 30 ](Exported%20image%2020240808113911-72.png) ![DIVINE GOODNESS we may rightly speak of the soul's search for God, and of God as receptive of the soul's love: but in the long run the soul's search for God can only be a mode, or appearance (Erscheinung) of His search for her, since all comes from Him, since the very possibil- ity of our loving is His gift to us, and since our freedom is only a freedom of better or worse response. Hence I think that nothing marks off Pagan theism from Christianity so sharply as Aristotle's doctrine that God moves the universe, Himself unmoving, as the Beloved moves a lover25. But for Christendom "Herein is love, not that we loved God but that He loved us."26 The first condition, then, of what is called a selfish love among men is lacking with God. He has no natural necessities, no pas- sion, to compete with His wish for the beloved's welfare: or if there is in Him something which we have to imagine after the analogy of a passion, a want, it is there by His own will and for our sakes. And the second condition is lacking too. The real in- terests of a child may differ from that which his father's affection instinctively demands, because the child is a separate being from the father with a nature which has its own needs and does not exist solely for the father nor find its whole perfection in being loved by him, and which the father does not fully understand. But creatures are not thus separate from their Creator, nor can He misunder- stand them. The place for which He designs them in His scheme of things is the place they are made for. When they reach it their nature is fulfilled and their happiness attained: a broken bone in the universe has been set, the anguish is over. When we want to be something other than the thing God wants us to be, we must be wanting what, in fact, will not make us happy. Those Divine de- mands which sound to our natural ears most like those of a despot and least like those of a lover, in fact marshall us where we should want to go if we knew what we wanted. He demands our worship, our obedience, our prostration. Do we suppose that they can do Him any good, or fear, like the chorus in Milton, that human ir- reverence can bring about "His glory's diminution"? A man can no more diminish God's glory by refusing to worship Him than a lunatic can put out the sun by scribbling the word "darkness" on the walls of his cell. But God wills our good, and our good is to love Him (with that responsive love proper to creatures) and to 25 - Mel Xll, 7. 26- 1 John 4: 10. 29 ](Exported%20image%2020240808113911-73.png) ![THE PROBLEM OF PAIN caused by a real or supposed good in its beloved which the lover needs and desires. But God's love, far from being caused by good ness in the object, causes all the goodness which the object has, loving it first into existence and then into real, though derivative, loveability. God is Goodness. He can give good, but cannot need or get it. In that sense all His love is, as it were, bottomlessly selfless by very definition; it has rything to give and nothing to receive. Hence, if God some- eve times speaks as though the Impassible could suffer passion and eternal fullness could be in want, and in want of those beings on whom it bestows all from their bare existence upwards, this can mean only, if it means anything intelligible by us, that God of mere miracle has made Himself able so to hunger and created in Him- self that which we can satisfy. If He requires us, the requirement is of His own choosing. If the immutable heart can be grieved by the puppets of its own making, it is Divine Omnipotence; no other, that has so subjected it, freely, and in a humility that passes un- derstanding. If the world exists not chiefly that we may love God but that God may love us, yet that very fact, on a deeper level, is so for our sakes. If He who in Himself can lack nothing chooses to need us, it is because we need to be needed. Before and behind all the relations of God to man, as we now learn them from Christian- ity, yawns the abyss of a Divine act of pure giving — the election of man, from nonentity, to be the beloved of God, and therefore (in some sense) the needed and desired of God, who but for that act needs and desires nothing, since He eternally has, and is, all goodness. And that act is for our sakes. It is good for us to know love; and best for us to know the love of the best object, God. But to know it as a love in which we were primarily the wooers and God the wooed, in which we sought and He was found, in which His, conformity to our needs, not ours to His, came first, would be to know it in a form false to the very nature of things. For we are only creatures: our röle must always be that of patient to agent, female to male, mirror to light, echo to voice. Our highest activity must be response, not initiative. To experience the love of God in a true, and not an illusory form, is therefore to experience it as our surrender to His demand, our conformity to His desire: to expe- rience it in the opposite way is, as it were, a solecism against the grammar of being. I do not deny, of course, that on a certain level 28 ](Exported%20image%2020240808113911-74.png) ![DIVINE GOODNESS I plainly foresee that the course of my argument may provoke a protest. I had promised that in coming to understand the Divine goodness we should not be asked to accept a mere reversal of our own ethics. But it may be objected that a reversal is precisely what we have been asked to accept. The kind of love which I attribute to God, it may be said, is just the kind which in human beings we describe as "selfish" or "possessive", and contrast unfavourably with another kind which seeks first the happiness of the beloved and not the contentment of the lover. I am not sure that this is quite how I feel even about human love. I do not think I should value much the love of a friend who cared only for my happiness and did not object to my becoming dishonest. Nevertheless, the protest is welcome, and the answer to it will put the subject in a new light, and correct what has been one-sided in our discussion. The truth is that this antithesis between egoistic and altruistic love cannot be unambiguously applied to the love of God for His creatures. Clashes of interest, and therefore opportunities either of selfishness or unselfishness, occur only between beings inhabit- ing a common world: God can no more be in competition with a creature than Shakespeare can be in competition with Viola. When God becomes a Man and lives as a creature among His own creatures in Palestine, then indeed His life is one of supreme self-sacrifice and leads to Calvary. A modern pantheistic philoso- pher has said, "When the Absolute falls into the sea it becomes a fish"; in the same way, we Christians can point to the Incarnation and say that when God empties Himself of His glory and submits to those conditions under which alone egoism and altruism have a clear meaning, He is seen to be wholly altruistic. But God in His transcendence — God as the unconditioned ground of all condi- tions cannot easily be thought of in the same way. We call human love selfish when it satisfies its own needs at the expense of the object's needs — as when a father keeps at home, because he can- not bear to relinquish their society, children who ought, in their own interests, to be put out into the world. The situation implies a need or passion on the part of the lover, an incompatible need on the part of the beloved, and the lover's disregard or culpable ig- norance of the beloved's need. None of these conditions is present in the relation of God to man. God has no needs. Human love, as Plato teaches us, is the child of Poverty — of a want or lack; it is 27 ](Exported%20image%2020240808113911-75.png) ![THE PROBLEM OF PAIN beyond our deserts but also, except in rare moments of grace, beyond our desiring; we are inclined, like the maidens in the old play, to deprecate the love of Zeus.20 But the fact seems unques- tionable. The Impassible speaks as if it suffered passion, and that which contains in Itself the cause of its own and all other bliss talks as though it could be in want and yearning. "Is Ephraim my dear son? is he a pleasant child? for since I spake against him I do ear- nestly remember him still: therefore my bowels are troubled for him. "21 "How shall I give thee up, Ephraim? How shall I abandon thee, Israel? Mine heart is turned within me."22 Oh Jerusalem, how often would I have gathered thy children together, even as a hen gathereth her chickens under her wings, and ye would not. The problem of reconciling human suffering with the existence of a God who loves, is only insoluble so long as we attach a trivial meaning to the word "love", and look on things as if man were the centre of them. Man is not the centre. God does not exist for the sake of man. Man does not exist for his own sake. "Thou hast created all things, and for thy pleasure they are and were created. "24 We were made not primarily that we may love God (though we were made for that too) but that God may love us, that we may become objects in which the Divine love may rest "well pleased". To ask that God's love should be content with us as we are is to ask that God should cease to be God: because He is what He is, His love must, in the nature of things, be impeded and repelled, by certain stains in our present character, and be- cause He already loves us He must labour to make us lovable. We cannot even wish, in our better moments, that He could reconcile Himself to our present impurities — no more than the beggar maid could wish that King Cophetua should be content with her rags and dirt, or a dog, once having learned to love man, could wish that man were such as to tolerate in his house the snapping, verminous, polluting creature of the wild pack. What we would here and now call our "happiness" is not the end God chiefly has in view: but when we are such as He can love without impedi- ment, we shall in fact be happy. 20 - Prometheus Vinctus, 887-900. -Jeremiah 31: 20. 21 22 - Hosea Il: 8. 23 - Matthew 23: 37. 24 - Revelation 4: ll. 26 ](Exported%20image%2020240808113911-76.png) ![DIVINE GOODNESS bride the waif whom Her lover found abandoned by the wayside, and clothed and adorned and made lovely and yet she betrayed Him.17 "Adulteresses" St. James calls us, because we turn aside to the "friendship of the world", while God "Jealously longs for the spirit He has implanted in us" 18 The Church is the Lord's bride whom He so loves that in her no spot or wrinkle is endurable.19 For the truth which this analogy serves to emphasise is that Love, in its own nature, demands the perfecting of the beloved; that the mere "kindness" which tolerates anything except suffering in its object is, in that respect, at the opposite pole from Love. When we fall in love with a woman, do we cease to care whether she is clean or dirty, fair or foul? Do we not rather then first begin to care? Does any woman regard it as a sign of love in a man that he neither knows nor cares how she is looking? Love may, indeed, love the beloved when her beauty is lost: but not because it is lost. Love may forgive all infirmities and love still in spite of them: but Love cannot cease to will their removal. Love is more sensitive than hatred itself to every blemish in the beloved; his "feeling is more soft and sensible than are the tender horns of cockled snails". Of all powers he forgives most; but he condones least: he is pleased with little, but demands all. When Christianity says that God loves man, it means that God loves man: not that He has some "disinterested", because really indifferent, concern for our welfare, but that, in awful and surpris- ing truth, we are the objects of His love. You asked for a loving God: you have one. The great spirit you so lightly invoked, the "lord of terrible aspect", is present: not a senile benevolence that drowsily wishes you to be happy in your own way, not the cold philanthropy of a conscientious magistrate, nor the care of a host who feels responsible for the comfort of his guests, but the con- suming fire Himself, the Love that made the worlds, persistent as the artist's love for his work and despotic as a man's love for a dog, provident and venerable as a father's love for a child, jealous, inexorable, exacting as love between the sexes. How this should be, I do not know: it passes reason to explain why any creatures, not to say creatures such as we, should have a value so prodigious in their Creator's eyes. It is certainly a burden of glory not only 17 - Ezekiel 16: 6-15. 18 -James 4:4, 5. Authorised Version mistranslates. 19 - Ephesians 5: 27. 25 ](Exported%20image%2020240808113911-77.png) ![THE PROBLEM OF PAIN does not house-train the earwig or give baths to centipedes. We may wish, indeed, that we were of so little account to God that He left us alone to follow our natural impulses — that He would give over trying to train us into something so unlike our natural selves: but once again, we are asking not for more Love, but for less. A nobler analogy, sanctioned by the constant tenor of Our Lord's teaching, is that between God's love for man and a father's love for a son. Whenever this is used, however (that is, whenever we pray the Lord's Prayer), it must be remembered that the Sav- iour used it in a time and place where paternal authority stood much higher than it does in modern England. A father half apolo- getic for having brought his son into the world, afraid to restrain him lest he should create inhibitions or even to instruct him lest he should interfere with his independence of mind, is a most mislead- ing symbol of the Divine Fatherhood. I am not here discussing whether the authority of fathers, in its ancient extent, was a good thing or a bad thing: I am only explaining what the conception of Fatherhood would have meant to Our Lord's first hearers, and indeed to their successors for many centuries. And it will become even plainer if we consider how Our Lord (though, in our belief, one with His Father and co-eternal with Him as no earthly son is with an earthly father) regards His own Sonship, surrendering His will wholly to the paternal will and not even allowing Himself to be called "good" because Good is the name of the Father. Love between father and son, in this symbol, means essentially authori- tative love on the one side, and obedient love on the other. The father uses his authority to make the son into the sort of human being he, rightly, and in his superior wisdom, wants him to be. Even in our own days, though a man might say, he could mean nothing by saying, "1 love my son but don't care how great a blackguard he is provided he has a good time." Finally we come to an analogy full of danger, and of much more limited application, which happens, nevertheless, to be the most useful for our special purpose at the moment — I mean, the anal- ogy between God's love for man and a man's love for a wom- an. It is freely used in Scripture. Israel is a false wife, but Her heavenly Husband cannot forget the happier days; "1 remember thee, the kindness of thy youth, the love of thy espousals, when thou wentest after Me in the wilderness. "16 Israel is the pauper 16 -Jeremiah 2: 2. 24 ](Exported%20image%2020240808113911-78.png) ![DIVINE GOODNESS a child — he will take endless trouble — and would, doubtless, thereby give endless trouble to the picture if it were sentient. One can imagine a sentient picture, after being rubbed and scraped and re-commenced for the tenth time, wishing that it were only a thumb-nail sketch whose making was over in a minute. In the same way, it is natural for us to wish that God had designed for us a less glorious and less arduous destiny; but then we are wishing not for more love but for less. Another type is the love of a man for a beast — a relation con- stantly used in Scripture to symbolise the relation between God and men; "we are his people and the sheep of his pasture". This is in some ways a better analogy than the preceding, because the in- ferior party is sentient, and yet unmistakably inferior: but it is less good in so far as man has not made the beast and does not fully understand it. Its great merit lies in the fact that the association of (say) man and dog is primarily for the man's sake: he tames the dog primarily that he may love it, not that it may love him, and that it may serve him, not that he may serve it. Yet at the same time, the dog's interests are not sacrificed to the man's. The one end (that he may love it) cannot be fully attained unless it also, in its fashion, loves him, nor can it serve him unless he, in a different fashion, serves it. Now just because the dog is by human standards one of the "best" of irrational creatures, and a proper object for a man to love — of course, with that degree and kind of love which is proper to such an object, and not with silly anthropomorphic ex- aggerations — man interferes with the dog and makes it more lov- able than it was in mere nature. In its state of nature it has a smell, and habits which frustrate man's love: he washes it, house-trains it, teaches it not to steal; and is so enabled to love it completely. To the puppy the whole proceeding would seem, if it were a theo- logian, to cast grave doubts on the "goodness" of man: but the full-grown and full-trained dog, larger, healthier, and longer-lived than the wild dog, and admitted, as it were by Grace, to a whole world of affections, loyalties, interests, and comforts entirely be- yond its animal destiny, would have no such doubts. It will be noted that the man (I am speaking throughout of the good man) takes all these pains with the dog, and gives all these pains to the dog, only because it is an animal high in the scale because it is so nearly lovable that it is worth his while to make it fully lovable. He 23 ](Exported%20image%2020240808113911-79.png) ![THE PROBLEM OF PAIN condemned us, He has never regarded us with contempt. He has paid us the intolerable compliment of loving us, in the deepest, most tragic, most memorable sense. The relation between Creator and creature is, of course, unique, and cannot be paralleled by any relations between one creature and another. God is both further from us, and nearer to us, than any other being. He is further from us because the sheer difference between that which has Its principle of being in Itself and that to which being is communicated, is one compared with which the difference between an archangel and a worm is quite insignificant. He makes, we are made: He is original, we derivative. But at the same time, and for the same reason, the intimacy between God and even the meanest creature is closer than any that creatures can attain with one another. Our life is, at every moment, supplied by Him: our tiny, miraculous power of free will only operates on bodies which His continual energy keeps in existence — our very power to think is His power communicated to us. Such a unique relation can be apprehended only by analogies: from the various types of love known among creatures we reach an inadequate, but useful, conception of God's love for man. The lowest type, and one which is "love" at all only by an exten- sion of the word, is that which an artist feels for an artefact. God's relation to man is pictured thus in Jeremiah's vision of the potter and the clayli, or when St. Peter speaks of the whole Church as a building on which God is at work, and of the individual members as stones.15 The limitation of such an analogy is, of course, that in the symbol the patient is not sentient, and that certain questions of justice and mercy which arise when the "stones" are really "liv- ing" therefore remain unrepresented. But it is an important anal- ogy so far as it goes. We are, not metaphorically but in very truth, a Divine work of art, something that God is making, and therefore something with which He will not be satisfied until it has a certain character. Here again we come up against what I have called the "intolerable compliment". Over a sketch made idly to amuse a child, an artist may not take much trouble: he may be content to let it go even though it is not exactly as he meant it to be. But over the great picture of his life — the work which he loves, though in a different fashion, as intensely as a man loves a woman or a mother 14 -Jeremiah 18. 15 - IPeter 2: 5. 22 ](Exported%20image%2020240808113911-80.png) ![DIVINE GOODNESS are open to criticism. By the goodness of God we mean nowadays almost exclusively His lovingness; and in this we may be right. And by Love, in this context, most of us mean kindness — the desire to see others than the self happy; not happy in this way or in that, but just happy. What would really satisfy us would be a God who said of anything we happened to like doing, "What does it matter so long as they are contented?" We want, in fact, not so much a Father in Heaven as a grandfather in heaven — a senile benevolence who, as they say, "liked to see young people enjoying themselves" and whose plan for the universe was simply that it might be truly said at the end of each day, "a good time was had by all". Not many people, I admit, would formulate a theology in precisely those terms: but a conception not very different lurks at the back of many minds. I do not claim to be an exception: I should very much like to live in a universe which was governed on such lines. But since it is abundantly clear that I don't, and since I have reason to believe, nevertheless; that God is Love, I conclude that my conception of love needs correction. I might, indeed, have learned, even from the poets, that Love is something more stern and splendid than mere kindness: that even the love between the sexes is, as in Dante, "a lord of terrible aspect". There is kindness in Love: but Love and kindness are not coterminous, and when kindness (in the sense given above) is separated from the other elements of Love, it involves a certain fundamental indifference to its object, and even something like contempt of it. Kindness consents very readily to the removal of its object — we have all met people whose kindness to animals is constantly leading them to kill animals lest they should suffer. Kindness, merely as such, cares not whether its object becomes good or bad, provided only that it escapes suffering. As Scrip- ture points out, it is bastards who are spoiled: the legitimate sons, who are to carry on the family tradition, are punished.13 It is for people whom we care nothing about that we demand happiness on any terms: with our friends, our lovers, our children, we are exacting and would rather see them suffer much than be happy in contemptible and estranging modes. If God is Love, He is, by definition, something more than mere kindness. And it appears, from all the records, that though He has often rebuked us and 13 - Hebrew 12: 8. 21 ](Exported%20image%2020240808113911-81.png) ![THE PROBLEM OF PAIN of young men (none of them, by the way, Christians) who were sufficiently close to me in intellect and imagination to secure im- mediate intimacy, but who knew, and tried to obey, the moral law. Thus their judgement of good and evil was very different from mine. Now what happens in such a case is not in the least like being asked to treat as "white" what was hitherto called black. The new moral judgements never enter the mind as mere rever- sals (though they do reverse them) of previous judgements but "as lords that are certainly expected". You can have no doubt in which direction you are moving: they are more like good than the little shreds of good you already had, but are, in a sense, continu- ous with them. But the great test is that the recognition of the new standards is accompanied with the sense of shame and guilt: one is conscious of having blundered into society that one is unfit for. It is in the light of such experiences that we must consider the goodness of God. Beyond all doubt, His idea of "goodness" differs from ours; but you need have no fear that, as you approach it, you will be asked simply to reverse your moral standards: When the relevant difference between the Divine ethics and your own ap- pears to you, you will not, in fact, be in any doubt that the change demanded of you is in the direction you already call "better". Divine "goodness" differs from ours, but it is not sheerly differ- ent: it differs from ours not as white from black but as a perfect circle from a child's first attempt to draw a wheel. But when the child has learned to draw, it will know that the circle it then makes is what it was trying to make from the very beginning. This doctrine is presupposed in Scripture. Christ calls men to re- pent — a call which would be meaningless if God's standard were sheerly different from that which they already knew and failed to practise. He appeals to our existing moral judgement "YVhy even of yourselves judge ye not what is right? "11 God in the Old Testa- ment expostulates with men on the basis of their own conceptions of gratitude, fidelity, and fair play: and puts Himself, as it were, at the bar before His own creatures-" What iniquity have your fathers found in me; that they are gone far from me?" 12 After these preliminaries it will, I hope, be safe to suggest that some conceptions of the Divine goodness which tend to domi- nate our thought, though seldom expressed in so many words, 11 -Luke 12: 57. 12 -Jeremiah 2: 5. 20 ](Exported%20image%2020240808113911-82.png) ![111 DIVINE GOODNESS Love can forbear, and Love can forgive... but Love can never be reconciled to an unlovely object... He can never therefore be rec- onciled to your sin, because sin itself is incapable of being altered; but He may be reconciled to your person, because that may be restored. TRAHERNE. Centuries of Meditation, Il, 30. NY consideration of the goodness of God at once threat- ens us with the following dilemma. On the one hand, if God is wiser than we His judgement must differ from ours on many things, and not least on good and evil. What seems to us good may therefore not be good in His eyes, and what seems to us evil may not be evil. On the other hand, if God's moral judgement differs from ours so that our "black" may be His "white", we can mean nothing by calling Him good; for to say "God is good," while asserting that His goodness is wholly other than ours, is really only to say "God is we know not what". And an utterly unknown quality in God cannot give us moral grounds for loving or obeying Him. If He is not (in our sense) "good" we shall obey, if at all, only through fear — and should be equally ready to obey an omnipo- tent Fiend. The doctrine of Total Depravity — when the conse- quence is drawn that, since we are totally depraved, our idea of good is worth simply nothing — may thus turn Christianity into a form of devil-worship. The escape from this dilemma depends on observing what hap- pens, in human relations, when the man of inferior moral stand- ards enters the society of those who are better and wiser than he and gradually learns to accept their standards — a process which, as it happens, I can describe fairly accurately, since I have un- dergone it. When I came first to the University I was as nearly without a moral conscience as a boy could be. Some faint distaste for cruelty and for meanness about money was my utmost reach — of chastity, truthfulness, and self sacrifice I thought as a baboon thinks of classical music. By the mercy of God I fell among a set ](Exported%20image%2020240808113911-83.png) ![ceiving a suffering world, and being assured, on quite different grounds, that God is good, we are to conceive that goodness and that suffering without contradiction! ](Exported%20image%2020240808113911-84.png) ![DIVINE OMNIPOTENCE they really are, only Omniscience has the data and the wisdom to see: but they are not likely to be less complicated than I have suggested. Needless to say, "complicated" here refers solely to the human understanding of them; we are not to think of God argu- ing, as we do, from an end (co-existence of free spirits) to the con- ditions involved in it, but rather of a single, utterly self-consistent act of creation which to us appears, at first sight, as the creation of many independent things, and then, as the creation of things mu- tually necessary. Even we can rise a little beyond the conception of mutual necessities as I have outlined it — can reduce matter as that which separates souls and matter as that which brings them together under the single concept of Plurality, whereof "separa- tion" and "togetherness" are only two aspects. With every advance in our thought the unity of the creative act, and the impossibility of tinkering with the creation as though this or that element of it could have been removed, will become more apparent. Perhaps this is not the "best of all possible" universes, but the only possible one. Possible worlds can mean only "worlds that God could have made, but didn't". The idea of that which God "could have" done involves a too anthropomorphic conception of God's freedom. Whatever human freedom means, Divine freedom cannot mean indeterminacy between alternatives and choice of one of them. Perfect goodness can never debate about the end to be attained, and perfect wisdom cannot debate about the means most suited to achieve it. The freedom of God consists in the fact that no cause other than Himself produces His acts and no external obstacle im- pedes them that His own goodness is the root from which they all grow and His own omnipotence the air in which they all flower. And that brings us to our next subject — the Divine goodness. Nothing so far has been said of this, and no answer attempted to the objection that if the universe must, from the outset, admit the possibility of suffering, then absolute goodness would have left better than not to create: I am aware of no human scales in which such a portentous question can be weighed. Some comparison between one state of being and another can be made, but the at- tempt to compare being and not being ends in mere words. "It would be better for me not to exist" — in what sense "for me"? How should I, if I did not exist, profit by not existing? Our design is a less formidable one: it is only to discover how, per- ](Exported%20image%2020240808113911-85.png) ![THE PROBLEM OF PAIN to actual hostility, they can then exploit the fixed nature of mat- ter to hurt one another. The permanent nature of wood which enables us to use it as a beam also enables us to use it for hitting our neighbour on the head. The permanent nature of matter in general means that when human beings fight, the victory ordinar- ily goes to those who have superior weapons, skill, and numbers, even if their cause is unjust. We can, perhaps, conceive of a world in which God corrected the results of this abuse of free-will by His creatures at every mo- ment: so that a wooden beam became soft as grass when it was used as a weapon, and the air refused to obey me if I attempted to set up in it the sound waves that carry lies or insults. But such a world would be one in which wrong actions were impossible, and in which, therefore, freedom of the will would be void; nay, if the principle were carried out to its logical conclusion, evil thoughts would be impossible, for the cerebral matter which we use in thinking would refuse its task when we attempted to frame them. All matter in the neighbourhood of a wicked man would be liable to undergo unpredictable alterations. That God can and does, on occasions, modify the behaviour of matter and produce what we call miracles, is part of the Christian faith; but the very conception of a common, and therefore, stable, world, demands that these occasions should be extremely rare. In a game of chess you can make certain arbitrary concessions to your opponent, which stand to the ordinary rules of the game as miracles stand to the laws of nature. You can deprive yourself of a castle, or allow the other man sometimes to take back a move made inadvertently. But if you conceded everything that at any moment happened to suit him — if all his moves were revocable and if all your pieces disap- peared whenever their position on the board was not to his lik- ing — then you could not have a game at all. So it is with the life of souls in a world: fixed laws, consequences unfolding by causal necessity, the whole natural order, are at once the limits within which their common life is confined and also the sole condition under which any such life is possible. Try to exclude the possibil- ity of suffering which the order of nature and the existence of free-wills involve, and you find that you have excluded life itself. As I said before, this account of the intrinsic necessities of a world is meant merely as a specimen of what they might be. What 16 ](Exported%20image%2020240808113911-86.png) ![DIVINE OMNIPOTENCE "trees for his sake would crowd into a shade". But if you were introduced into a world which thus varied at my every whim, you would be quite unable to act in it and would thus lose the exercise of your free will. Nor is it clear that you could make your presence known to me — all the matter by which you attempted to make signs to me being already in my control and therefore not capable of being manipulated by you. Again, if matter has a fixed nature and obeys constant laws, not all states of matter will be equally, agreeable to the wishes of a given soul, nor all equally beneficial for that particular aggregate of matter which he calls his body. If fire comforts that body at a certain distance, it will destroy it when the distance is reduced. Hence, even in a perfect world, the necessity for those danger sig- nals which the pain-fibres in our nerves are apparently designed to transmit. Does this mean an inevitable element of evil (in the form of pain) in any possible world? I think not: for while it may be true that the least sin is an incalculable evil, the evil of pain depends on degree, and pains below a certain intensity are not feared or resented at all. No one minds the process "warm — beau- tifully hot — too hot — it stings" which warns him to withdraw his hand from exposure to the fire: and, if I may trust my own feeling, a slight aching in the legs as we climb into bed after a good day's walking is, in fact, pleasurable. Yet again, if the fixed nature of matter prevents it from being always, and in all its dispositions, equally agreeable even to a sin- gle soul, much less is it possible for the matter of the universe at any moment to be distributed so that it is equally convenient and pleasurable to each member of a society. If a man travelling in one direction is having a journey down hill, a man going in the opposite direction must be going up hill. If even a pebble lies where I want it to lie, it cannot, except by a coincidence, be where you want it to lie. And this is very far from being an evil: on the contrary, it furnishes occasion for all those acts of courtesy, respect, and unselfishness by which love and good humour and modesty express themselves. But it certainly leaves the way open to a great evil, that of competition and hostility. And if souls are free, they cannot be prevented from dealing with the problem by competition instead of by courtesy. And once they have advanced 15 ](Exported%20image%2020240808113911-87.png) ![THE PROBLEM OF PAIN tempt to imagine such a meeting between disembodied spirits usu- ally slips in surreptitiously the idea of, at least, a common space and common time, to give the co-in co-existence a meaning: and space and time are already an environment. But more than this is required. If your thoughts and passions were directly present to me, like my own, without any mark of externality or otherness, how should I distinguish them from mine? And what thoughts or passions could we begin to have without objects to think and feel about? Nay, could I even begin to have the conception of "external" and "other" unless I had experience of an "external world"? You may reply, as a Christian, that God (and Satan) do, in fact, affect my consciousness in this direct way without signs of "externality". Yes: and the result is that most people remain ignorant of the existence of both. We may therefore suppose that if human souls affected one another directly and immateriality, it would be a rare triumph of faith and insight for any one of them to believe in the existence of the others. It would be harder for me to know my neighbour under such conditions than it now is for me to know God: for in recognising the impact of God upon me I am now helped by things that reach me through the external world, such as the tradition of the Church, Holy Scripture, and the conversation of religious friends. What we need for human society is exactly what we have — a neutral something, neither you nor I, which we can both manipulate so as to make signs to each other. I can talk to you because we can both set up sound-waves in the common air between us. Matter, which keeps souls apart, also brings them together. It enables each of us to have an "outside" as well as an "inside", so that what are acts of will and thought for you are noises and glances for me; you are enabled not only to be, but to appear. and hence I have the pleasure of making your acquaintance. Society, then, implies a common field or "world" in which its members meet. If there is an angelic society, as Christians have usually believed, then the angels also must have such a world or field; something which is to them as "matter" (in the modern, not the scholastic, sense) is to us. But if matter is to serve as a neutral field it must have a fixed nature of its own. If a "world" or material system had only a sin- gle inhabitant it might conform at every moment to his wishes 14 ](Exported%20image%2020240808113911-88.png) ![DIVINE OMNIPOTENCE to be regarded less as an assertion of what they are than a sample of what they might be like. The inexorable "laws of Nature" which operate in defiance of human suffering or desert, which are not turned aside by prayer, seem, at first sight to furnish a strong argument against the good- ness and power of God. I am going to submit that not even Om- nipotence could create a society of free souls without at the same time creating a relatively independent and "inexorable" Nature. There is no reason to suppose that self-consciousness, the recog- nition of a creature by itself as a "self", can exist except in contrast with an "other", a something which is not the self. It is against an environment, and preferably a social environment, an environ- ment of other selves, that the awareness of Myself stands out. This would raise a difficulty about the consciousness of God if we were mere theists: being Christians, we learn from the doctrine of the Blessed Trinity that something analogous to "society" exists within the Divine being from all eternity — that God is Love, not merely in the sense of being the Platonic form of love, but because, within Him, the concrete reciprocities of love exist before all worlds and are thence derived to the creatures. Again, the freedom of a creature must mean freedom to choose: and choice implies the existence of things to choose between. A creature with no environment would have no choices to make: so that freedom, like self-consciousness (if they are not, indeed, the same thing) again demands the presence to the self of something other than the self. The minimum condition of self-consciousness and freedom, then, would be that the creature should apprehend God and, there- fore, itself as distinct from God. It is possible that such creatures exist, aware of God and themselves, but of no fellow-creatures. If so, their freedom is simply that of making a single naked choice of loving God more than the self or the self more than God. But a life so reduced to essentials is not imaginable to us. As soon as we attempt to introduce the mutual knowledge of fellow-creatures we run up against the necessity of "Nature". People often talk as if nothing were easier than for two naked minds to "meet" or become aware of each other. But I see no possibility of their doing so except in a common medium which forms their "external world" or environment. Even our vague at- 13 ](Exported%20image%2020240808113911-89.png) ![THE PROBLEM OF PAIN any rate, impossible to see the street so long as I remain where I am and the intervening building remains where it is." Someone might add "unless the nature of space, or of vision, were different from what it is". I do not know what the best philosophers and sci- entists would say to this, but I should have to reply "I don't know whether space and vision could possibly have been of such a nature as you suggest". Now it is clear that the words could possibly here refer to some absolute kind of possibility or impossibility which is different from the relative possibilities and impossibilities we have been considering. I cannot say whether seeing round cor- ners is, in this new sense, possible or not, because I do not know whether it is selfcontradictory or not. But I know very well that if it is self-contradictory it is absolutely impossible. The absolutely impossible may also be called the intrinsically impossible because it carries its impossibility within itself, instead of borrowing it from other impossibilities which in their turn depend upon others. It has no unless clause attached to it. It is impossible under all condi- tions and in all worlds and for all agents. "All agents" here includes God Himself. His Omnipotence means power to do all that is intrinsically possible, not to do the intrinsically impossible. You may attribute miracles to Him, but not nonsense. This is no limit to His power. If you choose to say "God can give a creature free-will and at the same time withhold free-will from it," you have not succeeded in saying anything about God: meaningless combinations of words do not suddenly acquire meaning simply because we prefix to them the two other words "God can". It remains true that all things are possible with God: the intrinsic impossibilities are not things but nonentities. It is no more possible for God than for the weakest of His creatures to carry out both of two mutually exclusive alternatives; not because His power meets an obstacle, but because nonsense remains non- sense even when we talk it about God. It should, however, be remembered that human reasoners often make mistakes, either by arguing from false data or by inadvert- ence in the argument itself. We may thus come to think things possible which are really impossible, and vice versa.10 We ought, therefore, to use great caution in defining those intrinsic impossi- bilities which even Omnipotence cannot perform. What follows is 10 - E.g., every good conjuring trick does something which to the audience with their data and their power of reasoning, seems self contradictory. 12 ](Exported%20image%2020240808113911-90.png) ![11 DIVINE OMNIPOTENCE Nothing which implies contradiction falls under the omnipotence of God. THOMAS AQUINAS. Summ. TheoL, la XXV, Art. 4. F God were good, He would wish to make His creatures per- fectly happy, and if God were almighty He would be able to do what He wished. But the creatures are not happy. There- fore God lacks either goodness, or power, or both." This is the problem of pain, in its simplest form. The possibility of answer- ing it depends on showing that the terms "good" and "almighty"; and perhaps also the term "happy" are equivocal: for it must he admitted from the outset that if the popular meanings attached to these words are the best, or the only possible, meanings, then the argument is unanswerable In this chapter I shall make some com- ments on the idea of Omnipotence, and, in the following, some on the idea of Goodness. Omnipotence means "power to do all, or everything"9. And we are told in Scripture that "with God all things are possible". It is common enough in argument with an unbeliever, to be told that God, if He existed and were good, would do this or that; and then, if we point out that the proposed action is impossible, to be met with the retort, "But I thought God was supposed to be able to do anything". This raises the whole question of impossibility. In ordinary usage the word impossible generally implies a sup- pressed clause beginning with the word unless. Thus it is impos- Sible for me to see the street from where I sit writing at this mo- ment; that is, it is impossible to see the street unless I go up to the top floor where I shall be high enough to overlook the intervening building. If I had broken my leg I should say "But it is impossible to go up to the top floor" — meaning, however, that it is impos- Sible unless some friends turn up who will carry me. Now let us advance to a different plane of impossibility, by saying "It is, at 9 - The original meaning in Latin may have been "power over or in alt', I give what I take to be current sense. ](Exported%20image%2020240808113911-91.png) ![ТН Е PROBLEM OF PAIN 10 ](Exported%20image%2020240808113911-92.png) ![INTRODUCTORY Why this assurance seems to me good, I have more or less in- dicated. It does not amount to logical compulsion. At every stage of religious development man may rebel, if not without violence to his own nature, yet without absurdity. He can close his spiritual eyes against the Numinous, if he is prepared to part company with half the great poets and prophets of his race, with his own childhood, with the richness and depth of uninhibited experience. He can regard the moral law as an illusion, and so cut himself off from the common ground of humanity. He can refuse to identify the Numinous with the righteous, and remain a barbarian, wor- shipping sexuality, or the dead, or the life-force, or the future. But the cost is heavy. And when we come to the last step of all, the historical Incarnation, the assurance is strongest of all. The story is strangely like many myths which have haunted religion from the first, and yet it is not like them. It is not transparent to the reason: we could not have invented it ourselves. It has not the suspicious a priori lucidity of Pantheism or of Newtonian physics. It has the seemingly arbitrary and idiosyncratic character which modern science is slowly teaching us to put up with in this wilful universe, where energy is made up in little parcels of a quantity no one could predict, where speed is not unlimited, where irrevers- ible entropy gives time a real direction and the cosmos, no longer static or cyclic, moves like a drama from a real beginning to a real end. If any message from the core of reality ever were to reach us, we should expect to find in it just that unexpectedness, that wilful, dramatic anfractuosity which we find in the Christian faith. It has the master touch — the rough, male taste of reality, not made by us, or, indeed, for us, but hitting us in the face. If, on such grounds, or on better ones, we follow the course on which humanity has been led, and become Christians, we then have the "problem" of pain. 9 ](Exported%20image%2020240808113911-93.png) ![THE PROBLEM OF PAIN moralism. Judged by its fruits, this step is a step towards increased health. And though logic does not compel us to take it, it is very hard to resist — even on Paganism and Pantheism morality is al- ways breaking in, and even Stoicism finds itself willynilly bowing the knee to God. Once more, it may be madness — a madness congenital to man and oddly fortunate in its results — or it may be revelation. And if revelation, then it is most really and truly in Abraham that all peoples shall be blessed, for it was the Jews who fully and unambiguously identified the awful Presence haunting black mountain-tops and thunderclouds with "the righteous Lord" who "loveth righteousness"8 The fourth strand or element is a historical event. 'There was a man born among these Jews who claimed to be, or to be the son of, or to be "one with", the Something which is at once the aw- ful haunter of nature and the giver of the moral law. The claim is so shocking — a paradox, and even a horror, which we may eas- ily be lulled into taking too lightly — that only two views of this man are possible. Either he was a raving lunatic of an unusually abominable type, or else He was; and is; precisely what He said. There is no middle way. If the records make the first hypothesis unacceptable, you must submit to the second. And if you do that, all else that is claimed by Christians becomes credible — that this Man; having been killed, was yet alive, and that His death, in some manner incomprehensible to human thought, has effected a real change in our relations to the "awful" and "righteous" Lord, and a change in our favour. To ask whether the universe as we see it looks more like the work of a wise and good Creator or the work of chance, indiffer- ence, or malevolence, is to omit from the outset all the relevant factors in the religious problem. Christianity is not the conclusion of a philosophical debate on the origins of the universe: it is a catastrophic historical event following on the long spiritual prepa- ration of humanity which I have described. It is not a system into which we have to fit the awkward fact of pain: it is itself one of the awkward facts which have to be fitted into any system we make. In a sense, it creates, rather than solves, the problem of pain, for pain would be no problem unless, side by side with our daily ex- perience of this painful world, we had received what we think a good assurance that ultimate reality is righteous and loving. 8 - Psalm Il: 8. 8 ](Exported%20image%2020240808113911-94.png) ![INTRODUCTORY ignored. The moralities accepted among men may differ — though not, at bottom, so widely as is often claimed but they all agree in prescribing a behaviour which their adherents fail to practise. All men alike stand condemned, not by alien codes of ethics, but by their own, and all men therefore are conscious of guilt. The second element in religion is the consciousness not merely of a moral law, but of a moral law at once approved and disobeyed. This consciousness is neither a logical, nor an illogical, inference from the facts of experience; if we did not bring it to our experi- ence we could not find it there. It is either inexplicable illusion, or else revelation. The moral experience and the numinous experience are so far from being the same that they may exist for quite long periods without establishing a mutual contact. In many forms of Paganism the worship of the gods and the ethical discussions of the philoso- phers have very little to do with each other. The third stage in religious development arises when men identify them — when the Numinous Power to which they feel awe is made the guardian of the morality to which they feel obligation. Once again, this may seem to you very "natural". What can be more natural than for a savage haunted at once by awe and by guilt to think that the power which awes him is also the authority which condemns his guilt? And it is, indeed, natural to humanity. But it is not in the least obvious. The actual behaviour of that universe which the Numinous haunts bears no resemblance to the behaviour which morality demands of us. The one seems wasteful, ruthless, and unjust; the other enjoins upon us the opposite qualities. Nor can the identification of the two be explained as a wish-fulfilment, for it fulfils no one's wishes. We desire nothing less than to see that Law whose naked authority is already unsupportable armed with the incalculable claims of the Numinous. Of all the jumps, that humanity takes in its religious history this is certainly the most surprising. It is not unnatural that many sections of the human race refused it; nonmoral religion, and non-religious morality, ex- isted and still exist. Perhaps only a single people, as a people, took the new step with perfect decision — I mean the Jews: but great individuals in all times and places have taken it also, and only those who take it are safe from the obscenities and barbarities of unmoralised worship or the cold, sad self righteousness of sheer 7 ](Exported%20image%2020240808113911-95.png) ![THE PROBLEM OF PAIN the Numinous presuppose the thing to be explained — as when anthropologists derive it from fear of the dead, without explaining why dead men (assuredly the least dangerous kind of men) should have attracted this peculiar feeling. Against all such attempts we must insist that dread and awe are in a different dimension from fear. They are in the nature of an interpretation man gives to the universe, or an impression he gets from it; and just as no enu- meration of the physical qualities of a beautiful object could ever include its beauty, or give the faintest hint of what we mean by beauty to a creature without aesthetic experience, so no factual description of any human environment could include the uncan- ny and the Numinous or even hint at them. There seem, in fact, to be only two views we can hold about awe. Either it is a mere twist in the human mind, corresponding to nothing objective and serv- ing no biological function, yet showing no tendency to disappear from that mind at its fullest development in poet, philosopher, or saint: or else it is a direct experience of the really supernatural, to which the name Revelation might properly be given. The Numinous is not the same as the morally good, and a man overwhelmed with awe is likely, if left to himself, to think the numinous object "beyond good and evil." This brings us to the second strand or element in religion. All the human beings that history has heard of acknowledge some kind of morality; that is, they feel towards certain proposed actions the experiences ex- pressed by the words "I ought" or "I ought not". These experi- ences resemble awe in one respect, namely that they cannot be logically deduced from the environment and physical experiences of the man who undergoes them. You can shuffle "I want" and "1 am forced" and "I shall be well advised" and "1 dare not" as long as you please without getting out of them the slightest hint of "ought" and "ought not". And, once again, attempts to resolve the moral experience into something else always presuppose the very thing they are trying to explain — as when a famous psy- cho-analyst deduces it from prehistoric parricide. If the parricide produced a sense of guilt, that was because men felt that they ought not to have committed it: if they did not so feel, it could produce no sense of guilt. Morality, like numinous awe, is a jump; in it, man goes beyond anything that can be "given" in the facts of experience. And it has one characteristic too remarkable to be 6 ](Exported%20image%2020240808113911-96.png) ![INTRODUCTORY at a glance numen inest3 — the place is haunted, or there is a Pres- ence here; and Virgil gives us the palace of Latinus "awful (hor- rendum) with woods and sanctity (religione) of elder days" 4 A Greek fragment attributed, but improbably, to Aeschylus, tells us of earth, sea, and mountain shaking beneath the "dread eye of their Master".5 And far further back Ezekiel tells us of the "rings" in his Theophany that "they were so high that they were dreadful":6 and Jacob, rising from sleep, says "How dreadful is this place!" 7 We do not know how far back in human history this feeling goes. The earliest men almost certainly believed in things which would excite the feeling in us if we believed in them, and it seems therefore probable that numinous awe is as old as humanity itself. But our main concern is not with its dates. The important thing is that somehow or other it has come into existence, and is wide- spread, and does not disappear from the mind with the growth of knowledge and civilisation. Now this awe is not the result of an inference from the visible universe. There is no possibility of arguing from mere danger to the uncanny, still less to the fully Numinous. You may say that it seems to you very natural that early man, being surrounded by real dangers, and therefore frightened, should invent the uncanny and the Numinous. In a sense it is, but let us understand what we mean. You feel it to be natural because, sharing human nature with your remote ancestors, you can imagine yourself reacting to perilous solitudes in the same way; and this reaction is indeed "natural" in the sense of being in accord with human nature. But it is not in the least "natural" in the sense that the idea of the uncan- ny or the Numinous is already contained in the idea of the danger- ous, or that any perception of danger or any dislike of the wounds and death which it may entail could give the slightest conception of ghostly dread or numinous awe to an intelligence which did not already understand them. When man passes from physical fear to dread and awe, he makes a sheer jump, and apprehends something which could never be given, as danger is, by the physical facts and logical deductions from them. Most attempts to explain 3 - 111, 296. 4 - Aen. Vll, 172. 5 - Fragm. 464. Sidgwick's edition. 6 - Ezekiel 1: 18. 7 - Genesis 28: 17. 5 ](Exported%20image%2020240808113911-97.png) ![THE PROBLEM OF PAIN suppose that you were told simply "There is a mighty spirit in the room", and believed it. Your feelings would then be even less like the mere fear of danger: but the disturbance would be profound. You would feel wonder and a certain shrinking — a sense of in- adequacy to cope with such a visitant and of prostration before it — an emotion which might be expressed in Shakespeare's words "Under it my genius is rebuked". This feeling may be described as awe, and the object which excites it as the Numinous. Now nothing is more certain than that man, from a very early period, began to believe that the universe was haunted by spirits. Professor Otto perhaps assumes too easily that from the very first such spirits were regarded with numinous awe. This is impossi- ble to prove for the very good reason that utterances expressing awe of the Numinous and utterances expressing mere fear of dan- ger may use identical language — as we can still say that we are "afraid" of a ghost or "afraid" of a rise in prices. It is therefore theoretically possible that there was a time when men regarded these spirits simply as dangerous and felt towards them just as they felt towards tigers. What is certain is that now, at any rate, the numinous experience exists and that if we start from ourselves we can trace it a long way back. A modern example may be found (if we are not too proud to seek it there) in The Wind in the Willows where Rat and Mole ap- proach Pan on the island. "Rat,' he found breath to whisper, shaking, 'Are you afraid?' &Afraid?' murmured the Rat, his eyes shining with unutterable love. -Afraid? of Him? O, never, never. And yet — and yet — O Mole, I am afraid.'" Going back about a century we find copious examples in Wordsworth — perhaps the finest being that passage in the first book of the Prelude where he describes his experience while row- ing on the lake in the stolen boat. Going back further we get a very pure and strong example in Malory2, when Galahad "began to tremble right hard when the deadly (= mortal) flesh began to behold the spiritual things". At the beginning of our era it finds expression in the Apocalypse where the writer fell at the feet of the risen Christ "as one dead". In Pagan literature we find Ovid's picture of the dark grove on the Aventine of which you would say 2 - XVII, xxii. 4 ](Exported%20image%2020240808113911-98.png) ![INTRODUCTORY but that is a lie. Ptolemy had told them that the Earth was a math- ematical point without size in relation to the distance of the fixed stars — a distance which one mediaeval popular text estimates as a hundred and seventeen million miles. And in times yet earlier, even from the beginnings, men must have got the same sense of hostile immensity from a more obvious source. To prehistoric man the neighbouring forest must have been infinite enough, and the utterly alien and infest which we have to fetch from the thought of cosmic rays and cooling suns, came snuffing and howling nightly to his very doors. Certainly at all periods the pain and waste of human life was equally obvious. Our own religion begins among the Jews, a people squeezed between great warlike empires, con- tinually defeated and led captive, familiar as Poland or Armenia with the tragic story of the conquered. It is mere nonsense to put pain among the discoveries of science. Lay down this book and reflect for five minutes on the fact that all the great religions were first preached, and long practised, in a world without chloroform. At all times, then, an inference from the course of events in this world to the goodness and wisdom of the Creator would have been equally preposterous; and it was never made.l Religion has a different origin. In what follows it must be understood that I am not primarily arguing the truth of Christianity but describing its origin — a task, in my view, necessary if we are to put the problem of pain in its right setting. In all developed religion we find three strands or elements, and in Christianity one more. The first of these is what Professor Otto calls the experience of the Numinous. Those who have not met this term may be introduced to it by the following device. Suppose you were told there was a tiger in the next room: you would know that you were in danger and would probably feel fear. But if you were told "There is a ghost in the next room", and believed it, you would feel, indeed, what is often called fear, but of a different kind. It would not be based on the knowledge of danger, for no one is primarily afraid of what a ghost may do to him; but of the mere fact that it is a ghost. It is "uncanny" rather than dangerous, and the special kind of fear it excites may be called Dread. With the Uncanny one has reached the fringes of the Numinous. Now I - I.e., never made at the beginnings of a religion. After belief in God has been accepted "theodicies" explaining or explaining away, the miseries of life, will naturally appear often enough. 3 ](Exported%20image%2020240808113911-99.png) ![THE PROBLEM OF PAIN and on the irrational creatures. This power they have exploited to the full. Their history is largely a record of crime, war, disease, and terror, with just sufficient happiness interposed to give them, while it lasts, an agonised apprehension of losing it, and, when it is lost, the poignant misery of remembering. Every now and then they improve their condition a little and what we call a civilisa- tion appears. But all civilisations pass away and, even while they remain, inflict peculiar sufferings of their own probably sufficient to outweigh what alleviations they may have brought to the nor- mal pains of man. That our own civilisation has done so, no one will dispute; that it will pass away like all its predecessors is surely probable. Even if it should not, what then? The race is doomed. Every race that comes into being in any part of the universe is doomed; for the universe, they tell us, is running down, and will sometime be a uniform infinity of homogeneous matter at a low temperature. All stories will come to nothing: all life will turn out in the end to have been a transitory and senseless contortion upon the idiotic face of infinite matter. If you ask me to believe that this is the work of a benevolent and omnipotent spirit, I reply that all the evidence points in the opposite direction. Either there is no spirit behind the universe, or else a spirit indifferent to good and evil, or else an evil spirit." There was one question which I never dreamed of raising. I never noticed that the very strength and facility of the pessimists' case at once poses us a problem. If the universe is so bad, or even half so bad, how on earth did human beings ever come to attrib- ute it to the activity of a wise and good Creator? Men are fools, perhaps; but hardly so foolish as that. The direct inference from black to white, from evil flower to virtuous root, from senseless work to a workman infinitely wise, staggers belief. The spectacle of the universe as revealed by experience can never have been the ground of religion: it must always have been something in spite of which religion, acquired from a different source, was held. It would be an error to reply that our ancestors were ignorant and therefore entertained pleasing illusions about nature which the progress of science has since dispelled. For centuries, during which all men believed, the nightmare size and emptiness of the universe was already known. You will read in some books that the men of the Middle Ages thought the Earth flat and the stars near, 2 ](Exported%20image%2020240808113911-100.png) ![1 INTRODUCTORY I wonder at the hardihood with which such persons undertake to talk about God. In a treatise addressed to infidels they begin with a chapter proving the existence of God from the works of Nature... this only gives their readers grounds for thinking that the proofs of our religion are very weak... It is a remarkable fact that no canoni- cal writer has ever used Nature to prove God. Pascal Pensées, IV, 242, 243. ot many years ago when I was an atheist, if anyone had asked me, "Why do you not believe in God?" my reply would have run something like this: "Look at the universe we live in. By far the greatest part of it consists of empty space, completely dark and unimaginably cold. The bodies which move in this space are so few and so small in comparison with the space itself that even if every one of them were known to be crowded as full as it could hold with perfectly happy creatures, it would still be difficult to believe that life and happiness were more than a bye- product to the power that made the universe. As it is, however, the scientists think it likely that very few of the suns of space — perhaps none of them except our own — have any planets; and in our own system it is improbable that any planet except the Earth sustains life. And Earth herself existed without life for millions of years and may exist for millions more when life has left her. And what is it like while it lasts? It is so arranged that all the forms of it can live only by preying upon one another. In the lower forms this process entails only death, but in the higher there appears a new quality called consciousness which enables it to be attended with pain. The creatures cause pain by being born, and live by inflicting pain, and in pain they mostly die. In the most complex of all the creatures, Man, yet another quality appears, which we call reason, whereby he is enabled to foresee his own pain which henceforth is preceded with acute mental suffering, and to foresee his own death while keenly desiring permanence. It also enables men by a hundred ingenious contrivances to inflict a great deal more pain than they otherwise could have done on one another ](Exported%20image%2020240808113911-101.png) ![INTRODUCTORY or unorthodox, they are so against my will and as a result of my ignorance. I write, of course, as a layman of the Church of Eng- land: but I have tried to assume nothing that is not professed by all baptised and communicating Christians. As this is not a work of erudition I have taken little pains to trace ideas or quotations to their sources when they were not easily re- coverable. Any theologian will see easily enough what, and how little, I have read. C. S. LEWIS vii ](Exported%20image%2020240808113911-102.png) ![PREFACE HEN Mr. Ashley Sampson suggested to me the writ- ing of this book, I asked leave to be allowed to write it anonymously, since, if I were to say what I really thought about pain, I should be forced to make statements of such apparent fortitude that they would become ridiculous if anyone knew who made them. Anonymity was rejected as inconsistent with the series; but Mr. Sampson pointed out that I could write a preface explaining that I did not live up to my own principles! This exhilarating programme I am now carrying out. Let me con- fess at once, in the words of good Walter Hilton, that throughout this book "I feel myself so far from true feeling of that I speak, that I can naught else but cry mercy and desire after it as I may" I Yet for that very reason there is one criticism which cannot be brought against me. No one can say "He jests at scars who never felt a wound" for I have never for one moment been in a state of mind to which even the imagination of serious pain was less than intolerable. If any man is safe from the danger of under-estimating this adversary, I am that man. I must add, too, that the only pur- pose of the book is to solve the intellectual problem raised by suffering; for the far higher task of teaching fortitude and patience I was never fool enough to suppose myself qualified, nor have I anything to offer my readers except my conviction that when pain is to be borne, a little courage helps more than much knowledge, a little human sympathy more than much courage, and the least tincture of the love of God more than all. If any real theologian reads these pages he will very easily see that they are the work of a layman and an amateur. Except in the last two chapters, parts of which are admittedly speculative, I have believed myself to be re-stating ancient and orthodox doctrines. If any parts of the book are "original", in the sense of being novel I — Scale of Perfection I. xvi. 6 ](Exported%20image%2020240808113911-103.png) ![The Son of God suffered unto the death, not that men might not suffer, but that their sufferings might be like His. GEORGE MACDONALD Unspoken Sermons, First Series ](Exported%20image%2020240808113911-104.png) ![1 11 111 IV VI VII Vlll IX x CONTENTS Preface Introductory Divine Omnipotence Divine Goodness Human Wickedness The Fall ofMan Human Pain Human Pain, continued Hell Animal Pain Heaven Appendix 6 1 11 19 31 41 55 69 75 83 93 101 ](Exported%20image%2020240808113911-105.png) ![The Inklings ](Exported%20image%2020240808113911-106.png) ![Based on the public domain etext: The Problem of Pain, by C. S. Lewis (originally published in 1940). OCR by Van Wingerden. Footnotes and punctuation restaured by Pogo. Samizdat, February 2016 (public domain under Canadian copyright law) Font: Berthold Baskerville ](Exported%20image%2020240808113911-107.png) ![THE PROBLEM OF PAIN BY C. S. LEWIS Fellow of Magdalen College, SAMIZDAT UNIVERSITY PRESS QUÉBEC ](Exported%20image%2020240808113911-108.png) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Book notes/Radical Candor.md b/OneNote/Ben's Notebook/Reading/Book notes/Radical Candor.md new file mode 100644 index 0000000..cb3fda3 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Book notes/Radical Candor.md @@ -0,0 +1,45 @@ +# Chapter One + +The two parts of radical candor are: care personally, challenge directly. + +Caring personally can be accomplished by "bringing your whole self to work". Bring your whole self to work means caring about people. It may mean being hated--even though you care deeply, personally about everyone on the team! + +The hardest part about challenging directly is not giving it to others, but creating the environment where they can give it to you. This may make _you_ angry at _them_ and can be hard to deal with! + +Being radically candid is not accomplished by simply starting your feedback with "let me be radically candid with you"! You have to care personally. It also does not mean saying everything you want to. A good rule of thumb is to leave three things unsaid every day. + +Radical candor is not about endless communication that exhausts introverts. It's not about endless activities together to "build team". It's simply being human. + +You may need to adjust what this means by country, team, company, etc. Not every "radically candid" practice will translate directly as you apply it in different contexts. + +- In Israel, respect and caring personally was shown by being extremely direct and even aggressive in communicating with each other +- In Japan, it was more about being persistently polite + +# Chapter Two + +Creating a culture of open communication + +Caring personally and challenging directly = radical candor +Challenging directly without caring personally = obnoxious aggression +Caring personally without challenging directly = ruinous empathy +Neither = manipulative insincerity + +A useful quip: "it's not mean, it's clear". Being clear can _avoid_ being mean later--like firing someone after not being clear about their work early enough! + +When praising, giving specific praise is best. + +Most people for a "competent asshole" than a "nice incompetent". You don't have to choose between the two. You can be a competent nice manager. + +Ruinous empathy doesn't work because it's aimed at making someone feel better instead of helping someone improve at their job. + +# Chapter Three + +You have to understand what motivates each person on your team--how does their job fit into their life goals? + +In WWII the US Air force started to bring their best pilots home to train the next ones. This lead to finally defeating the Nazi air force because they tended to fly their aces until they were shot down. + +I would say that Justin Strandburg is a "rock star" (rock of Gibralter type rock, not Guns 'n' Roses rock star) and that Ezekiel Pierson is more of the super star. Ezekiel is ambitious, rising quickly, learning a lot. + +Rock stars need to be recognized as valuable to the company--they get a lot done--and not disrespected for being "b players". I should be careful to no try to promote them, if they are happy in their current jobs. We don't want to fall into the Peter principle where workers are promoted to the position of least competence. + +Super stars need to be continually challenged. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Book notes/Shepherding a Child's Heart.md b/OneNote/Ben's Notebook/Reading/Book notes/Shepherding a Child's Heart.md new file mode 100644 index 0000000..364db2a --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Book notes/Shepherding a Child's Heart.md @@ -0,0 +1,102 @@ +# Introduction + +Xvii. + +- Is this true from our observation of culture? +- Are we specifically in this boat too? + + - What direction have we received? + - Are we applying it in our parenting today? +- Claims about our culture: + + - Lost its way regarding parenting + - No sense of direction + - Can't direct ourselves + - Have children, don't want to be parents + - Need to quench personal thirst for fulfillment + - Children viewed as a liability + - Parents minimize time with children + - Quality over quantity time + +Xviii. + +- Is this our generation or our parents'? +- Written in 1995 + + - Protests in 60s led to rebellion against authority + - This led to cultural rejection of authority + - This affected parenting by destroying the "do as I say or else" method of parenting +- "the old ways of parenting no longer work" - did they ever? Was it effective or did it just lead to the rebellion of the 60s? +- Parents have responded in two ways + + - Give up (parenting is impossible) + - Keep trying old "john wayne" methods + +Xix. + +- "the only safe guide is the Bible" - refreshing for me, when all other authoritative sources seem untrustworthy +- My thought: success in parenting, as with other things in life, is dependent on our view of God and his revelation (the Bible). If we believe it's His word and we can trust it, we have a solid way forward. If we don't, we have no way forward. We become the judges of how to parent. We first have to be humble to submit to His authority on the matter. +- "God's ways are no proved inadequete; they are simply untried". I feel like my parents, because they were first-generation, serious Christians, did go to Scripture and the Lord for biblical parenting. + + - Was this everyone's experience? + - Or is what they saw more the "God's ways were untried" experience +- Biblical parenting + + - Kind authority + - Shepherding children to understand themselves in God's world + - Keep gospel clearly in view + - Goal of someday living in mutuality +- Authority - nothing new, we all live under authority, whether parents or not. No surprise that parenting includes this aspect as well + + - Are we embarassed to be authorities for our kids? If so, what in our culture makes it that way? + + - Movie representation of parents? + - "scientific" methods of parenting? + +Xx. + +- "empower them to be self-controlled" - is this why authority is "embarassing"? It's not understood as an empowering tool? +- Jesus is our example in "kind authority" -- though God, He came to serve +- "children generally do no resist authority…" -- powerful statement. But important that it's a mix of truly kind and selfless authority + +Xxi. + +- "Values and spiritual vitality are not simply taught, but caught" - we need to be examples in deed, not just word + + - how can we do this when we're tired, exhausted parents? + + - Refresh ourselves + + - Dates + - Church + - Friends + - Vacation + - Watch out for each other + + - This book study + - Get together + - Mom's get-togethers + - Guys nights together + - Stay connected with the Lord + + - Church attendance + - Quiet time + - Sacrifice! It’s not easy + +Xxii + +- Not simply well-behaved (external)--the gospel works from the inside out +- Gospel enables accurate picture of yourself and God + + - I'm a sinner who fails + - God is righteous who saves with great grace +- Keepable standard + + - Because they're not christians? + - I do it because it's easier! Not good…. +- Impossible standard forces facing the gospel--powerful statement, never thought of it this way + +Xxiii. + +- "Each child will examine" - how else can we prepare? It will happen, give them the tools to do it well +- Mutuality as people under God - seems a long way off, but I’m looking forward to it, what a reward \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Done Reading/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md b/OneNote/Ben's Notebook/Reading/Done Reading/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md new file mode 100644 index 0000000..aed9d96 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Done Reading/A Completely Non-Technical Explanation of AI and Deep Learning - Parand.md @@ -0,0 +1,94 @@ +Clipped from: [https://www.parand.com/a-completely-non-technical-explanation-of-ai.html](https://www.parand.com/a-completely-non-technical-explanation-of-ai.html) + +# Overview + +This document will explain what neural networks are and how they work, which will help you understand how AI and machine learning work. In the scenario below you'll play the part of the neural network. + +# Day One + +First day of your new job as a "classifier" your boss walks in and drops a big spreadsheet of numbers on your desk. +"Is this a cat?" she asks. +Confused you ask "What?" + +![Exported image](Exported%20image%2020240808113913-0.png) + +"Is this a cat?" +Even more confused, you respond "I don't know". +"Wrong!" she says, and slaps you across the face. +Before you've had a chance to be shocked she drops another large spreadsheet on your desk. "Is this a cat?" +"I don't understand" you respond. +"Wrong!" she says, and slaps you again. +Another spreadsheet. "Is this a cat?" +Not wanting another slap, you meekly respond "Yes?" +"Correct! Good job!" she says, and gives you a wonderful reward. Almost makes up for the slaps. +Another spreadsheet. Cat? +Slightly more confident and wanting another reward you respond "Yes" +"Wrong!". Another slap. +You are very confused. "I don't understand what's going on. You haven't told me the rules, you haven't told me how to figure out something is a cat, you haven't given me the logic to figure this out. You haven't trained me." +"Correct" says the boss. "This is training. Trust me, you're going to get very good at recognizing cats" + +![Exported image](Exported%20image%2020240808113913-1.png) + +Another spreadsheet. This time you focus on the sheet. It's 256 columns and 256 rows, filled with numbers. Is it a cat? You don't know, so you guess. +Another and another. Right, wrong, wrong, right again, it keeps going. Slaps and rewards. +You're starting to notice some patterns - if the sheet is almost all zeros then it's not a cat. You look at the center of the sheet - that part should have larger numbers. +It's getting slightly better - you're getting more rewards than slaps, guessing correctly more often than not. It's all about the patterns of the numbers. + +# Day Two + +This is the strangest job you've ever had. The slaps are terrible, but the rewards are so great you don't want to quit. How do you get better at this? It's not really possible for one person. If you had more people they could focus on different aspects of the sheet, look for different patterns, and you could use their findings to make better guesses. +You hire 10 people and bring them to work the next day. When you get a spreadsheet you show it to those 10 people and ask them "Is this a cat?" +They are as confused as you were. You force them to guess. The first guy looks like an idiot, so you decide to go with the opposite of what he says. The third lady looks really thoughtful so you put a lot of weight on what she says. In your mind you assign a weight to each of their guesses to come up with your final answer. +Each time you get a reward or punishment you share it with the 10 people you've hired: you reward or slap them based on how much weight you put on their input and how much they contributed to you getting the answer right or wrong. You learn the patterns: if the first guy says a strong no and the third lady a strong yes then it's very likely a cat. You learn many more patterns like this. +The 10 people are learning to hone their opinions based on the rewards and punishments they get. They can focus on different aspects of the sheet, and their opinions together can tell you a lot about the sheet. +After what feels like an epoch and a lot of spreadsheets, eventually you get better. You're getting more rewards. This is working. Your boss says you're very perceptive, and starts calling you Perceptron. + +![Exported image](Exported%20image%2020240808113913-2.png) + +# Day Ten + +What if you get more people involved? You could make it 50 people reporting to you, but that'd be hard to manage. How about we add another layer of people before your 10? +You hire 50 more people, have them give their guesses to the 10 people that report to you. You're now very removed from looking at the spreadsheets - instead you rely on the patterns found by the first layer of the people, who give their opinions to the second layer of the people, who then inform you. Everybody passes the slaps and rewards down the line based on how much each earlier person's guess contributed to their guess. +It takes even longer, but eventually the system starts working. You're much more accurate in identifying when it's a cat. +Interestingly you were never taught the rules or logic, and you didn't teach your people the logic or rules. You just propagated the rewards and punishments back through each layer: the more each person's opinion contributes to the answer, the more rewards or punishment you shared with them, and they in turn with the people in the layer behind them. Each person uses the same method to propogate their rewards and punishment back to the people in the layer below them. + +# Neural Networks + +This is how neural networks work: they see many examples and get rewarded or punished based on whether their guesses are correct. They use multiple layers of workers and eventually learn patterns. Importantly no one is teaching them what patterns they should be looking for or telling them the logic or the rules - the networks eventually figure out the patterns and logic based on very many rounds of example, reward, and punishment. This is called **machine learning**, because the machine is learning the rules by itself. +Neural networks work well when you have many examples of something (eg. pictures of cats), but it's hard to write the logic and rules to describe how to recognize that thing. Try it - write down some rules for how to recognize a cat (eg. "has 4 legs"), then look at pictures of cats and see where the rules fail (eg. a picture of a cat's head). In these cases you use machine learning so the machine learns the rules by itself. +Also note that computers see things as multi-dimensional tables of data. They don't look at a "picture" - they see 3 spreadsheets of numbers representing the RGB values of the picture. + +# Day Forty + +Identifying cats is a lucrative business and you're pretty good at it. But not good enough. How can we get even better? More people, more layers! +Unfortunately it takes a long time for people to do their calculations, so you've been stuck with just a few layers of people for a while. Having a lot more people would make the process take too long. +One day you run into a group of people who call themselves Gaming People United (GPU). These people play a game that has taught them to be very good at looking at spreadsheets and calculating numbers - in fact they can do a lot of calculations in parallel, very quickly. +Excited, you hire a bunch of them and put them to work recognizing cats. Now instead of two layers of people you can have 10! Each layer can focus on higher and higher concepts - the first layer can look for small details (eg. do I see a pattern that looks like a small circle? Do I see a pattern that looks like a sharp edge?), the second layer can look for patterns from the results of the first layer (eg. are there two circles close to each other), the third layer can build on that (eg. are there two circle close to each other, and a triangle below them), and so forth. By the time the results of the layers get to you you have some fairly sophisticated concepts - we see a pattern that looks like a face, we also see patterns that could be legs, and a sharp thing that might be a beak. Now your guess is more informed than ever. +You train the layers sending slaps and rewards down through each layer, and after many epochs you get really good at recognizing cats. + +![Exported image](Exported%20image%2020240808113913-3.png) + +# Deep Learning + +One of the major break-throughs in machine learning was the advent of _Deep Learning_, which is basically what we describe above - GPUs (Graphics Processing Units) got popular because they enable fast 3D graphics for games. They also happen to be very good at quickly doing the types of calculations neural networks need. Machine learning people started using GPUs for training neural networks, and with this extra speed they could have many more layers - from 3 or 4 layers to 10 or 11, and then hundreds. +This addition of layers led to significant advances in neural network performance - very quickly neural networks became the best solution for voice recognition, for image recognition, image creation, and sophisticated language models. This is called **Deep Learning** because there are so many layers, not because it's profound. +_You can stop reading here if you want, the following portion is only here because someone asked me what "convolutional neural networks" are._ + +# Day Fifty + +How can we make the process even more efficient? You start to realize that looking at the entire sheet is too hard - the first layer of people literally have to stare at the whole thing and try to guess based on that. What if we give them a small portion of the sheet to look at, give a guess for that portion, then move on to the next portion of the sheet, and so on? The first layer of people are focused on lower level concepts anyway - looking for edges, things that look like circles, and so forth - and they can find those in the small portions of the sheet, without the need to look at the whole thing at once. + +![Exported image](Exported%20image%2020240808113913-4.gif) + +[Via towardsdatascience](https://towardsdatascience.com/intuitively-understanding-convolutions-for-deep-learning-1f6f42faee1) +You tell the first layer of people this is what they should start doing. They respond that this sounds very convoluted and they'll only agree to do it if you call them "colonel". +This makes the process even faster and more accurate: the first layer become specialists in small features of the sheet, and they learn to be very efficient and fast. You try the same idea for the next several layers: you tell people to focus on small portions of the feedback they get from the layer below them, moving the portion they focus on so eventually the scan across all of the feedback. +This specialization and focus makes you even more accurate. Congratulations, you are officially recognized as the best cat classifier in the world. + +# Convolutional Neural Networks + +Convolutions are this idea of applying a specific set of calculations, sometimes called a kernel, to each portion of the input, and scanning your window of attention across the entire image. The set of calculations, or kernel, is learned by each worker - you don't tell it what to calculate or how, it learns what's useful based on rewards and punishments. Convolutional Neural Networks (CNNs) were a significant step forward in the capability of neural networks. + +# Further Reading + +_If you're interested in this topic you might also enjoy the_ _Completley Non-Technical Explanation of ChatGPT_ _series as well._ \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Done Reading/A Non-Technical Explanation of ChatGPT - Parand.md b/OneNote/Ben's Notebook/Reading/Done Reading/A Non-Technical Explanation of ChatGPT - Parand.md new file mode 100644 index 0000000..21d908f --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Done Reading/A Non-Technical Explanation of ChatGPT - Parand.md @@ -0,0 +1,77 @@ +Clipped from: [https://www.parand.com/a-non-technical-explanation-of-chatgpt.html](https://www.parand.com/a-non-technical-explanation-of-chatgpt.html) +Continuing the series of non-technical explainers, let's figure out how ChatGPT (and in general Large Language Models, or LLMs) work. This is part one of the ChatGPT explainer, with part two coming soon. +It's helpful but not necessary to read the [non-technical explanation of AI](https://www.parand.com/a-completely-non-technical-explanation-of-ai.html) first, if you feel like it read that and come back. + +# Fill In The Blank + +Let's play a quick game of fill in the blank: +to be or not to _____ +Why did you immediately think of the word _be_ to fill in that blank, instead of the word _banana_ or _fish_? Because you've seen the phrase many times and your brain has learned the most likely next word is _be_. +Let's do another one: +rock and ____ +Did you think of the word _roll_? Why? Because that's the word you see most often following the words _rock and_. +How about this one: +I am very _____ +This is less clear - the next word depends on the context. +I just ran a marathon. I am very _____ +Perhaps now you would say _tired_. Or _happy_, or _proud_. +Your brain is picking the most likely next word based on the context of the sentence and based on what words it's seen most frequently in that context. + +# Aliens and CatGPT + +In an astonishing turn of events a race of alien cats have landed on earth. Since you are [the world's foremost cat expert](https://www.parand.com/a-completely-non-technical-explanation-of-ai.html) you have been chosen to communicate with them. + +![Exported image](Exported%20image%2020240808113915-0.png) + +Your boss walks in and drops a massive print out of all the alien cat communications on your desk. +"Speak cat!" she commands. +Unfortunately you don't speak alien cat. +You page through the print outs - it looks like pages and pages of gibberish. +zoog zeeg zag. zoog zeeg kaz. zoog zeeg bah. rag zoog zeeg. rag zoog ko. kaz rag. zap zoog zeeg. ... + +# Markov to the Rescue + +What to do? You remember your friend Markov who's always talking about languages, words, and their relationships. Maybe he can help. You show him the alien cat communications and ask him if he can help you say something in cat. +"Yes!" he exclaims - "We can do this. We will create our response one word at a time, just by picking the best word to say next, and keep going until we have a sentence" +"But how do we know what the best word to say next is? Don't we need to know what the words mean?" +"Nope, we just need to know what word to say next" +"That... doesn't seem like it would work" +"Let me show you", says Markov, and grabs the book on his desk, [Alice in Wonderland](https://www.gutenberg.org/ebooks/11). + +![Exported image](Exported%20image%2020240808113915-1.png) + +"We just need to know what word to say next. The best word to say next is simply the word that shows up most frequently after the word we're looking at. All we have to do is make a table of how often each word follows another word. We'll call this a frequency table" +He shows you how to create the frequency table - you just note down how many times each word follows another. It takes a while to go through all Alice in Wonderland and do the counting. You end up with: +Next word after "Alice" → was: 17 times, and: 16 times, thought: 12 times, had: 11 times, ...Next word after "sat" → down: 9 times, silent: 2 times, still: 2 times, for: 1 times, ...Next word after "was" → a: 31 times, the: 20 times, not: 12 times, going: 11 times, ...Next word after "and" → the: 80 times, she: 52 times, then: 31 times, was: 19 times, ...Next word after "a" → little: 59 times, very: 25 times, large: 20 times, great: 17 timesNext word after "very" → much: 10 times, soon: 7 times, curious: 6 times, glad: 5 times... +This table gives you a lot of help in forming sentences in the style of Alice in Wonderland. For example, if you start with the word _Alice_, then you'd look that up in the above table and see that the most frequent next word is _was_. And after _was_ you would select _a_. After _a_ you would get _little_. You'd end up with _Alice was a little_. +How well does this work? Let's create some sentences: +the door, when i beg your verdict," it was quite plainly through the bottle, i'm afraid that they had its nest. +You can try this out for yourself on [almeopedia](http://almeopedia.com/markovtest.html). +That's not great. Why is it so nonsensical? Think back to our fill in the blank examples at the start of this post: in order to pick a good next word you need context. If someone asked you what word should appear after _rock_, you'd have a hard time picking something reasonable, but if they gave you _rock and_, you'd fairly quickly think of _roll_. +What would happen if you considered two words instead of a single word for your context? For one thing your frequency table creation would become harder - now instead of a single line for each word, you'd have a line for each word pair. You'd have to gather stats for all the two word permutations, which is a lot more than the single word case. +Next word after "Alice was" → not: 3 times, beginning: 2 times, very: 2 times, ...Next word after "was not" → a: 3 times, here: 1 times, going: 1 times ...Next word after "not here" → before: 1 timesNext word after "not a" → moment: 2 times, bit: 2 times, serpent: 2 times ... +Let's create a sentence with this and see how it looks: +the hatter, and, burning with curiosity, she decided on going into the garden. +You can try this out for yourself on [almeopedia](http://www.almeopedia.com/markov3test.html). +That's looking better, it almost makes sense. Let's keep going - instead of two words of context, how about three? +The Hatter’s remark seemed to have no sort of chance of her ever getting out of the water, and seemed to quiver all over with diamonds, and walked two and two, as the soldiers did. +Four? +So she swallowed one of the cakes, and was delighted to find that she knew the name of nearly everything there. +Hmm. This is a little too good. It turns out a very similar sentence exists in the original Alice in Wonderland text: +So she swallowed one of the cakes, and was delighted to find that she began shrinking directly. +Our simple method of picking the most likely next word can result in the system memorizing the text snippets - given long enough context, the next most likely word is exactly the word that appeared in the original text following that context. +We can fix this by introducing some randomness - instead of always picking the most likely next word, we can pick somewhat likely next words. This way we're less likely to regurgitate the original text. +The good news is our method seems to work for English, so it'll probably work for alien cat language as well. +_Aside: You might run into the term "stochastic" as you look into language models - this just means randomly determined. For example, you might hear people argue whether these systems are_ **Stochastic Parrots**_, implying the systems are simply parroting back the original text that they saw, with some randomness thrown in._ + +# Large Language Models + +ChatGPT and many other Large Language Models (LLMs) do essentially what you did above: they examine a very large amount of human communication, gather stats (or probabilities) on what words are most likely to follow other words, and play a continous game of fill-in-the-blank. You give them some context (your prompt or question), and they create the reply one word at a time by selecting the word most likely to appear next. They respond with a word, then look at their internal stats to pick a word to follow their first word, then a word to follow their second word, and so forth, one word at a time, until they've formed a response. + +# To be Continued... + +In [part two of this series](https://www.parand.com/a-non-technical-explanation-of-chatgpt-deep-learning.html) we'll look at the problems you'll run into with this method and how deep learning helps you overcome those problems. + +# Further Reading + +_If you're interested in this topic you might also enjoy the other posts in the_ _Non-Technical Explainer_ _series as well._ \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Done Reading/Embrace Complexity; Tighten Your Feedback Loops.md b/OneNote/Ben's Notebook/Reading/Done Reading/Embrace Complexity; Tighten Your Feedback Loops.md new file mode 100644 index 0000000..78c2e10 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Done Reading/Embrace Complexity; Tighten Your Feedback Loops.md @@ -0,0 +1,193 @@ +Clipped from: [https://ferd.ca/embrace-complexity-tighten-your-feedback-loops.html](https://ferd.ca/embrace-complexity-tighten-your-feedback-loops.html) +This post contains a transcript of the talk I wrote for and gave at [QCon New York 2023](https://qconnewyork.com/presentation/jun2023/embrace-complexity-tighten-your-feedback-loops) for [Vanessa Huerta Granda](https://qconnewyork.com/speakers/vanessahuertagranda)'s [track on resilience engineering](https://qconnewyork.com/track/jun2023/resilience-engineering-culture-system-requirement). +The official talk title was "Embrace Complexity; Tighten Your Feedback Loops". That’s the descriptive title for the talk that follows the conference’s guidelines about good descriptive titles. Instead I decided to follow my gut feeling and go with what I think really explains my perspective and the approach I bring with me to work and even my life in general: + +![Tkts Is ALL GOING To KELL ACL WE CAW DO IS (ÄFL(JENC€ Pow CT's TAKE frea Hebert keeps ](Exported%20image%2020240808113916-0.png) + +I take what would probably be a sardonic approach to dealing with life and systems, and so “This is all going to hell anyway” is pervasive to my approach. Things are going to be challenging. There are going to always be pressures that keep pushing our systems to the edge of chaos. I don’t think this can be fixed or avoided. Any improvement will be used to bring it right to that edge. In complex systems, the richness and variability is often there for a reason. Trying to stamp it out in favour of stronger control is likely to create weird issues. +So the best I personally hope for is to have some limited influence in steering things the best I can to delay going to hell as long as possible, but that’s it. And my talk is going to focus on a lot of these approaches, but first, I want to explain why I feel things are that way. + +![OFF TE Figure 2. (Color online) Process Map From: - OF -tl-e ](Exported%20image%2020240808113916-1.png) + +In what is probably my favorite paper ever, titled [Moving Off The Map](https://ferd.ca/notes/paper-moving-off-the-map.html), Ruthanne Huising ran ethnological studies by embedding herself into projects within many large corporations doing planned organizational changes. In supporting these efforts, they were doing “tracing” of their functions, which meant gathering a lot of data about what activities take place, what interactions and hand-offs exist, what information and tools are used and required? How long do tasks take? How do people and teams deal with errors? Generally asking the question “what do we do here?” and wondering with whom they do it. +To build these maps they generally reached out to experts within the organization who were supposed to know how things were working. Even then, they were really surprised. + +![Figure 2. (Color online) Process Map OFF TE k(it was (ike the sun rose for the first time... r sau the bigger picture." k(Tke proble%f is that it was not designed in the first place." k(Tkis is even Biore fucked up than r imagined." ](Exported%20image%2020240808113916-2.png) + +One explained that “it was like the sun rose for the first time… I saw the bigger picture.” Participants had never seen the pieces (jobs, technologies, tools, and routines) connected in one place, and they realized that their prior view was narrow and fractured, despite being considered experts. +Others would state that “the problem is that it was not designed in the first place.” The system was not designed nor coordinated, but generally showed the result of various parts of the organization making their own decisions, solving local problems, and adapting in a decentralized manner. +The last quote comes from events when a manager at one of the organizations walked the CEO through the map, highlighting the lack of design and the disconnect between strategy and operations. The CEO sat down, put his head on the table, and said, “This is even more fucked up than I imagined.” He realized that the operation of his organization was out of his control, and that his grasp on it was imaginary. + +![CONTROL Pgoc.ESs COSTS SAVINGS I LLUSoRY To coczECT€b DATA CREhTED nap ](Exported%20image%2020240808113916-3.png) + +One of the most surprising results reported in there was about tracking the people who participated in organizing and running the change projects, and seeing who got promoted, who left, and who moved around the org or industry they were in. +She found out there were two main types of outcome. The first group turned out to be filled with people who got promotions. They were mostly folks who worked in communications, training, who managed the costs and savings of the projects, or those who helped do process design. Follow-up interviews revealed that most of them attributed their promotions to having worked on a big project to put under their belt, and to frequently working with higher-ups, which both helped with getting promoted. +Another group however mostly contained people who moved to the periphery: away from core roles at the organization, sometimes becoming consultants, or leaving altogether. Those who fit this category happened to be the people who collected the data and created the map. They attributed their moves to either feeling like they finally understood the organization better, felt more empowered to change things, or became so alienated by the results they wanted to get out. +So the question of course became how come people who feel they understand how the organization truly works and who want to change it move _away_ from the central roles and positions, and into the peripheral ones? + +!["FATAL «organizations and institutions exist on(g actual people's doings and that these are necessari(g particular, local and epkæeral" «socia( worlds do not have independent, stable existence but instead emerge from our collective action" «t.Uitkin the system of roles, rules, and routines, there is far %tore room to htaneuver than previous(g assumed." ](Exported%20image%2020240808113916-4.png) + +The fatal insight, according to Huising, is something sociologists knew for a good while: the culture and the order imposed to organizations, groups, and even societies is often emergent and negotiated. And while it's obvious that these structures dictate a lot of actions, the actions themselves can preserve or change the structures around them. +The feelings of empowerment and alienation come in no small part because people realized that they could change a lot more than they could, albeit often from outside the core decision-making that enforces the structure (while understanding how that core works), or because the ways they thought they were impacting things was shown not to be effective and they felt disembedding. + +![NOetstNAL Vs. 0-0-0 0—0-0 o o o ](Exported%20image%2020240808113916-5.png) + +Another thing you have possibly experienced and isn’t in the paper now is one of differentiating between the nominal and actual structure of the org, the emergent one that depends on power dynamics, who knows what or whom, who likes or dislikes each other, and so on. +If you've ever worked in a flat organization, like the one in the middle here, is that even though you have little management structure to speak of, power dynamics and decision-making authority still exists. People who have no power attached to their role are still going to be consulted or inserted in the decision-making flow of the organization, they're still going to be influential and have the ability to make or break projects, but just with less obvious accountability. +The nominal structure is the one where each level of management and within the organizational ladder specifies how information flows, and how authority is applied. It's what we see on the left in a more traditional org structure, and this way of organizing groups will simultaneously be useful to align efforts and to constrain them. It makes accountability more explicit and transparent, but structurally will prevent people from doing unspecified things, whether they would be harmful or useful. +The emergent structure is always there as well. It is implicit, always changing, and not necessarily constrained to your own organization either. Sometimes, people who know how to run, maintain, or operate components, or whom people listen to, are not even in your org anymore. They might have moved away (to a different team or even a competitor), retired, or never been in and they have just published a really influential piece of media and people look up to them. +But who knows what, works with whom, and who can move things around in specific contexts can be key to successful initiatives. Even if the organizational structure has often been put in place to constrain change, as a barrier to people working in mis-aligned ways, some folks central to the emergent structure, in key contexts, have earned enough trust to be allowed tacitly to bend and break the rules. They can choose not to enforce the rules, or the rules are not enforced as tightly for them with the hopes of positive outcomes—even if sometimes it can get you the opposite result. +I’m not here to argue in favor of one or the other structure, but mostly that in my experience, driving change or making initiatives succeeds the most when catering to both structures at once, or rather fails when only looking at one and being blocked by the other. They're both real, both distinct, and pretending only either exists is bound to cause you grief. + +![THE GAP ETwEEN WORK-AS-... JRK- ms- IMAGINED unRk-AS-DscLSED WORK-AS-DONE ](Exported%20image%2020240808113916-6.png) + +As a continuation of this, the way people work every day is often different from the way people around them imagine their work is being done. The gap between how work is thought to be done and how it is actually done is a major but generally invisible factor in how systems work out. +Based on flawed mental models of the work, procedures and prescriptions are given about how to do work, and will vary in inaccuracy. People will imagine things like, for example, writing all the tests before writing or modifying any code and that code coverage could be ideal and then that it will all be reviewed in depth by an expert, and will enshrine this as a policy. +But the application of these policies is never perfect. Sometimes code doesn't have an owner, or due to crunch time and based on how much the reviewer and author trust each other, the review won't be as in-depth as expected. +When you see this mismatch causing people to ignore or bend rules, you can choose to apply authority and ask for a stricter rule-following. This pattern of enforcing the rules harder will likely drive these adaptations underground rather than stamping them out, because real constraints drive that behavior. +In turn, the work as disclosed will be less adequate, and the work as imagined progressively gets worse and worse. +This becomes a feedback loop of misunderstanding and at some point, like our devastated CEO, you’re not managing the real world anymore. + +![Fr Hebert mononcqc@hachyderm.io If you're a software developer who ever worked for an employer who had you track time hourly into specific projects/customer accounts and you were short on time budget, did you: ESCRO 13K¯ work for free/untracked/stopped work¯ 13% enter time in unrelated projects with more buffer 35% enter time in the same project regardlesE 58% - my time tracking was always fake and lies Refresh • 120 people • Closed Jan 21, 2023, 14:05 web ](Exported%20image%2020240808113916-7.png) + +To demonstrate this, earlier this year I went to my local mastodon network—so you know this is super scientific—and ran a poll about time sheets. The question was "If you're a software developer who ever worked for an employer who had you track your time hourly into specific projects/customer accounts and you were short on time budget, did you..." +Multiple answers were accepted. Fewer than 15% of people either stopped work, worked without tracking their time anymore (for free), or shifted their time into other projects with more buffer space. +Roughly a third of people reported billing anyway, some stating that it's not their problem the time allocation wasn't realistic or adequate. +But the vast majority of answers, nearly 60%, came from people saying "my time tracking was always fake and lies," with some people stating they even wrote applications to generate realistic-looking time sheets. +What we can see here is an example of how work-as-imagined gets translated into policies ("people do their work in projects, and account for their time"), which at some point doesn't get applied right anymore. If I were to suppose, it could be things like not being allowed to go over time, or just finding the practice useless. But the end result is that the time sheet data just isn't trustworthy, and then it can get used again and again in further decision making. +The gap widens, and our CEO might also get to think "this is all fucked up." + +![PRESSURES AO CONFLICTS WoeKLoAD RISK TRuST SOCCESS FAILURE ](Exported%20image%2020240808113916-8.png) + +Part of the reason for this is that every day decisions are made by trying to deal with all sorts of pressures coming from the workplace, which includes the values communicated both as spoken and as acted out. People generally want to do a good job and they’ll try to balance these conflicting values and pressures as well as they can. +The outcome of that trade-off being a success or a failure isn’t known ahead of time, but these small decisions accumulate based on the feedback we get from each of these and can end up compounding and accumulating, either as improvements, or as erosion that makes organizations more brittle, or really anywhere in between. People adopt the organization’s constraints as their own, and this set of pressures is the kind of stuff that drives processes to the edge of chaos over and over again. +These accumulations of small decisions, these continuous negotiations, that’s one way your culture can define itself. Small common everyday acts and small amounts of social pressure you can apply locally has an impact, as minor as it might be, and compounds. You can easily foster your own local counterculture within a team if you want to. This can both be good (say in Skunkworks where you bypass a structure to do important work) or bad (normalizing behaviors that are counterproductive and can create conflict). + +![Mow To EMBRACE GMPLFXITY? QADE-OFFs FVk1kJG KEEP EEDBACk LOPS HAC— — H OVER ](Exported%20image%2020240808113916-9.png) + +So while a lot of the work you can do to improve reliability or resilience as a whole can be driven locally, my experience is that you nevertheless get the best results by also aligning with or re-aligning some of the organizational pressures and values usually set from above. +The idea here is to start looking at the organization from both ends: how can we support the people dealing with the trade-offs in conflicting goals as they happen, how can we influence the higher-level values and pressures such that we can try to reduce how often these conflicts happen even though they will definitely keep happening, and how can we better carry context and feedback across both ends so that we constantly adjust as best as we can. A system perspective on interactions, rather than focusing on components is also something I've found useful. The rest of the talk is going to be spent on these ideas. +_(as a note, the third drawing is_ _Dimethylmercury__, a highly volatile, reactive, flammable, and colorless liquid. It's one of the strongest known neurotoxins, and less than 0.1 mL is enough to kill you through your skin, and gloves apparently do a bad job at protecting you)_ + +![Mow To EMBRACE GMPLFXITY? QADE-OFFs FVk1kJG KEEP EEDBACk LOPS HAC— — H OVER ](Exported%20image%2020240808113916-10.png) + +So let's start with negotiating trade-offs, with a bit more of an ops-y perspective, because that's where I'm coming from. + +![Dou'T DELWEÄ WHAT Asm To ](Exported%20image%2020240808113916-11.png) + +This is a painful one sometimes, especially when you have highly professional people who take their jobs seriously. +Locally for you as a DevOps or SRE team, there is a need for the awareness of what the organization and customers actually care about. Some availability targets become useless metrics because they’re disconnected from what users want, and you’re just going to burn people out doing it. +I learned this lesson when talking to the SRE manager of one of these websites where people pick their favorite images, put them on boards, and get shown ads. He was telling me how their site was having a lot of reliability issues. It would keep going down, his team would do heroics to bring it back up, and it'd open all over again. +He felt his team was burning out. They were losing people, and their call rotation was so painful they were also having issues hiring back into it. He was seeing the death spiral happening and was wondering what to do. +He added that there were perverse incentives at play: every time the site went down, they stopped showing images, but not ads. That meant that during incidents, they still earned money, but no longer paid for bandwidth. The site was more profitable when it failed than when it worked, and seemingly, users didn't mind much. +They were not getting help, nobody seemed to consider it a problem. Not really knowing what to say, I just asked off-hand: "are you trying to deliver more reliability than people are asking for? What if you just stopped and let it burn more and rested your people?" He thought about it seriously, and said "yeah, maybe." +I never actually found out what happened after this, but it still stuck with me as a really good question to ask from time to time. + +![DoucT DELWEP- WHAT To ](Exported%20image%2020240808113916-12.png) + +In some cases, the answer will be "yes, we want to be this reliable". But you just won't be given the right tools to do it. +At Honeycomb, we want on-call rotations to have 5-8 people on them because that’s what we think gives a good pace that maintains a balance between how rested and how out-of-practice people can be. Not too often nor not often enough. +But many services are owned by smaller teams of 3-4 people. If we wanted rotations to be made of people who know all their components in depth, where they could build expertise and operate what they wrote, we couldn't reach a sustainable frequency. +Instead, to keep the pace right, we tend to put together rotations made of multiple teams, for which people won’t understand many of the components they operate. This in turn makes us prepare to deal with more unknown: fewer runbooks, more high-level switches and manual circuit breakers to gracefully degrade parts of the system to keep it running off-hours, and with different patterns of escalation. +We started leaning more heavily on this when a big public product launch required shipping a new feature, which was to be operated by a team that didn't have full time to get it operationally ready. When our SRE team was discussing with them what still needed to be done, we asked for a few simple things: a way to switch the feature off for a single customer, and a way to turn it off entirely, that wouldn't break the rest of the product. The rest we could add as we went. +We ended up using these switches a few times, one of which prevented a surprising write-amplification bug that could have killed the whole system, and instead let us wait a few hours for the code owners to get up and fix it at a leisurely pace. We're going to accept a bit of well-scoped, partial unavailability—something that happens a lot in large distributed systems—in order to keep the system stable. +The person wearing the pager often does triage and that weird issues will eventually be handled by code owners, just not right now. +This approach means that rather than working impossible hours and making inhuman efforts foreseeing the unforeseeable, we keep moving rather fast, gather feedback, find issues, and turn around a bit more on a dime. In order to do this though, there’s a general understanding that production issues may turn parts of the roadmap upside down, that escalations outside of the call rotation can disrupt project work, and so on. +That’s one of the complex trade-offs we can make between staffing, training/onboarding, capacity planning, iterative development, testing approaches, operations, roadmap, and feature delivery. And you know, for some parts of our infra we make different decisions because the consequences and mechanisms differ. + +![THERE ARE NO SUbSTtT(ffES Foe SAFETY ](Exported%20image%2020240808113916-13.png) + +To make these tricky decisions, you have to be able to bring up these constraints, these challenges, and have them be discussed openly without a repression that forces them underground. +One of my favorite examples is from a prior job, where one of my first mandates was to try and help with their reliability story. We went over 30 or so incident reports that had been written over the previous year, and a pattern that quickly came up was how many reports mentioned "lack of tests" (or lack of good tests) as causes, and had "adding tests" in action items. +By looking at the overall list, our initial diagnosis was that testing practices were challenging. We thought of improving the ergonomics around tests (making them faster) and to also provide training in better ways to test. But then we had another incident where the review reported tests as an issue, so I decided to jump in. +I reached out to the engineers in question and asked about what made them feel like they had enough tests. I said that we often write tests up until the point we feel they're not adding much anymore, and that I was wondering what they were looking at, what made them feel like they had reached the points where they had enough tests. They just told me directly that they knew they didn't have enough tests. In fact, they knew that the code was buggy. But they felt in general that it was safer to be on-time with a broken project than late with a working one. They were afraid that being late would put them in trouble and have someone yell at them for not doing a good job. +When I went up to upper management, they absolutely believed that engineers were empowered and should feel safe pressing a big red button that stopped feature work if they thought their code wasn't ready. The engineers on that team felt that while this is what they were being told, in practice they'd still get in trouble. +There's no amount of test training that would fix this sort of issue. The engineers knew they didn't have enough tests and they were making that tradeoff willingly. + +![THERE so NON-TECHNICAL WAYs Fop THINGS To GO (T ts SOt0ETlES åkAY foe TO TRADE OF THAT RI Sk ](Exported%20image%2020240808113916-14.png) + +_(note: this slide was cut from the presentation since I was short on time)_ +Speaking of which, sometimes it’s also fine to drop reliability because there are bigger systemic threats. +Sometimes you can eat downtime or degraded service because it’s going to keep your workload manageable and people from burning out. or maybe you take a hit because a big customer that makes you hit your targets as an org and can prevent layoffs will put some things over the limit and a component’s performance will suffer. You can’t be the department of “no” and that negotiation has to be done across departments. +Conversely however, you have to be able to call out when your teams are strained, when targets aren’t being met and customers are complaining about it. It means you might be right, and some deadlines or feature delivery could be deferred to make room for others. +How do you deal with capacity planning when making your biggest customer renew their contract prevents you from signing up another one that’s as big? Very carefully, by talking it out by all the involved people. +And sometimes that trade-off is very reasonable. And good engineering requires you to move it earlier in the lifecycle of software than just around incidents. It’s much simpler to change the shape of a product’s features than it is to deliver the perfect distributed systems sometimes. Making your features take the ideal shape to deal with the reality of physics is one of the things a good collaborative approach can facilitate. + +![Mow To EMBRACE COMPLEXITY? QADE-OFFs FVk1kJG KEEP EEDBACk LOPS HAC— — H OVER ](Exported%20image%2020240808113916-15.png) + +So we can make tradeoff negotiation simpler by having these honest discussions, but in many cases this ability to discuss constraints to influence how work takes place brings us to this next step, where we don’t only influence the decisions people make, but surface these challenges to influence how the organization applies its pressures. This is moving from the local level to the alignment to the broader org structure. + +![METRICS APE TREE To You, BJOT YW To SERVE THOA ](Exported%20image%2020240808113916-16.png) + +Metrics are good to direct your attention and confirm hypotheses, but not as a target, and they’re unlikely to be good for insights. [They’re compression, and it can be unreliable](https://ferd.ca/plato-s-dashboards.html). +The thing you generally care about is your customer or user's satisfaction, but there's a limit to how many times you can ask "would you recommend us to a friend?" and still get a good signal. So you start picking a surrogate variable. +You assume that when the site is down and slow, people are mad, and you make being up and fast a proxy for satisfaction. But then that signal is a bit messy and not super actionable, because it can include user devices or bits of the network you don't control, plus it's hard to measure, so you'll settle for response time at the edge of your infrastructure. This loses fidelity into the signal, but it'll get worse as you suddenly find some teams have more data than others, and they use features differently, so you either need a ton of alarms or fewer messier ones, but you're getting further and further away from whether people are actually satisfied. +This loss of context is a critical part of dealing with systems that are too complex to adequately be represented by a single aggregate. Whenever a signal is useful, an in-depth dive is usually worth it if you are looking to embrace complexity. +The metric is better used to attract your attention than as a target or as something that tells you what to know. Seek to explain and understand the metric first, not to change it. + +![A OSEFW INDICAToR ITSELF USELESS (i ROhJSTCY RAVE GØD Foe A t.JlCELY ](Exported%20image%2020240808113916-17.png) + +As a related concept, if you act on a leading indicator, it stops leading, particularly when it’s influenced by trade-offs. +Metrics that become their own targets and are gamed of course lose meaningfulness; this is one of the most common issues with counting incidents and then debating whether an outage should or shouldn’t be declared in a way that might affect the tally rather than addressing it directly. +But other metrics are of interest as well. If you evaluate your total capacity by some bottleneck’s value, and that this bottleneck is a target of optimization work, you will lose the ability to easily know when or how to scale up because that bottleneck possibly hid something else. This is contributing to a non-negligible portion of our incidents at work I believe. We fix a thing that acted as an implicit blocker and off we go into the great unknown. +Our storage engine's disk storage used to be our main bottleneck. We drove scaling out and rebalancing traffic based on how close we were to heavy usage across multiple partitions. This was a useful signal, but it also drove costs up, and eventually became the target of optimization. +An engineer successfully made our data offloading almost an order of magnitude faster, and eliminated our most glaring scaling issues at the time. Removing this limit however messed with our ability to know when to scale, which then revealed issues with file descriptors, memory, and snapshotting times. +The only good advice I have here is to re-evaluate your metrics often, and change them. I guess there’s also a lesson to be learned that improvements can also cause their own uncertainty and that these successes can themselves lead to destabilizations. +Because we no longer needed to scale out as aggressively and were free to discover new issues, and one of our best improvements to the system in recent memory is therefore also a contributor to a lot of operational challenges. + +![PEOPLE WILL Do WRAT THEY BELIEVE IS USEFUL ](Exported%20image%2020240808113916-18.png) + +Things that people think are useful are possibly going to happen even if you forbid them. If you forbid people from logging onto production hosts, and they truly think they'll need it for emergency situations, they'll make sure there's still a way for it to happen, albeit under a different name. +On the other hand, things that people think are useless are likely to be done in a minimal way with no enthusiasm, such as lying in your timesheets. +This means that writing a procedure means little unless people actually see its value and believe it’s worth following. Conversely, it means that if you can demonstrate the usefulness and make some approaches more usable, they’re likely to get adopted regardless of what is written down as a list of steps or procedures. +A related concept here is one here is that if you are tracking things like action items after an incident reviews and they go in the backlog to die, it may not be that your people are failing to follow through; it might also be that it’s impractical to do so, or it’s could also be that these action items were never feeling useful, and the process itself needs to be revisited rather than reinforced. +Seeing non-compliance is not necessarily a sign of bad workers. It may rather be a sign of a bad understanding of the workers' challenges, and point to a need to adjust how work is prescribed. +Getting a small real buy-in into something voluntary may be better than getting fake buy-in into something you’re forcing people to do. Of course if you manage to write a good procedure that people believe are worth following, more power to you, this is going great. + +![A TEAM Yao.) RANDN PEOPLE ](Exported%20image%2020240808113916-19.png) + +The shortest feedback loop may be attained by giving people the tools to make the right decisions right there and then, and let them do it. Cut the middlemen, including yourself. +How do you make that work? We come back to goal alignments and top priorities being harmonized and well understood. If the pressures and goals are understood better, the decisions made also work better. +That does mean that you have to listen back about how these things have been going, and that not only do you need to trust your people, but they need to trust you back with critical and unpleasant information as well. The feedback flows both ways, and this hinges on psychological safety. +If you've ever talked to a contractor asked to help a big organization, the first thing they'll tell you they do is go talk to the workers with boots on the ground, and ask them what they think needs changing. They'll often have years of potential improvements backlogged, and that they're ready to tell anyone about. Either because management wouldn't listen to it, or because the workers lost trust that voicing that feedback would yield any result. +Then the contractor brings it up to management as a neutral party, and suddenly it gets listened to and acted upon. +If you've lost that trust, then contractors can play that specific role of workers at the periphery of the organization helping drive change, and they can play a very useful function. +But if you have that trust already, maintaining it is crucial because that’s how you get all the good information to help orient and influence things. +Trust also means that if you want people to be innovative, you have to allow them to make mistakes. You can’t get it right the first time all the time; if people can’t be allowed to get it wrong here and there, they won’t be allowed to improve and try new things either. + +![Mow To EMBRACE COMPLEXITY? QADE-OFFs FVk1kJG KEEP EEDBACk LOPS TIGHT HAC— — H OVER ](Exported%20image%2020240808113916-20.png) + +Finally, let's look at shifting perspective away from a bare analysis and onto a more systemic point of view. People in specific teams often have a more detailed expert view than you could either have, but if you're standing outside of it, your strength might be to understand how the parts interact in a way that isn't visible to the inside. + +![ITS HARD WITHOUT CHANGING TE PRESSES MT @STEe ](Exported%20image%2020240808113916-21.png) + +The most basic point here is that you can’t expect to change the outcome of these small little decisions that accumulate all the time if you never address the pressures within the system that foster them. +I used to try and weed my lawn a whole hell of a lot and pull the weeds hours a week until someone explained to me that weeds grew easier in the type of soil I had (poor, dry, unmaintained soil) than grass, and pulling the weeds wasn’t the way to go, I needed to actually make the soil good for the grass to crowd out the weeds. +It's similar when considering this whole idea of root cause analysis—of trying to find the one source of the problem and removing it. If your root cause is at the weed’s level, you’ll keep pulling on them forever and will rarely make decent progress. The weeds will keep growing no matter how many roots you remove. +If you foster good soil, if you create the right environment that encourages the type of behavior you want instead of the type of behaviour you dislike, you have hopes that the good stuff will crowd out the bad stuff. That’s a roundabout way of talking about culture change. And for these, deep dives based on [richer narratives](https://ferd.ca/notes/paper-accident-report-interpretation.html) and [thematic analysis](https://www.jeli.io/howie/welcome) prove more useful. +Also there's a warning here about trying to change the decisions your people make with carrots and sticks—with incentives. They are not going to fundamentally change what pressures the employees negotiate. The pressures stay the same, all you're doing is adding more of them, either in the form of rewards or punishments, which makes decision-making more complex and trickier. +Chances are people will keep making the same decisions as they were already, but then they'll report it differently to either get their bonus or to avoid getting penalized for it. Surfacing, understanding, and clarifying goal conflicts can make things easier or shape work to give them more room. Adding carrots and sticks can make things harder. + +![ITS HARD TO WITHOUT CHANGING TE PRESS)ES MT @STEe ](Exported%20image%2020240808113916-22.png) + +But the tip here is probably: look into what are the behaviors you want to see happen, and give them room to grow. +My most successful initiative at Honeycomb is probably creating [weekly discussion sessions about operational stuff and on-call](https://www.honeycomb.io/blog/oncallogy-sessions-best-practices). They range from “how do we operate new service X” into trickier discussions like “is it okay to be visibly angry in an incident”, “how do you deal with shit you don’t know or avoid burnout” or “are there times where code freezes are actually a useful thing?”. +Over time we looked into all sorts of weird interactions and the meeting became its own tool. +When we noticed incident reviews were difficult to schedule across departments and timezones, we decided that a good wide incident review is good operational talk and started making the optional time slot, which was already on every engineer's calendar (and some other departments too), available for them. It became easier for people to run incident reviews, and over time their size grew from 7-8 people, scoped to 1 or 2 teams, to bigger events with 20 to 40 people in them. +We removed a huge but subtle blocker to good feedback loops existing within the organization. +These sorts of small changes are those you can drive locally with almost no risk of having them run afoul of organizational priorities, and when you see them work, use the org structure to expand them everywhere. + +![IODICATOR IS VSEFUL WH24 IS AcTED ON -12. 70.710/ o 94.13% ](Exported%20image%2020240808113916-23.png) + +I find it useful to keep focusing on what an indicator triggers as a behavior (the interaction) rather than _only_ what it reports directly. This slide here is 4 error budgets from our SLOs, which combine how successful requests are both in terms of speed and errors, compared to an objective we express in terms of the desired fault rate. +When we have to pick targets for our platform, people often ask whether we could pick some key SLOs and turn them as the objective. My answer is almost always "I don't care if we meet the SLOs or not". I mean I care, but not like that. +SLOs aren’t hard and fast rules. When the error budget is empty, the main thing that matters to me is that we have a conversation about it, and decide what it is we want to happen from there on. Are we going to hold off on deploys and experiments? Are we able to meet the objectives while on-call, with some schedule corrective work, some major re-architecting? Can we just talk to the customers? Were our targets too ambitious or are we going to eat dirt for a while? +Kneejerk automated reactions aren’t nearly as useful as sitting down and having a cross-departmental discussion about what it is we want to do, as an organization, about these signals of unmet expectations. If it fits within on-call duty, like what is probably the case with the error budget on the top left, then fine. +But in other cases, such as the top right budget here, which seems to show a gradual decline, owe have to choose whether to do corrective work (and how/when) to meet the SLO—because that wasn't expected and is undesirable—or maybe to relax it—because that's actually a natural consequence of new more expensive features and we need to tweak definitions. Or we could temporarily ignore it because corrective work is already on the way, but not a top priority right now. +The two budgets at the bottom come from SLOs that may never page anyone. But from time to time, we re-calibrate them by asking support whether there are any issues users complain about that we aren't already aware of. So long as we're ahead of the complaints, we figure the SLOs are properly defined. But from time to time, we find out that we slipped by getting comments on things our alerting never properly captured. Or maybe we needed to better manage the user's expectations—that's also an option. +For any of these choices, we also have to know how this is going to be communicated to users and customers, and having these discussions is the true value of SLOs to me. SLOs that flow outside of engineering teams provide a greater feedback loop about our practices, further upstream, than those that are used exclusively by the teams defining them, regardless of their use for alerting. + +![BE THE FEEDBACK Loop ](Exported%20image%2020240808113916-24.png) + +Finally, this is where SREs can be placed in a great way to shine. You can be away from the central roles, away from the decision-making, on the periphery. By being outside of silos and floating around the organization’s structure, you are allowed to take information from many levels, carry it around, and really tie the loop at the end of so many decisions made in the organization by noting and carrying their impact back once they’ve hit a production system. +It is an iterative exercise, our sociotechnical systems are alive, and carrying pertinent signals and amplifying them, you can influence how long it’s gonna take before it all goes to hell anyway. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Done Reading/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md b/OneNote/Ben's Notebook/Reading/Done Reading/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md new file mode 100644 index 0000000..b00b834 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Done Reading/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md @@ -0,0 +1,43 @@ +Clipped from: [https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90](https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90) + +## The move from a distributed microservices architecture to a monolith application helped achieve higher scale, resilience, and reduce costs. + +At Prime Video, we offer thousands of live streams to our customers. To ensure that customers seamlessly receive content, Prime Video set up a tool to monitor every stream viewed by customers. This tool allows us to automatically identify perceptual quality issues (for example, block corruption or audio/video sync problems) and trigger a process to fix them. +Our Video Quality Analysis (VQA) team at Prime Video already owned a tool for audio/video quality inspection, but we never intended nor designed it to run at high scale (our target was to monitor thousands of concurrent streams and grow that number over time). While onboarding more streams to the service, we noticed that running the infrastructure at a high scale was very expensive. We also noticed scaling bottlenecks that prevented us from monitoring thousands of streams. So, we took a step back and revisited the architecture of the existing service, focusing on the cost and scaling bottlenecks. +The initial version of our service consisted of distributed components that were orchestrated by [AWS Step Functions](https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html). The two most expensive operations in terms of cost were the orchestration workflow and when data passed between distributed components. To address this, we moved all components into a single process to keep the data transfer within the process memory, which also simplified the orchestration logic. Because we compiled all the operations into a single process, we could rely on scalable [Amazon Elastic Compute Cloud (Amazon EC2)](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html) and [Amazon Elastic Container Service (Amazon ECS)](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html) instances for the deployment. + +### **Distributed systems overhead** + +Our service consists of three major components. The media converter converts input audio/video streams to frames or decrypted audio buffers that are sent to detectors. Defect detectors execute algorithms that analyze frames and audio buffers in real-time looking for defects (such as video freeze, block corruption, or audio/video synchronization problems) and send real-time notifications whenever a defect is found. For more information about this topic, see our [How Prime Video uses machine learning to ensure video quality](https://www.primevideotech.com/computer-vision/how-prime-video-uses-machine-learning-to-ensure-video-quality) article. The third component provides orchestration that controls the flow in the service. +We designed our initial solution as a distributed system using serverless components (for example, AWS Step Functions or [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html)), which was a good choice for building the service quickly. In theory, this would allow us to scale each service component independently. However, the way we used some components caused us to hit a hard scaling limit at around 5% of the expected load. Also, the overall cost of all the building blocks was too high to accept the solution at a large scale. +The following diagram shows the serverless architecture of our service. + +![The diagram shows a control plane and data plan in the initial architecture. The customer's request is handled by a lambda function that is then forwarded to relevant step functions that execute detectors. At the same time, Media Conversion service starts processing the input stream, providing artifacts to detectors through an S3 bucket. Once the analysis is completed, the aggregated result is being stored in an S3 bucket.](Exported%20image%2020240808113914-0.png) + +**The initial architecture of our defect detection system.** +The main scaling bottleneck in the architecture was the orchestration management that was implemented using AWS Step Functions. Our service performed multiple state transitions for every second of the stream, so we quickly reached account limits. Besides that, AWS Step Functions charges users per state transition. +The second cost problem we discovered was about the way we were passing video frames (images) around different components. To reduce computationally expensive video conversion jobs, we built a microservice that splits videos into frames and temporarily uploads images to an [Amazon Simple Storage Service (Amazon S3)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) bucket. Defect detectors (where each of them also runs as a separate microservice) then download images and processed it concurrently using AWS Lambda. However, the high number of Tier-1 calls to the S3 bucket was expensive. + +### **From distributed microservices to a monolith application** + +To address the bottlenecks, we initially considered fixing problems separately to reduce cost and increase scaling capabilities. We experimented and took a bold decision: we decided to rearchitect our infrastructure. +We realized that distributed approach wasn’t bringing a lot of benefits in our specific use case, so we packed all of the components into a single process. This eliminated the need for the S3 bucket as the intermediate storage for video frames because our data transfer now happened in the memory. We also implemented orchestration that controls components within a single instance. +The following diagram shows the architecture of the system after migrating to the monolith. + +![The diagram represents a control and data plan for the updated architecture. All the components run within a single ECS task, therefore the control doesn't go through the network. Data sharing is done through instance memory and only the final results are uploaded to an S3 bucket.](Exported%20image%2020240808113914-1.png) + +**The updated architecture for monitoring a system with all components running inside a single Amazon ECS task.** +Conceptually, the high-level architecture remained the same. We still have exactly the same components as we had in the initial design (media conversion, detectors, or orchestration). This allowed us to reuse a lot of code and quickly migrate to a new architecture. +In the initial design, we could scale several detectors horizontally, as each of them ran as a separate microservice (so adding a new detector required creating a new microservice and plug it in to the orchestration). However, in our new approach the number of detectors only scale vertically because they all run within the same instance. Our team regularly adds more detectors to the service and we already exceeded the capacity of a single instance. To overcome this problem, we cloned the service multiple times, parametrizing each copy with a different subset of detectors. We also implemented a lightweight orchestration layer to distribute customer requests. +The following diagram shows our solution for deploying detectors when the capacity of a single instance is exceeded. + +![Customer's request is being forwarded by a lambda function to relevant ECS tasks. The result for each detector is stored in S3 bucket separately.](Exported%20image%2020240808113914-2.png) + +**Our approach for deploying more detectors to the service.** + +### **Results and takeaways** + +Microservices and serverless components are tools that do work at high scale, but whether to use them over monolith has to be made on a case-by-case basis. +Moving our service to a monolith reduced our infrastructure cost by over 90%. It also increased our scaling capabilities. Today, we’re able to handle thousands of streams and we still have capacity to scale the service even further. Moving the solution to Amazon EC2 and Amazon ECS also allowed us to use the [Amazon EC2 compute saving plans](https://aws.amazon.com/savingsplans/compute-pricing/) that will help drive costs down even further. +Some decisions we’ve taken are not obvious but they resulted in significant improvements. For example, we replicated a computationally expensive media conversion process and placed it closer to the detectors. Whereas running media conversion once and caching its outcome might be considered to be a cheaper option, we found this not be a cost-effective approach. +The changes we’ve made allow Prime Video to monitor all streams viewed by our customers and not just the ones with the highest number of viewers. This approach results in even higher quality and an even better customer experience. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Done Reading/Struggling Boy Finds Hope, Purpose, and Self-Worth through Trail Life Mentors.md b/OneNote/Ben's Notebook/Reading/Done Reading/Struggling Boy Finds Hope, Purpose, and Self-Worth through Trail Life Mentors.md new file mode 100644 index 0000000..ffa0e4c --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Done Reading/Struggling Boy Finds Hope, Purpose, and Self-Worth through Trail Life Mentors.md @@ -0,0 +1,21 @@ +Clipped from: [https://blog.traillifeusa.com/boy-finds-hope?utm_campaign=Raising%20Godly%20Boys&utm_medium=email&_hsmi=220415115&_hsenc=p2ANqtz-9wOKKcP8ywC8lxPGr9wAs3lzk6NsuStGaUd8Jw9bL9FQtvKma9aP_6LMzlBiba-jFHNF60TmvQ-95DT6tkKo_m8gvHig&utm_content=220415115&utm_source=hs_automation](https://blog.traillifeusa.com/boy-finds-hope?utm_campaign=Raising%20Godly%20Boys&utm_medium=email&_hsmi=220415115&_hsenc=p2ANqtz-9wOKKcP8ywC8lxPGr9wAs3lzk6NsuStGaUd8Jw9bL9FQtvKma9aP_6LMzlBiba-jFHNF60TmvQ-95DT6tkKo_m8gvHig&utm_content=220415115&utm_source=hs_automation) + +![Struggling Boy Finds Hope, Purpose, and Self-Worth through Trail Life Mentors](Exported%20image%2020240808113917-0.jpeg) + +**Trail Life mentors inspire young boy not only to find the will to live, but to help others around him** +  +In a society where the lines between masculine and feminine are constantly blurred, brash boyish bluster and boisterousness is losing its place. Feeling unappreciated, too boys are losing their identity. Traditional needs like physical challenge, competition, risk-taking, action, and adventure are being discounted and boys seeking to fill these needs are punished, diagnosed, or written off as unruly, difficult, or perhaps toxic. +Trail Life USA, the largest Christ-centered, boy-focused scout-type organization in the country, is familiar with this struggle for boys and can provide a solution. In the fight to provide boys with unique programming that celebrates boyhood, Trail Life utilizes outdoor adventure and personal relationships to speak to the heart of a boy and and to guide him in his walk with Christ. +Mark Hancock, Trail Life CEO, commented, _“When boys feel like they are relegated as ‘less than’ due to unappreciated gender differences, they begin to wonder where they belong in a society that seems to discount their abilities. Trail Life USA provides a boy-focused program and activities designed to let boys be boys, accentuating their strengths and allowing them to feel understood and appreciated.”_ +_Hancock continued, “It seems everywhere a boy goes, he’s expected to comply with unrealistic social norms. The consistent message he gets is that he needs to ‘sit still, be quiet, do what he is told, and behave like the girls.’ But boys are not defective girls. They are created differently on purpose for a purpose. Properly channeled and intentionally challenged, the exuberance, drive, and daring of healthy boys is exactly what our society needs.”_ + +[![New call-to-action](Exported%20image%2020240808113917-1.jpeg)](https://blog.traillifeusa.com/cs/c/?cta_guid=ae0cca4b-12ee-44b5-9522-ea34bcd24e9e&signature=AAH58kHdz_P7HD13orXjY97P9tTqTGFjMw&pageId=77377023317&placement_guid=fe90369d-b6b8-4f68-9fc0-b6d63f14044c&click=19d2745d-b484-4784-8cde-ecde604c2e2a&hsutk=&canon=https%3A%2F%2Fblog.traillifeusa.com%2Fboy-finds-hope&portal_id=6459804&redirect_url=APefjpGnipquSbf2uJG8qs097FtoxGreH-0PhQnuOewllWKAO8ER1syjqeWtpneVenoGaHglMjK-_DfDkJUb2mKP7Sb3d5-H0WCHgYDmgDyzI-ZHx59iF80L-97IR8vDn99tCMt7ezx2Rj6p4CLK-nYdn7aZHiWVcw) + +In a system that fails to acknowledge that boys are not just like girls, [boys are increasingly diagnosed with disorders](https://www.understood.org/articles/en/do-boys-have-learning-and-thinking-differences-more-often-than-girls) and are [falling behind their female counterparts](https://www.brookings.edu/blog/up-front/2021/01/12/the-unreported-gender-gap-in-high-school-graduation-rates/) in nearly every academic category. This trend continues into [college where 60% of students are female](https://www.usatoday.com/story/opinion/2021/10/09/boys-falling-behind-how-schools-must-change-help-young-males/5913463001/). Even more tragic than the academic difficulty is the impact on the mental health of boys and men. Today, men account for [four out of five suicides in America](https://www.cdc.gov/nchs/products/databriefs/db373.htm#:~:text=In%2520both%2520urban%2520and%2520rural%2520areas%252C%2520suicide%2520rates%2520for%2520males,(30.7%2520compared%2520with%25208.0).) and twice the [drug-related deaths](https://news.wttw.com/2021/10/25/us-overdose-deaths-surge-all-time-high) as compared to women. The most rapidly growing suicide rate demographic is boys from the [ages of ten to 14](https://www.bloomberg.com/news/articles/2021-11-03/u-s-suicides-fall-for-second-year-in-a-row-during-pandemic). One mother recently wrote to share how her son was almost one of these statistics: +_“Dealing with ADHD, depression, and anxiety, my son was struggling at school and at home. Daily outbursts, disciplinary problems, and panic attacks forced us as parents to make the hard decision to pull him out of traditional school. A constant cycle of being in trouble with teachers, church leaders, and parents left him questioning his own value. At ten years of age, he decided that he was so broken and hopeless that the world would be better off without him. Last October, he attempted to take his own life and was admitted to the emergency room at the children’s hospital because of injuries sustained in that attempt_. +_“Then my son began attending_ _Trail Life__. It was the first time that he felt understood and accepted by authority figures (the_ **Trail Life** _leaders). In a world that had always attempted to squash his character, he has been encouraged to see a purpose in his ‘boy-ness.’ He has heard consistently that God created him the way he is and that he is loved. He has been encouraged that the future holds a purpose for him — one that will utilize his courage, his sensitivity, and his passion. He has been inspired intellectually and spiritually. Most importantly, he feels part of a community where he respects and admires the leaders, and has friends.”_  +In the active learning environment at **Trail Life**, her son has been able to shine. In the past six months, he has been hiking and camping, learned first aid, become proficient in lighting a fire without a match, and built rockets with his Troop.  +The mother commented on these skills her son learned at Trail Life, stating, _“Because my son learned first aid with his Troop, I still have both of my children. Last Sunday, I was driving on the freeway when my daughter, who is two years old, choked on a snack. She couldn’t breathe. I was stuck driving in traffic in the HOV lane, where I couldn’t pull over. My son was able to use the skills he learned at Trail Life_ _to give his sister the Heimlich maneuver, and she coughed up food and was able to breathe. He saved her life and displayed the level-headed, calm, and confident skills he needed to save his sister. I am so proud of him, and so thankful for Trail Life."_ +_“Even his father is seeing a tremendous difference. Before my son’s attempted suicide, they had become so estranged they were barely able to talk. When he was presented with the Life Saving Award from Trail Life,_ _his dad was able to attend and publicly commend his son. The young man who had been labeled as troublesome, difficult, and delinquent by so many is now being commended, affirmed, accepted, and encouraged by his Troop, his community, and his father.”_ +_“Many sons never hear words of affirmation, acceptance, and encouragement from their father. I want to thank the men of the Troop who have poured themselves into my son and our family. Because of your intervention and effort, a relationship that was broken has been dramatically healed and turned around.”_ +The mother concluded, _“Trail Life is m__aking a real difference in the lives of boys and their fathers.”_ \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Done Reading/What is a Boy.md b/OneNote/Ben's Notebook/Reading/Done Reading/What is a Boy.md new file mode 100644 index 0000000..b27fe9b --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Done Reading/What is a Boy.md @@ -0,0 +1,13 @@ +Clipped from: [https://blog.traillifeusa.com/what-is-a-boy?utm_campaign=Raising%20Godly%20Boys&utm_medium=email&_hsmi=219419808&_hsenc=p2ANqtz-9tkiaPng4HKJvYRy6Ee8wBSX_GRpZ-nKWnj4tZJxJ13W0R00aCDx3IevUfMoI2iUWmB4GMzcGgFwHTSSQIWosWfF_FPw&utm_content=219419808&utm_source=hs_automation](https://blog.traillifeusa.com/what-is-a-boy?utm_campaign=Raising%20Godly%20Boys&utm_medium=email&_hsmi=219419808&_hsenc=p2ANqtz-9tkiaPng4HKJvYRy6Ee8wBSX_GRpZ-nKWnj4tZJxJ13W0R00aCDx3IevUfMoI2iUWmB4GMzcGgFwHTSSQIWosWfF_FPw&utm_content=219419808&utm_source=hs_automation) + +![What is a Boy?](Exported%20image%2020240808113917-0.jpeg) + +Between the innocence of babyhood and the dignity of manhood we find a delightful creature called a boy. Boys come in assorted sizes, weights, and colors, but all boys have the same creed: to enjoy every second of every minute of every hour of every day and to protest with noise (their only weapon) when their last minute is finished and the adult males pack them off to bed at night. +Boys are found everywhere—on top of, underneath, inside of, climbing on, swinging from, running around, or jumping to. +Mothers love them, little girls hate them, older sisters and brothers tolerate them, adults ignore them, and Heaven protects them. +A boy is truth with dirt on its face, beauty with a cut on its finger, wisdom with bubble gum in its hair, and the hope of the future with a frog in its pocket. When you are busy, a boy is an inconsiderate, bothersome, intruding jangle of noise. When you want him to make a good impression, his brain turns to jelly or else he becomes a savage, sadistic, jungle creature bent on destroying the world and himself with it. +A boy is a composite—he has the appetite of a horse, the digestion of a sword-swallower, the energy of a pocket-sized atomic bomb, the curiosity of a cat, the lungs of a dictator, the imagination of a Paul Bunyan, the shyness of a violet, the audacity of a steel trap, the enthusiasm of a firecracker, and when he makes something, he has five thumbs on each hand. He likes ice cream, knives, saws, Christmas, comic books, the boy across the street, woods, water (in its natural habitat), large animals, Dad, trains, Saturday mornings, and fire engines. +He is not much for Sunday School, company, schools, books without pictures, music lessons, neckties, barbers, girls, overcoats, adults, or bedtime. Nobody else is so early to rise, or so late to supper. Nobody else gets so much fun out of trees, dogs, and breezes. Nobody else can cram into one pocket a rusty knife, a half-eaten apple, three feet of string, an empty Bull Durham sack, two gum drops, six cents, a slingshot, a chunk of unknown substance, and a genuine supersonic code ring with a secret compartment. +A boy is a magical creature—you can lock him out of your workshop, but you can’t lock him out of your heart. You can get him out of your study, but you can’t get him out of your mind. Might as well give up—he is your captor, your jailer, your boss, and your master—a freckled-faced, pint-sized, cat-chasing, bundle of noise. But when you come home at night with only shattered pieces of your hopes and dreams, he can mend them like new with two magic words, "Hi Dad!" +--- +[Trail Life USA](http://www.traillifeusa.com/) is designed uniquely for boys. Established on timeless values and set in the context of outdoor adventure, boys from Kindergarten through 12th grade are engaged in a Troop setting by male mentors where they are challenged to grow in character, understand their purpose, serve their community, and develop practical leadership skills to carry out the mission for which they were created. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/2020-01-31 Tech Talk - Michael Sterling - Royalties - Faithlife Coders - Amber.md b/OneNote/Ben's Notebook/Reading/Read Later/2020-01-31 Tech Talk - Michael Sterling - Royalties - Faithlife Coders - Amber.md new file mode 100644 index 0000000..0e018d5 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/2020-01-31 Tech Talk - Michael Sterling - Royalties - Faithlife Coders - Amber.md @@ -0,0 +1,3 @@ +| | | +|---|---| +|![thumbnail](Exported%20image%2020240808113925-0.png)|\| \|
    \|---\|
    \|## 2020-01-31 Tech Talk - Michael Sterling - Royalties - Faithlife Coders - Amber\|
    \|[https://amber.faithlife.com/shares/921WWa1mhUUOlewF](https://amber.faithlife.com/shares/921WWa1mhUUOlewF)\|
    \|Royalties Tech Talk Slides: [https://docs.google.com/presentation/d/1UERbx5Op1upek32_TCBuXRPgIKtZkXjmWQM6IyEzCSA/edit#slide=id.g7d0408af6d_2_93](https://docs.google.com/presentation/d/1UERbx5Op1upek32_TCBuXRPgIKtZkXjmWQM6IyEzCSA/edit#slide=id.g7d0408af6d_2_93)...\|| \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md b/OneNote/Ben's Notebook/Reading/Read Later/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md new file mode 100644 index 0000000..70cb2af --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/Applied LLMs - What We’ve Learned From A Year of Building with LLMs.md @@ -0,0 +1,415 @@ +Clipped from: [https://applied-llms.org/](https://applied-llms.org/) +A practical guide to building successful LLM products. +Authors +[Eugene Yan](https://eugeneyan.com/) +[Bryan Bischof](https://www.linkedin.com/in/bryan-bischof/) +[Charles Frye](https://www.linkedin.com/in/charles-frye-38654abb/) +[Hamel Husain](https://hamel.dev/) +[Jason Liu](https://jxnl.co/) +[Shreya Shankar](https://www.sh-reya.com/) +Published +June 8, 2024 +Also published on O’Reilly Media in three parts: [Tactical](https://www.oreilly.com/radar/what-we-learned-from-a-year-of-building-with-llms-part-i/), [Operational](https://www.oreilly.com/radar/what-we-learned-from-a-year-of-building-with-llms-part-ii/), Strategic (pending). +It’s an exciting time to build with large language models (LLMs). Over the past year, LLMs have become “good enough” for real-world applications. And they’re getting better and cheaper every year. Coupled with a parade of demos on social media, there will be an [estimated $200B investment in AI by 2025](https://www.goldmansachs.com/intelligence/pages/ai-investment-forecast-to-approach-200-billion-globally-by-2025.html). Furthermore, provider APIs have made LLMs more accessible, allowing everyone, not just ML engineers and scientists, to build intelligence into their products. Nonetheless, while the barrier to entry for building with AI has been lowered, creating products and systems that are effective—beyond a demo—remains deceptively difficult. +We’ve spent the past year building, and have discovered many sharp edges along the way. While we don’t claim to speak for the entire industry, we’d like to share what we’ve learned to help you avoid our mistakes and iterate faster. These are organized into three sections: + +- [Tactical](https://applied-llms.org/#tactical-nuts--bolts-of-working-with-llms): Some practices for prompting, RAG, flow engineering, evals, and monitoring. Whether you’re a practitioner building with LLMs, or hacking on weekend projects, this section was written for you. +- [Operational](https://applied-llms.org/#operation-day-to-day-and-org-concerns): The organizational, day-to-day concerns of shipping products, and how to build an effective team. For product/technical leaders looking to deploy sustainably and reliably. +- Strategic: The long-term, big-picture view, with opinionated takes such as “no GPU before PMF” and “focus on the system not the model”, and how to iterate. Written with founders and executives in mind. + +We intend to make this a practical guide to building successful products with LLMs, drawing from our own experiences and pointing to examples from around the industry. +Ready to ~~delve~~ dive in? Let’s go. + +# 1 Tactical: Nuts & bolts of working with LLMs + +Here, we share best practices for core components of the emerging LLM stack: prompting tips to improve quality and reliability, evaluation strategies to assess output, retrieval-augmented generation ideas to improve grounding, how to design human-in-the-loop workflows, and more. While the technology is still nascent, we trust these lessons are broadly applicable and can help you ship robust LLM applications. + +## 1.1 Prompting + +We recommend starting with prompting when prototyping new applications. It’s easy to both underestimate and overestimate its importance. It’s underestimated because the right prompting techniques, when used correctly, can get us very far. It’s overestimated because even prompt-based applications require significant engineering around the prompt to work well. + +### 1.1.1 Focus on getting the most out of fundamental prompting techniques + +A few prompting techniques have consistently helped with improving performance across a variety of models and tasks: n-shot prompts + in-context learning, chain-of-thought, and providing relevant resources. +The idea of in-context learning via n-shot prompts is to provide the LLM with examples that demonstrate the task and align outputs to our expectations. A few tips: + +- If n is too low, the model may over-anchor on those specific examples, hurting its ability to generalize. As a rule of thumb, aim for n ≥ 5. Don’t be afraid to go as high as a few dozen. + +- Examples should be representative of the prod distribution. If you’re building a movie summarizer, include samples from different genres in roughly the same proportion you’d expect to see in practice. + +- You don’t always need to provide the input-output pairs; examples of desired outputs may be sufficient. + +- If you plan for the LLM to use tools, include examples of using those tools. + +In Chain-of-Thought (CoT) prompting, we encourage the LLM to explain its thought process before returning the final answer. Think of it as providing the LLM with a sketchpad so it doesn’t have to do it all in memory. The original approach was to simply add the phrase “Let’s think step by step” as part of the instructions, but, we’ve found it helpful to make the CoT more specific, where adding specificity via an extra sentence or two often reduces hallucination rates significantly. +For example, when asking an LLM to summarize a meeting transcript, we can be explicit about the steps: + +- First, list out the key decisions, follow-up items, and associated owners in a sketchpad. + +- Then, check that the details in the sketchpad are factually consistent with the transcript. + +- Finally, synthesize the key points into a concise summary. + +Note that in recent times, [some doubt](https://arxiv.org/abs/2405.04776) has been cast on if this technique is as powerful as believed. Additionally, there’s significant debate as to exactly what is going on during inference when Chain-of-Thought is being used. Regardless, this technique is one to experiment with when possible. +Providing relevant resources is a powerful mechanism to expand the model’s knowledge base, reduce hallucinations, and increase the user’s trust. Often accomplished via Retrieval Augmented Generation (RAG), providing the model with snippets of text that it can directly utilize in its response is an essential technique. When providing the relevant resources, it’s not enough to merely include them; don’t forget to tell the model to prioritize their use, refer to them directly, and to mention when none of the resources are sufficient. These help “ground” agent responses to a corpus of resources. + +### 1.1.2 Structure your inputs and outputs + +Structured input and output help models better understand the input as well as return output that can reliably integrate with downstream systems. Adding serialization formatting to your inputs can help provide more clues to the model as to the relationships between tokens in the context, additional metadata to specific tokens (like types), or relate the request to similar examples in the model’s training data. +As an example, many questions on the internet about writing SQL begin by specifying the SQL schema. Thus, you can expect that effective prompting for Text-to-SQL should include [structured schema definitions](https://www.researchgate.net/publication/371223615_SQL-PaLM_Improved_Large_Language_ModelAdaptation_for_Text-to-SQL). +Structured input expresses tasks clearly and resembles how the training data is formatted, increasing the probability of better output. Structured output simplifies integration into downstream components of your system. [Instructor](https://github.com/jxnl/instructor) and [Outlines](https://github.com/outlines-dev/outlines) work well for structured output. (If you’re importing an LLM API SDK, use Instructor; if you’re importing Huggingface for a self-hosted model, use Outlines.) +When using structured input, be aware that each LLM family has their own preferences. Claude prefers while GPT favors Markdown and JSON. With XML, you can even pre-fill Claude’s responses by providing a tag like so. +messages=[ { "role": "user", "content": """Extract the , , , and from this product description into your . The SmartHome Mini is a compact smart home assistant available in black or white for only $49.99. At just 5 inches wide, it lets you control lights, thermostats, and other connected devices via voice or app—no matter where you place it in your home. This affordable little hub brings convenient hands-free control to your smart devices. """ }, { "role": "assistant", "content": "" }] + +### 1.1.3 Have small prompts that do one thing, and only one thing, well + +A common anti-pattern / code smell in software is the “[God Object](https://en.wikipedia.org/wiki/God_object)”, where we have a single class or function that does everything. The same applies to prompts too. +A prompt typically starts simple: A few sentences of instruction, a couple of examples, and we’re good to go. But as we try to improve performance and handle more edge cases, complexity creeps in. More instructions. Multi-step reasoning. Dozens of examples. Before we know it, our initially simple prompt is now a 2,000 token Frankenstein. And to add injury to insult, it has worse performance on the more common and straightforward inputs! GoDaddy shared this challenge as their [No. 1 lesson from building with LLMs](https://www.godaddy.com/resources/news/llm-from-the-trenches-10-lessons-learned-operationalizing-models-at-godaddy#h-1-sometimes-one-prompt-isn-t-enough). +Just like how we strive (read: struggle) to keep our systems and code simple, so should we for our prompts. Instead of having a single, catch-all prompt for the meeting transcript summarizer, we can break it into steps: + +- Extract key decisions, action items, and owners into structured format +- Check extracted details against the original transcription for consistency +- Generate a concise summary from the structured details + +As a result, we’ve split our single prompt into multiple prompts that are each simple, focused, and easy to understand. And by breaking them up, we can now iterate and eval each prompt individually. + +### 1.1.4 Craft your context tokens + +Rethink, and challenge your assumptions about how much context you actually need to send to the agent. Be like Michaelangelo, do not build up your context sculpture—chisel away the superfluous material until the sculpture is revealed. RAG is a popular way to collate all of the potentially relevant blocks of marble, but what are you doing to extract what’s necessary? +We’ve found that taking the final prompt sent to the model—with all of the context construction, and meta-prompting, and RAG results—putting it on a blank page and just reading it, really helps you rethink your context. We have found redundancy, self-contradictory language, and poor formatting using this method. +The other key optimization is the structure of your context. If your bag-of-docs representation isn’t helpful for humans, don’t assume it’s any good for agents. Think carefully about how you structure your context to underscore the relationships between parts of it and make extraction as simple as possible. +More [prompting fundamentals](https://eugeneyan.com/writing/prompting/) such as prompting mental model, prefilling, context placement, etc. + +## 1.2 Information Retrieval / RAG + +Beyond prompting, another effective way to steer an LLM is by providing knowledge as part of the prompt. This grounds the LLM on the provided context which is then used for in-context learning. This is known as retrieval-augmented generation (RAG). Practitioners have found RAG effective at providing knowledge and improving output, while requiring far less effort and cost compared to finetuning. + +### 1.2.1 RAG is only as good as the retrieved documents’ relevance, density, and detail + +The quality of your RAG’s output is dependent on the quality of retrieved documents, which in turn can be considered along a few factors +The first and most obvious metric is relevance. This is typically quantified via ranking metrics such as [Mean Reciprocal Rank (MRR)](https://en.wikipedia.org/wiki/Mean_reciprocal_rank) or [Normalized Discounted Cumulative Gain (NDCG)](https://en.wikipedia.org/wiki/Discounted_cumulative_gain). MRR evaluates how well a system places the first relevant result in a ranked list while NDCG considers the relevance of all the results and their positions. They measure how good the system is at ranking relevant documents higher and irrelevant documents lower. For example, if we’re retrieving user summaries to generate movie review summaries, we’ll want to rank reviews for the specific movie higher while excluding reviews for other movies. +Like traditional recommendation systems, the rank of retrieved items will have a significant impact on how the LLM performs on downstream tasks. To measure the impact, run a RAG-based task but with the retrieved items shuffled—how does the RAG output perform? +Second, we also want to consider information density. If two documents are equally relevant, we should prefer one that’s more concise and has fewer extraneous details. Returning to our movie example, we might consider the movie transcript and all user reviews to be relevant in a broad sense. Nonetheless, the top-rated reviews and editorial reviews will likely be more dense in information. +Finally, consider the level of detail provided in the document. Imagine we’re building a RAG system to generate SQL queries from natural language. We could simply provide table schemas with column names as context. But, what if we include column descriptions and some representative values? The additional detail could help the LLM better understand the semantics of the table and thus generate more correct SQL. + +### 1.2.2 Don’t forget keyword search; use it as a baseline and in hybrid search + +Given how prevalent the embedding-based RAG demo is, it’s easy to forget or overlook the decades of research and solutions in information retrieval. +Nonetheless, while embeddings are undoubtedly a powerful tool, they are not the be-all and end-all. First, while they excel at capturing high-level semantic similarity, they may struggle with more specific, keyword-based queries, like when users search for names (e.g., Ilya), acronyms (e.g., RAG), or IDs (e.g., claude-3-sonnet). Keyword-based search, such as BM25, is explicitly designed for this. Finally, after years of keyword-based search, users have likely taken it for granted and may get frustrated if the document they expect to retrieve isn’t being returned. +Vector embeddings _do not_ magically solve search. In fact, the heavy lifting is in the step before you re-rank with semantic similarity search. Making a genuine improvement over BM25 or full-text search is hard. — [Aravind Srinivas, CEO Perplexity.ai](https://x.com/AravSrinivas/status/1737886080555446552) +We’ve been communicating this to our customers and partners for months now. Nearest Neighbor Search with naive embeddings yields very noisy results and you’re likely better off starting with a keyword-based approach. — [Beyang Liu, CTO Sourcegraph](https://twitter.com/beyang/status/1767330006999720318) +Second, it’s more straightforward to understand why a document was retrieved with keyword search—we can look at the keywords that match the query. In contrast, embedding-based retrieval is less interpretable. Finally, thanks to systems like Lucene and OpenSearch that have been optimized and battle-tested over decades, keyword search is usually more computationally efficient. +In most cases, a hybrid will work best: keyword matching for the obvious matches, and embeddings for synonyms, hypernyms, and spelling errors, as well as multimodality (e.g., images and text). [Shortwave shared how they built their RAG pipeline](https://www.shortwave.com/blog/deep-dive-into-worlds-smartest-email-ai/), including query rewriting, keyword + embedding retrieval, and ranking. + +### 1.2.3 Prefer RAG over fine-tuning for new knowledge + +Both RAG and fine-tuning can be used to incorporate new information into LLMs and increase performance on specific tasks. However, which should we prioritize? +Recent research suggests RAG may have an edge. [One study](https://arxiv.org/abs/2312.05934) compared RAG against unsupervised finetuning (aka continued pretraining), evaluating both on a subset of MMLU and current events. They found that RAG consistently outperformed fine-tuning for knowledge encountered during training as well as entirely new knowledge. In [another paper](https://arxiv.org/abs/2401.08406), they compared RAG against supervised finetuning on an agricultural dataset. Similarly, the performance boost from RAG was greater than fine-tuning, especially for GPT-4 (see Table 20). +Beyond improved performance, RAG has other practical advantages. First, compared to continuous pretraining or fine-tuning, it’s easier—and cheaper!—to keep retrieval indices up-to-date. Second, if our retrieval indices have problematic documents that contain toxic or biased content, we can easily drop or modify the offending documents. Consider it an andon cord for [documents that ask us to add glue to pizza](https://x.com/petergyang/status/1793480607198323196). +In addition, the R in RAG provides finer-grained control over how we retrieve documents. For example, if we’re hosting a RAG system for multiple organizations, by partitioning the retrieval indices, we can ensure that each organization can only retrieve documents from their own index. This ensures that we don’t inadvertently expose information from one organization to another. + +### 1.2.4 Long-context models won’t make RAG obsolete + +With Gemini 1.5 providing context windows of up to 10M tokens in size, some have begun to question the future of RAG. +I tend to believe that Gemini 1.5 is significantly overhyped by Sora. A context window of 10M tokens effectively makes most of existing RAG frameworks unnecessary — you simply put whatever your data into the context and talk to the model like usual. Imagine how it does to all the startups / agents / langchain projects where most of the engineering efforts goes to RAG 😅 Or in one sentence: the 10m context kills RAG. Nice work Gemini — [Yao Fu](https://x.com/Francis_YAO_/status/1758935954189115714) +While it’s true that long contexts will be a game-changer for use cases such as analyzing multiple documents or chatting with PDFs, the rumors of RAG’s demise are greatly exaggerated. +First, even with a context size of 10M tokens, we’d still need a way to select relevant context. Second, beyond the narrow needle-in-a-haystack eval, we’ve yet to see convincing data that models can effectively reason over large context sizes. Thus, without good retrieval (and ranking), we risk overwhelming the model with distractors, or may even fill the context window with completely irrelevant information. +Finally, there’s cost. During inference, the Transformer’s time complexity scales linearly with context length. Just because there exists a model that can read your org’s entire Google Drive contents before answering each question doesn’t mean that’s a good idea. Consider an analogy to how we use RAM: we still read and write from disk, even though there exist compute instances with [RAM running into the tens of terabytes](https://aws.amazon.com/ec2/instance-types/high-memory/). +So don’t throw your RAGs in the trash just yet. This pattern will remain useful even as context sizes grow. + +## 1.3 Tuning and optimizing workflows + +Prompting an LLM is just the beginning. To get the most juice out of them, we need to think beyond a single prompt and embrace workflows. For example, how could we split a single complex task into multiple simpler tasks? When is finetuning or caching helpful with increasing performance and reducing latency/cost? Here, we share proven strategies and real-world examples to help you optimize and build reliable LLM workflows. + +### 1.3.1 Step-by-step, multi-turn “flows” can give large boosts + +It’s common knowledge that decomposing a single big prompt into multiple smaller prompts can achieve better results. For example, [AlphaCodium](https://arxiv.org/abs/2401.08500): By switching from a single prompt to a multi-step workflow, they increased GPT-4 accuracy (pass@5) on CodeContests from 19% to 44%. The workflow includes: + +- Reflecting on the problem +- Reasoning on the public tests +- Generating possible solutions +- Ranking possible solutions +- Generating synthetic tests +- Iterating on the solutions on public and synthetic tests. + +Small tasks with clear objectives make for the best agent or flow prompts. It’s not required that every agent prompt requests structured output, but structured outputs help a lot to interface with whatever system is orchestrating the agent’s interactions with the environment. Some things to try: + +- A tightly-specified, explicit planning step. Also, consider having predefined plans to choose from. +- Rewriting the original user prompts into agent prompts, though this process may be lossy! +- Agent behaviors as linear chains, DAGs, and state machines; different dependency and logic relationships can be more and less appropriate for different scales. Can you squeeze performance optimization out of different task architectures? +- Planning validations; your planning can include instructions on how to evaluate the responses from other agents to make sure the final assembly works well together. +- Prompt engineering with fixed upstream state—make sure your agent prompts are evaluated against a collection of variants of what may have happen before. + +### 1.3.2 Prioritize deterministic workflows for now + +While AI agents can dynamically react to user requests and the environment, their non-deterministic nature makes them a challenge to deploy. Each step an agent takes has a chance of failing, and the chances of recovering from the error are poor. Thus, the likelihood that an agent completes a multi-step task successfully decreases exponentially as the number of steps increases. As a result, teams building agents find it difficult to deploy reliable agents. +A potential approach is to have agent systems produce deterministic plans which are then executed in a structured, reproducible way. First, given a high-level goal or prompt, the agent generates a plan. Then, the plan is executed deterministically. This allows each step to be more predictable and reliable. Benefits include: + +- Generated plans can serve as few-shot samples to prompt or finetune an agent. +- Deterministic execution makes the system more reliable, and thus easier to test and debug. In addition, failures can be traced to the specific steps in the plan. +- Generated plans can be represented as directed acyclic graphs (DAGs) which are easier, relative to a static prompt, to understand and adapt to new situations. + +The most successful agent builders may be those with strong experience managing junior engineers because the process of generating plans is similar to how we instruct and manage juniors. We give juniors clear goals and concrete plans, instead of vague open-ended directions, and we should do the same for our agents too. +In the end, the key to reliable, working agents will likely be found in adopting more structured, deterministic approaches, as well as collecting data to refine prompts and finetune models. Without this, we’ll build agents that may work exceptionally well some of the time, but on average, disappoint users. + +### 1.3.3 Getting more diverse outputs beyond temperature + +Suppose your task requires diversity in an LLM’s output. Maybe you’re writing an LLM pipeline to suggest products to buy from your catalog given a list of products the user bought previously. When running your prompt multiple times, you might notice that the resulting recommendations are too similar—so you might increase the temperature parameter in your LLM requests. +Briefly, increasing the temperature parameter makes LLM responses more varied. At sampling time, the probability distributions of the next token become flatter, meaning that tokens that are usually less likely get chosen more often. Still, when increasing temperature, you may notice some failure modes related to output diversity. For example, some products from the catalog that could be a good fit may never be output by the LLM. The same handful of products might be overrepresented in outputs, if they are highly likely to follow the prompt based on what the LLM has learned at training time. If the temperature is too high, you may get outputs that reference nonexistent products (or gibberish!) +In other words, increasing temperature does not guarantee that the LLM will sample outputs from the probability distribution you expect (e.g., uniform random). Nonetheless, we have other tricks to increase output diversity. The simplest way is to adjust elements within the prompt. For example, if the prompt template includes a list of items, such as historical purchases, shuffling the order of these items each time they’re inserted into the prompt can make a significant difference. +Additionally, keeping a short list of recent outputs can help prevent redundancy. In our recommended products example, by instructing the LLM to avoid suggesting items from this recent list, or by rejecting and resampling outputs that are similar to recent suggestions, we can further diversify the responses. Another effective strategy is to vary the phrasing used in the prompts. For instance, incorporating phrases like “pick an item that the user would love using regularly” or “select a product that the user would likely recommend to friends” can shift the focus and thereby influence the variety of recommended products. + +### 1.3.4 Caching is underrated + +Caching saves cost and eliminates generation latency by removing the need to recompute responses for the same input. Furthermore, if a response has previously been guardrailed, we can serve these vetted responses and reduce the risk of serving harmful or inappropriate content. +One straightforward approach to caching is to use unique IDs for the items being processed, such as if we’re summarizing new articles or [product reviews](https://www.cnbc.com/2023/06/12/amazon-is-using-generative-ai-to-summarize-product-reviews.html). When a request comes in, we can check to see if a summary already exists in the cache. If so, we can return it immediately; if not, we generate, guardrail, and serve it, and then store it in the cache for future requests. +For more open-ended queries, we can borrow techniques from the field of search, which also leverages caching for open-ended inputs. Features like autocomplete, spelling correction, and suggested queries also help normalize user input and thus increase the cache hit rate. + +### 1.3.5 When to finetune + +We may have some tasks where even the most cleverly designed prompts fall short. For example, even after significant prompt engineering, our system may still be a ways from returning reliable, high-quality output. If so, then it may be necessary to finetune a model for your specific task. +Successful examples include: + +- [Honeycomb’s Natural Language Query Assistant](https://www.honeycomb.io/blog/introducing-query-assistant): Initially, the “programming manual” was provided in the prompt together with n-shot examples for in-context learning. While this worked decently, fine-tuning the model led to better output on the syntax and rules of the domain-specific language. +- [Rechat’s Lucy](https://www.youtube.com/watch?v=B_DMMlDuJB0): The LLM needed to generate responses in a very specific format that combined structured and unstructured data for the frontend to render correctly. Fine-tuning was essential to get it to work consistently. + +Nonetheless, while fine-tuning can be effective, it comes with significant costs. We have to annotate fine-tuning data, finetune and evaluate models, and eventually self-host them. Thus, consider if the higher upfront cost is worth it. If prompting gets you 90% of the way there, then fine-tuning may not be worth the investment. However, if we do decide to finetune, to reduce the cost of collecting human-annotated data, we can [generate and finetune on synthetic data](https://eugeneyan.com/writing/synthetic/), or [bootstrap on open-source data](https://eugeneyan.com/writing/finetuning/). + +## 1.4 Evaluation & Monitoring + +Evaluating LLMs can be a minefield. The inputs and the outputs of LLMs are arbitrary text, and the tasks we set them to are varied. Nonetheless, rigorous and thoughtful evals are critical—it’s no coincidence that technical leaders at OpenAI [work on evaluation and give feedback on individual evals](https://twitter.com/eugeneyan/status/1701692908074873036). +Evaluating LLM applications invites a diversity of definitions and reductions: it’s simply unit testing, or it’s more like observability, or maybe it’s just data science. We have found all of these perspectives useful. In the following section, we provide some lessons we’ve learned about what is important in building evals and monitoring pipelines. + +### 1.4.1 Create a few assertion-based unit tests from real input/output samples + +Create [unit tests (i.e., assertions)](https://hamel.dev/blog/posts/evals/#level-1-unit-tests) consisting of samples of inputs and outputs from production, with expectations for outputs based on at least three criteria. While three criteria might seem arbitrary, it’s a practical number to start with; fewer might indicate that your task isn’t sufficiently defined or is too open-ended, like a general-purpose chatbot. These unit tests, or assertions, should be triggered by any changes to the pipeline, whether it’s editing a prompt, adding new context via RAG, or other modifications. This [write-up has an example](https://hamel.dev/blog/posts/evals/#step-1-write-scoped-tests) of an assertion-based test for an actual use case. +Consider beginning with assertions that specify phrases or ideas to either include or exclude in all responses. Also consider checks to ensure that word, item, or sentence counts lie within a range. For other kinds of generation, assertions can look different. [Execution-evaluation](https://www.semanticscholar.org/paper/Execution-Based-Evaluation-for-Open-Domain-Code-Wang-Zhou/1bed34f2c23b97fd18de359cf62cd92b3ba612c3) is a powerful method for evaluating code-generation, wherein you run the generated code and determine that the state of runtime is sufficient for the user-request. +As an example, if the user asks for a new function named foo; then after executing the agent’s generated code, foo should be callable! One challenge in execution-evaluation is that the agent code frequently leaves the runtime in slightly different form than the target code. It can be effective to “relax” assertions to the absolute most weak assumptions that any viable answer would satisfy. +Finally, using your product as intended for customers (i.e., “dogfooding”) can provide insight into failure modes on real-world data. This approach not only helps identify potential weaknesses, but also provides a useful source of production samples that can be converted into evals. + +### 1.4.2 LLM-as-Judge can work (somewhat), but it’s not a silver bullet + +LLM-as-Judge, where we use a strong LLM to evaluate the output of other LLMs, has been met with skepticism by some. (Some of us were initially huge skeptics.) Nonetheless, when implemented well, LLM-as-Judge achieves decent correlation with human judgements, and can at least help build priors about how a new prompt or technique may perform. Specifically, when doing pairwise comparisons (e.g., control vs. treatment), LLM-as-Judge typically gets the direction right though the magnitude of the win/loss may be noisy. +Here are some suggestions to get the most out of LLM-as-Judge: - Use pairwise comparisons: Instead of asking the LLM to score a single output on a [Likert](https://en.wikipedia.org/wiki/Likert_scale) scale, present it with two options and ask it to select the better one. This tends to lead to more stable results. - Control for position bias: The order of options presented can bias the LLM’s decision. To mitigate this, do each pairwise comparison twice, swapping the order of pairs each time. Just be sure to attribute wins to the right option after swapping! - Allow for ties: In some cases, both options may be equally good. Thus, allow the LLM to declare a tie so it doesn’t have to arbitrarily pick a winner. - Use Chain-of-Thought: Asking the LLM to explain its decision before giving a final preference can increase eval reliability. As a bonus, this allows you to use a weaker but faster LLM and still achieve similar results. Because frequently this part of the pipeline is in batch mode, the extra latency from CoT isn’t a problem. - Control for response length: LLMs tend to bias toward longer responses. To mitigate this, ensure response pairs are similar in length. +One particularly powerful application of LLM-as-Judge is checking a new prompting strategy against regression. If you have tracked a collection of production results, sometimes you can rerun those production examples with a new prompting strategy, and use LLM-as-Judge to quickly assess where the new strategy may suffer. +Here’s an example of a [simple but effective approach](https://hamel.dev/blog/posts/evals/#automated-evaluation-w-llms) to iterate on LLM-as-Judge, where we simply log the LLM response, judge’s critique (i.e., CoT), and final outcome. They are then reviewed with stakeholders to identify areas for improvement. Over three iterations, agreement with human and LLM improved from 68% to 94%! + +![c model response {"calculations":[{"column":"dur MAX" ","op":"does-not-exist","join_c olumn":" "orders" order" limit" model critque The response is nearly correct, as it is looking for the slowest trace by using and ordering by duration_ms in descending order, which is appropriate for finding the 'slowest' trace. Additionally, filtering with trace.parent_id does-not-exist correctly identifies root spans. However, the query should be grouping by trace.trace_id to ensure that we identify distinct traces, not just the longest individual span. Without the correct grouping, the analysis does not guarantee that the result is a full trace, but merely the longest span. Also, specifying a limit of I is good as it will return the single slowest trace. as reauested. model outcome bad Phillip critique The response is nearly correct, as it is looking for the slowest trace by using MAX(duration_ms) and ordering by duration _ ms in descending order, which is appropriate for finding the 'slowest' trace. Additionally, filtering with trace.parent_id does-not-exist correctly identifies root spans. However, the query should be grouping by trace.trace_id to actually show the slowest trace. Without that grouping, the query only shows the MAX(duration_ms) measurement over time, irrespective of which trace is responsible for that measurement. Phillip outcome bad Phillip revised response {"calculations":[{"column":"dura tion_ms" , "op" "fi Iters" ":" does-not-exist", "join _ column" :""}],"orders":[{"column":"durati scending" Y], "limit" "time_rang agreement TRUE ](Exported%20image%2020240808113930-0.png) + +LLM-as-Judge is not a silver bullet though. There are subtle aspects of language where even the strongest models fail to evaluate reliably. In addition, we’ve found that [conventional classifiers](https://eugeneyan.com/writing/finetuning/) and reward models can achieve higher accuracy than LLM-as-Judge, and with lower cost and latency. For code generation, LLM-as-Judge can be weaker than more direct evaluation strategies like execution-evaluation. + +### 1.4.3 The “intern test” for evaluating generations + +We like to use the following “intern test” when evaluating generations: If you took the exact input to the language model, including the context, and gave it to an average college student in the relevant major as a task, could they succeed? How long would it take? +If the answer is no because the LLM lacks the required knowledge, consider ways to enrich the context. +If the answer is no and we simply can’t improve the context to fix it, then we may have hit a task that’s too hard for contemporary LLMs. +If the answer is yes, but it would take a while, we can try to reduce the complexity of the task. Is it decomposable? Are there aspects of the task that can be made more templatized? +If the answer is yes, they would get it quickly, then it’s time to dig into the data. What’s the model doing wrong? Can we find a pattern of failures? Try asking the model to explain itself before or after it responds, to help you build a theory of mind. + +### 1.4.4 Overemphasizing certain evals can hurt overall performance + +“When a measure becomes a target, it ceases to be a good measure.” — Goodhart’s Law. +An example of this is the Needle-in-a-Haystack (NIAH) eval. The original eval helped quantify model recall as context sizes grew, as well as how recall is affected by needle position. However, it’s been so overemphasized that it’s featured as [Figure 1 for Gemini 1.5’s report](https://arxiv.org/abs/2403.05530). The eval involves inserting a specific phrase (“The special magic {city} number is: {number}”) into a long document which repeats the essays of Paul Graham, and then prompting the model to recall the magic number. +While some models achieve near-perfect recall, it’s questionable whether NIAH truly reflects the reasoning and recall abilities needed in real-world applications. Consider a more practical scenario: Given the transcript of an hour-long meeting, can the LLM summarize the key decisions and next steps, as well as correctly attribute each item to the relevant person? This task is more realistic, going beyond rote memorization and also considering the ability to parse complex discussions, identify relevant information, and synthesize summaries. +Here’s an example of a [practical NIAH eval](https://observablehq.com/@shreyashankar/needle-in-the-real-world-experiments). Using [transcripts of doctor-patient video calls](https://github.com/wyim/aci-bench/tree/main/data/challenge_data), the LLM is queried about the patient’s medication. It also includes a more challenging NIAH, inserting a phrase for random ingredients for pizza toppings, such as “_The secret ingredients needed to build the perfect pizza are: Espresso-soaked dates, Lemon and Goat cheese._”. Recall was around 80% on the medication task and 30% on the pizza task. + +![Avg Recall of Reference Answer in Model Outputs Recall 0.9- 0.8- 0.7- 0.6- 0.5- 0.4- 0.3- 0.2- 0.1- 0.0- dbrx gemini gemma gpt3.5 gpt4 haiku -5 Model mistral opus sonnet ](Exported%20image%2020240808113930-1.png) + +Tangentially, an overemphasis on NIAH evals can lead to lower performance on extraction and summarization tasks. Because these LLMs are so finetuned to attend to every sentence, they may start to treat irrelevant details and distractors as important, thus including them in the final output (when they shouldn’t!) +This could also apply to other evals and use cases. For example, summarization. An emphasis on factual consistency could lead to summaries that are less specific (and thus less likely to be factually inconsistent) and possibly less relevant. Conversely, an emphasis on writing style and eloquence could lead to more flowery, marketing-type language that could introduce factual inconsistencies. + +### 1.4.5 Simplify annotation to binary tasks or pairwise comparisons + +Providing open-ended feedback or ratings for model output on a [Likert scale](https://en.wikipedia.org/wiki/Likert_scale) is cognitively demanding. As a result, the data collected is more noisy—due to variability among human raters—and thus less useful. A more effective approach is to simplify the task and reduce the cognitive burden on annotators. Two tasks that work well are binary classifications and pairwise comparisons. +In binary classifications, annotators are asked to make a simple yes-or-no judgment on the model’s output. They might be asked whether the generated summary is factually consistent with the source document, or whether the proposed response is relevant, or if it contains toxicity. Compared to the Likert scale, binary decisions are more precise, have higher consistency among raters, and lead to higher throughput. This was how [Doordash setup their labeling queues](https://doordash.engineering/2020/08/28/overcome-the-cold-start-problem-in-menu-item-tagging/) for tagging menu items though a tree of yes-no questions. +In pairwise comparisons, the annotator is presented with a pair of model responses and asked which is better. Because it’s easier for humans to say “A is better than B” than to assign an individual score to either A or B individually, this leads to faster and more reliable annotations (over Likert scales). At a [Llama2 meetup](https://www.youtube.com/watch?v=CzR3OrOkM9w), Thomas Scialom, an author on the Llama2 paper, confirmed that pairwise-comparisons were faster and cheaper than collecting supervised finetuning data such as written responses. The former’s cost is $3.5 per unit while the latter’s cost is $25 per unit. +If you’re starting to write labeling guidelines, here are some [reference guidelines](https://eugeneyan.com/writing/labeling-guidelines/) from Google and Bing Search. + +### 1.4.6 (Reference-free) evals and guardrails can be used interchangeably + +Guardrails help to catch inappropriate or harmful content while evals help to measure the quality and accuracy of the model’s output. In the case of reference-free evals, they may be considered two sides of the same coin. Reference-free evals are evaluations that don’t rely on a “golden” reference, such as a human-written answer, and can assess the quality of output based solely on the input prompt and the model’s response. +Some examples of these are [summarization evals](https://eugeneyan.com/writing/evals/#summarization-consistency-relevance-length), where we only have to consider the input document to evaluate the summary on factual consistency and relevance. If the summary scores poorly on these metrics, we can choose not to display it to the user, effectively using the eval as a guardrail. Similarly, reference-free [translation evals](https://eugeneyan.com/writing/evals/#translation-statistical--learned-evals-for-quality) can assess the quality of a translation without needing a human-translated reference, again allowing us to use it as a guardrail. + +### 1.4.7 LLMs will return output even when they shouldn’t + +A key challenge when working with LLMs is that they’ll often generate output even when they shouldn’t. This can lead to harmless but nonsensical responses, or more egregious defects like toxicity or dangerous content. For example, when asked to extract specific attributes or metadata from a document, an LLM may confidently return values even when those values don’t actually exist. Alternatively, the model may respond in a language other than English because we provided non-English documents in the context. +While we can try to prompt the LLM to return a “not applicable” or “unknown” response, it’s not foolproof. Even when the log probabilities are available, they’re a poor indicator of output quality. While log probs indicate the likelihood of a token appearing in the output, they don’t necessarily reflect the correctness of the generated text. On the contrary, for instruction-tuned models that are trained to respond to queries and generate coherent response, log probabilities may not be well-calibrated. Thus, while a high log probability may indicate that the output is fluent and coherent, it doesn’t mean it’s accurate or relevant. +While careful prompt engineering can help to some extent, we should complement it with robust guardrails that detect and filter/regenerate undesired output. For example, OpenAI provides a [content moderation API](https://platform.openai.com/docs/guides/moderation) that can identify unsafe responses such as hate speech, self-harm, or sexual output. Similarly, there are numerous packages for [detecting personally identifiable information](https://github.com/topics/pii-detection) (PII). One benefit is that guardrails are largely agnostic of the use case and can thus be applied broadly to all output in a given language. In addition, with precise retrieval, our system can deterministically respond “I don’t know” if there are no relevant documents. +A corollary here is that LLMs may fail to produce outputs when they are expected to. This can happen for various reasons, from straightforward issues like long tail latencies from API providers to more complex ones such as outputs being blocked by content moderation filters. As such, it’s important to consistently log inputs and (potentially a lack of) outputs for debugging and monitoring. + +### 1.4.8 Hallucinations are a stubborn problem + +Unlike content safety or PII defects which have a lot of attention and thus seldom occur, factual inconsistencies are stubbornly persistent and more challenging to detect. They’re more common and occur at a baseline rate of 5 - 10%, and from what we’ve learned from LLM providers, it can be challenging to get it below 2%, even on simple tasks such as summarization. +To address this, we can combine prompt engineering (upstream of generation) and factual inconsistency guardrails (downstream of generation). For prompt engineering, techniques like CoT help reduce hallucination by getting the LLM to explain its reasoning before finally returning the output. Then, we can apply a [factual inconsistency guardrail](https://eugeneyan.com/writing/finetuning/) to assess the factuality of summaries and filter or regenerate hallucinations. In some cases, hallucinations can be deterministically detected. When using resources from RAG retrieval, if the output is structured and identifies what the resources are, you should be able to manually verify they’re sourced from the input context. + +# 2 Operational: Day-to-day and org concerns + +## 2.1 Data + +Just as the quality of ingredients determines the dish’s taste, the quality of input data constrains the performance of machine learning systems. In addition, output data is the only way to tell whether the product is working or not. All the authors focus tightly on the data, looking at inputs and outputs for several hours a week to better understand the data distribution: its modes, its edge cases, and the limitations of models of it. + +### 2.1.1 Check for development-prod skew + +A common source of errors in traditional machine learning pipelines is _train-serve skew_. This happens when the data used in training differs from what the model encounters in production. Although we can use LLMs without training or fine-tuning, hence there’s no training set, a similar issue arises with development-prod data skew. Essentially, the data we test our systems on during development should mirror what the systems will face in production. If not, we might find our production accuracy suffering. +LLM development-prod skew can be categorized into two types: structural and content-based. Structural skew includes issues like formatting discrepancies, such as differences between a JSON dictionary with a list-type value and a JSON list, inconsistent casing, and errors like typos or sentence fragments. These errors can lead to unpredictable model performance because different LLMs are trained on specific data formats, and prompts can be highly sensitive to minor changes. Content-based or “semantic” skew refers to differences in the meaning or context of the data.  +As in traditional ML, it’s useful to periodically measure skew between the LLM input/output pairs. Simple metrics like the length of inputs and outputs or specific formatting requirements (e.g., JSON or XML) are straightforward ways to track changes. For more “advanced” drift detection, consider clustering embeddings of input/output pairs to detect semantic drift, such as shifts in the topics users are discussing, which could indicate they are exploring areas the model hasn’t been exposed to before.  +When testing changes, such as prompt engineering, ensure that hold-out datasets are current and reflect the most recent types of user interactions. For example, if typos are common in production inputs, they should also be present in the hold-out data. Beyond just numerical skew measurements, it’s beneficial to perform qualitative assessments on outputs. Regularly reviewing your model’s outputs—a practice colloquially known as “vibe checks”—ensures that the results align with expectations and remain relevant to user needs. Finally, incorporating nondeterminism into skew checks is also useful—by running the pipeline multiple times for each input in our testing dataset and analyzing all outputs, we increase the likelihood of catching anomalies that might occur only occasionally. + +### 2.1.2 Look at samples of LLM inputs and outputs every day + +LLMs are dynamic and constantly evolving. Despite their impressive zero-shot capabilities and often delightful outputs, their failure modes can be highly unpredictable. For custom tasks, regularly reviewing data samples is essential to developing an intuitive understanding of how LLMs perform. +Input-output pairs from production are the “real things, real places” (_genchi genbutsu_) of LLM applications, and they cannot be substituted. [Recent research](https://arxiv.org/abs/2404.12272) highlighted that developers’ perceptions of what constitutes “good” and “bad” outputs shift as they interact with more data (i.e., _criteria drift_). While developers can come up with some criteria upfront for evaluating LLM outputs, these predefined criteria are often incomplete. For instance, during the course of development, we might update the prompt to increase the probability of good responses and decrease the probability of bad ones. This iterative process of evaluation, reevaluation, and criteria update is necessary, as it’s difficult to predict either LLM behavior or human preference without directly observing the outputs. +To manage this effectively, we should log LLM inputs and outputs. By examining a sample of these logs daily, we can quickly identify and adapt to new patterns or failure modes. When we spot a new issue, we can immediately write an assertion or eval around it. Similarly, any updates to failure mode definitions should be reflected in the evaluation criteria. These “vibe checks” are signals of bad outputs; code and assertions operationalize them. Finally, this attitude must be socialized, for example by adding review or annotation of inputs and outputs to your on-call rotation. + +## 2.2 Working with models + +With LLM APIs, we can rely on intelligence from a handful of providers. While this is a boon, these dependencies also involve trade-offs on performance, latency, throughput, and cost. Also, as newer, better models drop (almost every month in the past year), we should be prepared to update our products as we deprecate old models and migrate to newer models. In this section, we share our lessons from working with technologies we don’t have full control over, where the models can’t be self-hosted and managed. + +### 2.2.1 Generate structured output to ease downstream integration + +For most real-world use cases, the output of an LLM will be consumed by a downstream application via some machine-readable format. For example, [ReChat](https://www.youtube.com/watch?v=B_DMMlDuJB0), a real-estate CRM, required structured responses for the front end to render widgets. Similarly, [Boba](https://martinfowler.com/articles/building-boba.html), a tool for generating product strategy ideas, needed structured output with fields for title, summary, plausibility score, and time horizon. Finally, LinkedIn shared about [constraining the LLM to generate YAML](https://www.linkedin.com/blog/engineering/generative-ai/musings-on-building-a-generative-ai-product), which is then used to decide which skill to use, as well as provide the parameters to invoke the skill. +This application pattern is an extreme version of Postel’s Law: be liberal in what you accept (arbitrary natural language) and conservative in what you send (typed, machine-readable objects). As such, we expect it to be extremely durable. +Currently, [Instructor](https://github.com/jxnl/instructor) and [Outlines](https://github.com/outlines-dev/outlines) are the de facto standards for coaxing structured output from LLMs. If you’re using an LLM API (e.g., Anthropic, OpenAI), use Instructor; if you’re working with a self-hosted model (e.g., Huggingface), use Outlines. + +### 2.2.2 Migrating prompts across models is a pain in the ass + +Sometimes, our carefully crafted prompts work superbly with one model but fall flat with another. This can happen when we’re switching between various model providers, as well as when we upgrade across versions of the same model.  +For example, Voiceflow found that [migrating from gpt-3.5-turbo-0301 to gpt-3.5-turbo-1106 led to a 10% drop](https://www.voiceflow.com/blog/how-much-do-chatgpt-versions-affect-real-world-performance) on their intent classification task. (Thankfully, they had evals!) Similarly, [GoDaddy observed a trend in the positive direction](https://www.godaddy.com/resources/news/llm-from-the-trenches-10-lessons-learned-operationalizing-models-at-godaddy#h-3-prompts-aren-t-portable-across-models), where upgrading to version 1106 narrowed the performance gap between gpt-3.5-turbo and gpt-4. (Or, if you’re a glass-half-full person, you might be disappointed that gpt-4’s lead was reduced with the new upgrade) +Thus, if we have to migrate prompts across models, expect it to take more time than simply swapping the API endpoint. Don’t assume that plugging in the same prompt will lead to similar or better results. Also, having reliable, automated evals helps with measuring task performance before and after migration, and reduces the effort needed for manual verification. + +### 2.2.3 Version and pin your models + +In any machine learning pipeline, “[changing anything changes everything](https://papers.nips.cc/paper_files/paper/2015/hash/86df7dcfd896fcaf2674f757a2463eba-Abstract.html)”. This is particularly relevant as we rely on components like large language models (LLMs) that we don’t train ourselves and that can change without our knowledge. +Fortunately, many model providers offer the option to “pin” specific model versions (e.g., gpt-4-turbo-1106). This enables us to use a specific version of the model weights, ensuring they remain unchanged. Pinning model versions in production can help avoid unexpected changes in model behavior, which could lead to customer complaints about issues that may crop up when a model is swapped, such as overly verbose outputs or other unforeseen failure modes. +Additionally, consider maintaining a shadow pipeline that mirrors your production setup but uses the latest model versions. This enables safe experimentation and testing with new releases. Once you’ve validated the stability and quality of the outputs from these newer models, you can confidently update the model versions in your production environment. + +### 2.2.4 Choose the smallest model that gets the job done + +When working on a new application, it’s tempting to use the biggest, most powerful model available. But once we’ve established that the task is technically feasible, it’s worth experimenting if a smaller model can achieve comparable results. +The benefits of a smaller model are lower latency and cost. While it may be weaker, techniques like chain-of-thought, n-shot prompts, and in-context learning can help smaller models punch above their weight. Beyond LLM APIs, fine-tuning our specific tasks can also help increase performance. +Taken together, a carefully crafted workflow using a smaller model can often match, or even surpass, the output quality of a single large model, while being faster and cheaper. For example, this [tweet](https://twitter.com/mattshumer_/status/1770823530394833242) shares anecdata of how Haiku + 10-shot prompt outperforms zero-shot Opus and GPT-4. In the long term, we expect to see more examples of [flow-engineering](https://twitter.com/karpathy/status/1748043513156272416) with smaller models as the optimal balance of output quality, latency, and cost. +As another example, take the humble classification task. Lightweight models like DistilBERT (67M parameters) are a surprisingly strong baseline. The 400M parameter DistilBART is another great option—when finetuned on open-source data, it could [identify hallucinations with an ROC-AUC of 0.84](https://eugeneyan.com/writing/finetuning/), surpassing most LLMs at less than 5% of latency and cost. +The point is, don’t overlook smaller models. While it’s easy to throw a massive model at every problem, with some creativity and experimentation, we can often find a more efficient solution.  + +## 2.3 Product + +While new technology offers new possibilities, the principles of building great products are timeless. Thus, even if we’re solving new problems for the first time, we don’t have to reinvent the wheel on product design. There’s a lot to gain from grounding our LLM application development in solid product fundamentals, allowing us to deliver real value to the people we serve. + +### 2.3.1 Involve design early and often + +Having a designer will push you to understand and think deeply about how your product can be built and presented to users. We sometimes stereotype designers as folks who take things and make them pretty. But beyond just the user interface, they also rethink how the user experience can be improved, even if it means breaking existing rules and paradigms. +Designers are especially gifted at reframing the user’s needs into various forms. Some of these forms are more tractable to solve than others, and thus, they may offer more or fewer opportunities for AI solutions. Like many other products, building AI products should be centered around the job to be done, not the technology that powers them. +Focus on asking yourself: “What job is the user asking this product to do for them? Is that job something a chatbot would be good at? How about autocomplete? Maybe something different!” Consider the existing [design patterns](https://www.tidepool.so/blog/emerging-ux-patterns-for-generative-ai-apps-copilots) and how they relate to the job-to-be-done. These are the invaluable assets that designers add to your team’s capabilities. + +### 2.3.2 Design your UX for Human-In-The-Loop + +One way to get quality annotations is to integrate Human-in-the-Loop (HITL) into the user experience (UX). By allowing users to provide feedback and corrections easily, we can improve the immediate output and collect valuable data to improve our models. +Imagine an e-commerce platform where users upload and categorize their products. There are several ways we could design the UX: + +- The user manually selects the right product category; an LLM periodically checks new products and corrects miscategorization on the backend. +- The user doesn’t select any category at all; an LLM periodically categorizes products on the backend (with potential errors). +- An LLM suggests a product category in real-time, which the user can validate and update as needed. + +While all three approaches involve an LLM, they provide very different UXes. The first approach puts the initial burden on the user and has the LLM acting as a post-processing check. The second requires zero effort from the user but provides no transparency or control. The third strikes the right balance. By having the LLM suggest categories upfront, we reduce cognitive load on the user and they don’t have to learn our taxonomy to categorize their product! At the same time, by allowing the user to review and edit the suggestion, they have the final say in how their product is classified, putting control firmly in their hands. As a bonus, the third approach creates a [natural feedback loop for model improvement](https://eugeneyan.com/writing/llm-patterns/#collect-user-feedback-to-build-our-data-flywheel). Suggestions that are good are accepted (positive labels) and those that are bad are updated (negative followed by positive labels). +This pattern of suggestion, user validation, and data collection is commonly seen in several applications: + +- Coding assistants: Where users can accept a suggestion (strong positive), accept and tweak a suggestion (positive), or ignore a suggestion (negative) +- Midjourney: Where users can choose to upscale and download the image (strong positive), vary an image (positive), or generate a new set of images (negative) +- Chatbots: Where users can provide thumbs up (positive) or thumbs down (negative) on responses, or choose to regenerate a response if it was really bad (strong negative). + +Feedback can be explicit or implicit. Explicit feedback is information users provide in response to a request by our product; implicit feedback is information we learn from user interactions without needing users to deliberately provide feedback. Coding assistants and Midjourney are examples of implicit feedback while thumbs up and thumb downs are explicit feedback. If we design our UX well, like coding assistants and Midjourney, we can collect plenty of implicit feedback to improve our product and models. + +### 2.3.3 Prioritize your hierarchy of needs ruthlessly + +As we think about putting our demo into production, we’ll have to think about the requirements for: + +- Reliability: 99.9% uptime, adherence to structured output +- Harmlessness: Not generate offensive, NSFW, or otherwise harmful content +- Factual consistency: Being faithful to the context provided, not making things up +- Usefulness: Relevant to the users’ needs and request +- Scalability: Latency SLAs, supported throughput +- Cost: Because we don’t have unlimited budget +- And more: Security, privacy, fairness, GDPR, DMA, etc, etc. + +If we try to tackle all these requirements at once, we’re never going to ship anything. Thus, we need to prioritize. Ruthlessly. This means being clear what is non-negotiable (e.g., reliability, harmlessness) without which our product can’t function or won’t be viable. It’s all about identifying the minimum lovable product. We have to accept that the first version won’t be perfect, and just launch and iterate. + +### 2.3.4 Calibrate your risk tolerance based on the use case + +When deciding on the language model and level of scrutiny of an application, consider the use case and audience. For a customer-facing chatbot offering medical or financial advice, we’ll need a very high bar for safety and accuracy. Mistakes or bad output could cause real harm and erode trust. But for less critical applications, such as a recommender system, or internal-facing applications like content classification or summarization, excessively strict requirements only slow progress without adding much value. +This aligns with a recent [a16z report](https://a16z.com/generative-ai-enterprise-2024/) showing that many companies are moving faster with internal LLM applications compared to external ones. By experimenting with AI for internal productivity, organizations can start capturing value while learning how to manage risk in a more controlled environment. Then, as they gain confidence, they can expand to customer-facing use cases. + +## 2.4 Team & Roles + +No job function is easy to define, but writing a job description for the work in this new space is more challenging than others. We’ll forgo venn diagrams of intersecting job titles, or suggestions for job descriptions. We will, however, submit to the existence of a new role—the AI engineer—and discuss its place. Importantly, we’ll discuss the rest of the team and how responsibilities should be assigned. + +### 2.4.1 Focus on process, not tools + +When faced with new paradigms, such as LLMs, software engineers tend to favor tools. As a result, we overlook the problem and process the tool was supposed to solve. In doing so, many engineers assume accidental complexity, which has negative consequences for the team’s long-term productivity. +For example, [this write-up](https://hamel.dev/blog/posts/prompt/) discusses how certain tools can automatically create prompts for large language models. It argues (rightfully IMHO) that engineers who use these tools without first understanding the problem-solving methodology or process end up taking on unnecessary technical debt. +In addition to accidental complexity, tools are often underspecified. For example, there is a growing industry of LLM evaluation tools that offer “LLM Evaluation In A Box” with generic evaluators for toxicity, conciseness, tone, etc. We have seen many teams adopt these tools without thinking critically about the specific failure modes of their domains. Contrast this to EvalGen. It focuses on teaching users the process of creating domain-specific evals by deeply involving the user each step of the way, from specifying criteria, to labeling data, to checking evals. The software leads the user through a workflow that looks like this: + +![Prompt Node Infer You be doing named entity recognition (NER). Extract up to 3 well-known entities fron the following tweet: {tweet_fu For each entity, write one sentence describing the person or entity. ALI the entities you extract should be found in a knowledge base Like Wikipedia, SO don't make up Nurn responses per prompt: Multi -Evaluator criteria from my context you extract should' Let me specify criteria manually Let an Al help you generate criteria and implement evaluation functions. Is this or ? - Bravotv: A television network that focuses on reality TV shows, including popular f tike The Real Housewives. - BravoWWHL: Stands for Bravo's Watch What Happens Live, a late—night talk hosted by Andy Cohen that features celebrity games, and discussions about Bravo's reality TV shows. — Paris Hilton: A well—known socialite, businesswoman, and media personality, known for her appearance on the reality TV show The Simple Life and her work as a Singer, actress, and entrepreneur. ntities I'm tired Type a criteria to add, then press Enter: Markdown Format The response should be in Markdown format. NO Made up Entities There shouldn't be any made up entities in the response, Grade some responses first Grade Some responses first. to help sn•urselt identify criteria. The Al will incorporate your grades in its criteria suggestions. Suggest more Bulleted List The response should contain a bulleted list. NO Hashtags The response should not extract hashtags as entities. "_text STOLE WY HOUSE *justdoit #juststealit uravOtv @BravON4L https://t.co.'8xShKrøSYq Prompt You be doing nard entity recognition (NER). Extract up to 3 entities f rn the tueet : you STOLE MY GOD""' HOUSE *justdolt •juststeatit aparisHilton https://t.co'8xShKreSYq For each entity, write one sentence describing the person or entity. Alt the I'm done. Implement it! Coverage ot Bad Reswtses 77.78% Ento Stuw False Failure Rate 28.57% ](Exported%20image%2020240808113930-2.png) + +[Shankar, S., et al. (2024). Who Validates the Validators? Aligning LLM-Assisted Evaluation of LLM Outputs with Human Preferences. Retrieved from https://arxiv.org/abs/2404.12272](https://arxiv.org/abs/2404.12272) +EvalGen guides the user through a best practice of crafting LLM evaluations, namely: + +1. Defining domain-specific tests (bootstrapped automatically from the prompt). These are defined as either assertions with code or with LLM-as-a-Judge. +2. The importance of aligning the tests with human judgment, so that the user can check that the tests capture the specified criteria. +3. Iterating on your tests as the system (prompts, etc) changes.  + +EvalGen provides developers with a mental model of the evaluation building process without anchoring them to a specific tool. We have found that after providing AI Engineers with this context, they often decide to select leaner tools or build their own.   +There are too many components of LLMs beyond prompt writing and evaluations to list exhaustively here.  However, it is important that AI Engineers seek to understand the processes before adopting tools. + +### 2.4.2 Always be experimenting + +ML products are deeply intertwined with experimentation. Not only the A/B, Randomized Control Trials kind, but the frequent attempts at modifying the smallest possible components of your system, and doing offline evaluation. The reason why everyone is so hot for evals is not actually about trustworthiness and confidence—it’s about enabling experiments! The better your evals, the faster you can iterate on experiments, and thus the faster you can converge on the best version of your system.  +It’s common to try different approaches to solving the same problem because experimentation is so cheap now. The high-cost of collecting data and training a model is minimized—prompt engineering costs little more than human time. Position your team so that everyone is taught the basics of prompt engineering. This encourages everyone to experiment and leads to diverse ideas from across the organization. +Additionally, don’t only experiment to explore—also use them to exploit! Have a working version of a new task? Consider having someone else on the team approach it differently. Try doing it another way that’ll be faster. Investigate prompt techniques like Chain-of-Thought or Few-Shot to make it higher quality. Don’t let your tooling hold you back on experimentation; if it is, rebuild it, or buy something to make it better.  +Finally, during product/project planning, set aside time for building evals and running multiple experiments. Think of the product spec for engineering products, but add to it clear criteria for evals. And during roadmapping, don’t underestimate the time required for experimentation—expect to do multiple iterations of development and evals before getting the green light for production. + +### 2.4.3 Empower everyone to use new AI technology + +As generative AI increases in adoption, we want the entire team—not just the experts—to understand and feel empowered to use this new technology. There’s no better way to develop intuition for how LLMs work (e.g., latencies, failure modes, UX) than to, well, use them. LLMs are relatively accessible: You don’t need to know how to code to improve performance for a pipeline, and everyone can start contributing via prompt engineering and evals. +A big part of this is education. It can start as simple as the basics of prompt engineering, where techniques like n-shot prompting and CoT help condition the model towards the desired output. Folks who have the knowledge can also educate about the more technical aspects, such as how LLMs are autoregressive in nature. In other words, while input tokens are processed in parallel, output tokens are generated sequentially. As a result, latency is more a function of output length than input length—this is a key consideration when designing UXes and setting performance expectations. +We can also go further and provide opportunities for hands-on experimentation and exploration. A hackathon perhaps? While it may seem expensive to have an entire team spend a few days hacking on speculative projects, the outcomes may surprise you. We know of a team that, through a hackathon, accelerated and almost completed their three-year roadmap within a year. Another team had a hackathon that led to paradigm shifting UXes that are now possible thanks to LLMs, which are now prioritized for the year and beyond. + +### 2.4.4 Don’t fall into the trap of “AI Engineering is all I need” + +As new job titles are coined, there is an initial tendency to overstate the capabilities associated with these roles. This often results in a painful correction as the actual scope of these jobs becomes clear. Newcomers to the field, as well as hiring managers, might make exaggerated claims or have inflated expectations. Notable examples over the last decade include: + +- Data Scientist: “[someone who is better at statistics than any software engineer and better at software engineering than any statistician](https://x.com/josh_wills/status/198093512149958656).”   +- Machine Learning Engineer (MLE): a software engineering-centric view of machine learning  + +Initially, many assumed that data scientists alone were sufficient for data-driven projects. However, it became apparent that data scientists must collaborate with software and data engineers to develop and deploy data products effectively.  +This misunderstanding has shown up again with the new role of AI Engineer, with some teams believing that AI Engineers are all you need. In reality, building machine learning or AI products requires a [broad array of specialized roles](https://papers.nips.cc/paper_files/paper/2015/hash/86df7dcfd896fcaf2674f757a2463eba-Abstract.html). We’ve consulted with more than a dozen companies on AI products and have consistently observed that they fall into the trap of believing that “AI Engineering is all you need.” As a result, products often struggle to scale beyond a demo as companies overlook crucial aspects involved in building a product. +For example, evaluation and measurement are crucial for scaling a product beyond vibe checks. The skills for effective evaluation align with some of the strengths traditionally seen in machine learning engineers—a team composed solely of AI Engineers will likely lack these skills. Co-author Hamel Husain illustrates the importance of these skills in his recent work around detecting [data drift](https://github.com/hamelsmu/ft-drift) and [designing domain-specific evals](https://hamel.dev/blog/posts/evals/). +Here is a rough progression of the types of roles you need, and when you’ll need them, throughout the journey of building an AI product: + +1. First, focus on building a product. This might include an AI engineer, but it doesn’t have to. AI Engineers are valuable for prototyping and iterating quickly on the product (UX, plumbing, etc).  +2. Next, create the right foundations by instrumenting your system and collecting data. Depending on the type and scale of data, you might need platform and/or data engineers. You must also have systems for querying and analyzing this data to debug issues. +3. Next, you will eventually want to optimize your AI system. This doesn’t necessarily involve training models. The basics include steps like designing metrics, building evaluation systems, running experiments, optimizing RAG retrieval, debugging stochastic systems, and more. MLEs are really good at this (though AI engineers can pick them up too). It usually doesn’t make sense to hire an MLE unless you have completed the prerequisite steps. + +Aside from this, you need a domain expert at all times. At small companies, this would ideally be the founding team—and at bigger companies, product managers can play this role. Being aware of the progression and timing of roles is critical. Hiring folks at the wrong time (e.g., [hiring an MLE too early](https://jxnl.co/writing/2024/04/08/hiring-mle-at-early-stage-companies/)) or building in the wrong order is a waste of time and money, and causes churn.  Furthermore, regularly checking in with an MLE (but not hiring them full-time) during phases 1-2 will help the company build the right foundations.  + +# 3 Strategic: Long-term business strategy (pending) + +PENDING RELEASE (tentatively 6th June) + +# 4 Stay In Touch + +If you found this useful and want updates on write-ups, courses, and activities, subscribe below. +You can also find our individual contact information on our [about page](https://applied-llms.org/about.html). + +## 4.1 Acknowledgements + +This series started as a conversation in a group chat, where Bryan quipped that he was inspired to write “A Year of AI Engineering”. Then, ✨magic✨ happened, and we were all inspired to chip in and share what we’ve learned so far. +The authors would like to thank Eugene for leading the bulk of the document integration and overall structure in addition to a large proportion of the lessons. Additionally, for primary editing responsibilities and document direction. The authors would like to thank Bryan for the spark that led to this writeup, restructuring the write-up into tactical, operational, and strategic sections and their intros, and for pushing us to think bigger on how we could reach and help the community. The authors would like to thank Charles for his deep dives on cost and LLMOps, as well as weaving the lessons to make them more coherent and tighter—you have him to thank for this being 30 instead of 40 pages! The authors thank Hamel and Jason for their insights from advising clients and being on the front lines, for their broad generalizable learnings from clients, and for deep knowledge of tools. And finally, thank you Shreya for reminding us of the importance of evals and rigorous production practices and for bringing her research and original results. +Finally, we would like to thank all the teams who so generously shared your challenges and lessons in your own write-ups which we’ve referenced throughout this series, along with the AI communities for your vibrant participation and engagement with this group. + +## 4.2 About the authors + +See the [about page](https://applied-llms.org/about.html) for more information on the authors. +If you found this useful, please cite this write-up as: +Yan, Eugene, Bryan Bischof, Charles Frye, Hamel Husain, Jason Liu, and Shreya Shankar. 2024. ‘Applied LLMs - What We’ve Learned From A Year of Building with LLMs’. Applied LLMs. 8 June 2024. [https://applied-llms.org/](https://applied-llms.org/). +or +@article{AppliedLLMs2024, title = {What We've Learned From A Year of Building with LLMs}, author = {Yan, Eugene and Bischof, Bryan and Frye, Charles and Husain, Hamel and Liu, Jason and Shankar, Shreya}, journal = {Applied LLMs}, year = {2024}, month = {Jun}, url = {https://applied-llms.org/}} \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/Edulinq Jon Skeet's coding blog.md b/OneNote/Ben's Notebook/Reading/Read Later/Edulinq Jon Skeet's coding blog.md new file mode 100644 index 0000000..ad285a8 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/Edulinq Jon Skeet's coding blog.md @@ -0,0 +1,952 @@ +Clipped from: [https://codeblog.jonskeet.uk/category/edulinq/](https://codeblog.jonskeet.uk/category/edulinq/) + +# Category Archives: Edulinq + +[Books](https://codeblog.jonskeet.uk/category/books/), [C#](https://codeblog.jonskeet.uk/category/csharp/), [Edulinq](https://codeblog.jonskeet.uk/category/edulinq/), [LINQ](https://codeblog.jonskeet.uk/category/linq/) + +# [Edulinq – the e-book](https://codeblog.jonskeet.uk/2011/03/18/edulinq-the-e-book/) + +[March 18, 2011](https://codeblog.jonskeet.uk/2011/03/18/edulinq-the-e-book/) [jonskeet](https://codeblog.jonskeet.uk/author/jonskeet/) [15 Comments](https://codeblog.jonskeet.uk/2011/03/18/edulinq-the-e-book/#comments) +I’m pleased to announce that I’ve made a first pass at converting the blog posts in the Edulinq series into e-books. +I’m using [Calibre](http://calibre-ebook.com/) to convert to PDF and e-book format. I still have a way to go, but they’re at least readable. The Kindle version (MOBI format) is working somewhat better than the PDF version at the moment, which surprises me. In particular, although hyperlinks are _displaying_ in the PDF, they don’t seem to be working – whereas at least the internal links in the Kindle format are working. +I’ll no doubt try to improve things over time, but I’ve put these early attempts up on the [root page](https://github.com/jskeet/edulinq) of the Edulinq project site. I’ve also put all the blog posts up as HTML in the site’s source control; that means you can [browse the latest version](https://github.com/jskeet/edulinq/tree/master/posts) directly. It also means if you sync the source control, download Calibre yourself and add “index.html” as a new e-book in the Calibre library, you can play with the conversion yourself and help me improve things. Feedback about problems is welcome; feedback including the fix is even better :) +[C#](https://codeblog.jonskeet.uk/category/csharp/), [Edulinq](https://codeblog.jonskeet.uk/category/edulinq/), [LINQ](https://codeblog.jonskeet.uk/category/linq/) + +# [Reimplementing LINQ to Objects: Part 44 – Aspects of Design](https://codeblog.jonskeet.uk/2011/02/21/reimplementing-linq-to-objects-part-44-aspects-of-design/) + +[February 21, 2011](https://codeblog.jonskeet.uk/2011/02/21/reimplementing-linq-to-objects-part-44-aspects-of-design/) [jonskeet](https://codeblog.jonskeet.uk/author/jonskeet/) [3 Comments](https://codeblog.jonskeet.uk/2011/02/21/reimplementing-linq-to-objects-part-44-aspects-of-design/#comments) +I promised a post on some questions of design that are raised by LINQ to Objects. I suspect that most of these have already been covered in other posts, but it may well be helpful to talk about them here too. This time I’ve thought about it particularly from the point of view of how other APIs can be built on some of the same design principles, and the awkward choices that LINQ has thrown up. + +### The power of composability and immutability + +Perhaps the most important aspect of LINQ which I’d love other API designers to take on board is that of how complicated queries are constructed from lots of little building blocks. What makes it particularly elegant is that the result of applying each building block is unchanged by anything else you do to it afterwards. +LINQ doesn’t _enforce_ immutability of course – you can start off with a mutable list and change its content at any time, for example, or change the properties of one of the objects referenced within it, or pass in a delegate with side-effects – but _LINQ itself_ won’t introduce side-effects. +The Task-based Asynchronous Pattern takes a similar approach, allowing composable building blocks of tasks. I’ve seen this pattern in various guises over the years – if you find yourself thinking in terms of a pipeline of some kind, it may well be appropriate, especially if each state in the pipeline emits the same type as it consumes. +General immutability is a somewhat different design trait of course, but one which can make _such_ a difference. The java.util.{Date,Calendar} classes are horrible, not least because they’re mutable – you can never stash a value away without being concerned that it may get changed by something else. [Joda Time](http://joda-time.sf.net/) has _some_ mutable implementations, but typically the immutable classes are used in a fluent way. Of course, .NET uses value types for various core types to start with, but also makes TimeZoneInfo immutable. For genuine "values" I would highly encourage API designers to at least _strongly consider_ immutable types. They’re not _always_ appropriate by any means, but they can be hugely useful where they fit nicely. + +### Extension methods on interfaces + +It’s no surprise that extension methods are heavily used in LINQ, given that they were effectively introduced into the language in order to enable LINQ in the first place. However, they do work particularly well with interfaces as a way of adding common behaviour. +It also plays very nicely with the pipeline pattern above for creating pipelines in a fluent manner. Even if you just create extension methods which call a constructor to wrap/compose the previous stage in the pipeline, you can still end up with more readable code. +One _problem_ with this is that you can’t "override" behaviour in particular implementations or interfaces which extend the original one – which is why Enumerable.ElementAt() has to detect that a sequence is actually a list, for example. If interfaces allowed method implementations, this wouldn’t be as much of a problem in the situation where you’re in control of the interface – I wouldn’t be at all surprised to find that as a feature of C#’s successor. +The lack of extension properties is also a bit of a handicap in some places, although not as many as one might expect at first glance. For example, even if we _could_ have made Enumerable.Count() a property, would it have been a good idea to do so? Properties give a natural expectation of speed, and Count() is usually an O(n) operation. + +### Delegates for custom behaviour + +In .NET 1.0 and 1.1, most developers used delegates for two purposes: + +- Handling events in UIs +- Passing around behaviour to be executed in a different thread (either via Control.Invoke, or new Thread(ThreadStart), or ThreadPool.QueueUserWorkItem). + +.NET 2.0 increased the range of uses of delegates somewhat, particularly with List.ConvertAll and the ability to create delegates relatively easily using anonymous methods. +However, LINQ _really_ brought them into the mainstream. If you’re building an API which benefits from _small_ pieces of custom behaviour, delegates can be a real boon. More complicated behaviour is still often best represented via an interface, and _sometimes_ it’s worth having both interface and delegate representations, like Comparison and IComparable. It’s generally easy to convert between the two – especially if you use a method group conversion from an interface implementation’s method to the delegate type. + +### Laziness + +One aspect of LINQ which is both a blessing and a curse is its laziness, both in terms of deferred execution (not reading from the input sequence _at all_ until the result sequence is read) and in terms of streaming the data (only reading as much information from the input sequence as is required to answer the immediate needs of the caller). +This is great in various ways, particularly as it means you can build a complex query and use it multiple times, sometimes as a basis for other queries, knowing that it won’t actually do anything until you ask for real results. It also means that you can iterate over huge data sets, so long as you’re careful. +On the other hand, it leads to subtle issues over when code is actually executing, makes debugging harder to understand, makes it easier to accidentally change the values of captured variables between the point at which you create the query and the point at which you execute it, and basically messes with your head. This is probably the aspect of LINQ which confuses newbies more than any other. +I’m not saying it was the wrong decision for LINQ – but I _would_ caution API designers to think carefully before introducing laziness, and to document it _really_ thoroughly. Likewise if your API might end up returning a result which is "gradually evaluated" (streaming data etc), this should be made clear. + +### When names collide: options for consistency + +Just in case you’ve forgotten, this is irritation with the meaning of source.Contains(element). In order to check whether a sequence contains an element or not, there has to be some idea of equality – for example, if you’re trying to find one string in a sequence of strings, are you trying to match in a case sensitive manner or not? +There’s an overload for Enumerable.Contains which allows you to specify the equality comparer to use, but the question is what should happen when you let the implementation pick the comparer. +For _every_ other method in Enumerable, the default equality comparer for the sequence type – i.e. EqualityComparer.Default – is picked. That sounds like source.Contains(element) should use the element type’s default comparer too, right? Well, in some cases that’s what will happen… but not if the source implements ICollection, which has its own Contains method which doesn’t take an equality comparer. If that’s the case, LINQ to Objects delegates to the collection’s Contains method. +So, we have three kinds of consistency here: + +- Consistency of compile-time type: it would be nice if the behaviour of source.Contains(element) was the same whether "source" is of type IEnumerable and ICollection +- Consistency of API: it would be nice if Contains behaved the same way as other methods which have overloads with and without equality comparers +- Consistency of model: if you consider "source" to be just a sequence of elements, it shouldn’t affect the _result_ (not just the speed) if the object actually implements ICollection + +I should point out that this will _only_ be a problem if the collection uses a different notion of equality to the default equality comparer for the type. The most obvious example of this is if you have a HashSet which uses a case-insensitive equality comparer. But it’s still a valid concern. +So what should the API designer do in this kind of case? Admittedly LINQ to Objects is already in a slightly unusual position as it’s based on an existing interface with known and _very common_ interfaces extending that core one… it’s less likely to come up with other APIs. However, I think it _might_ be enough of a smell to suggest that changing the name of the method to "ContainsElement" or something similar would be worthwhile. It’s unfortunate that "Contains" really _is_ the obvious choice… +This issue raises another aspect of API decision I’ve considered in the past… if there’s a common way of doing something in the framework you’re building on top of, but you consider it to be broken, should you abide by that breakage for the sake of familiarity and consistency, or should you strive to be as "clean" as possible? I think it needs to be considered on a case-by-case basis, but I _suspect_ I would usually come down on the side of cleanliness. + +### Documentation details + +Almost all APIs are badly documented – it’s a fact of life, even with some of the best APIs I’ve worked with. I doubt that Noda Time will be a shining example either. However, at the risk of being hypocritical I’ll say that documentation is worth spending significant thought on. Not just the time taken to document your code – but the time taken to consider what you want to guarantee, what should be left unstated, and what should be _explicitly_ left open. +For example, there’s no indication in the documentation of Cast that it will _sometimes_ return the original source value, nor in its companion OfType method that that will _never_ return the original source reference. This might be important to someone – why not state it? It’s possible to state the _possibility_ without saying what cases it applies to of course, leaving some wiggle room in the future. You might consider some of the optimizations in the same way – when should an optimization be documented and when should it be implicit? Sometimes it can make a difference beyond just performance, even if only in "odd" situations (such as a predicate throwing an exception). +If you’re used to defensive coding with Code Contracts, it’s much the same type of decision – and again, it’s similar to deciding whether a method should return IEnumerable, IList or List. There’s a balance between caller convenience, design cleanliness (where you only want to _emphasize_ one interface aspect, even if it also _happens_ to always return a particular type), and room for the implementation to change in the future. +Another example of considering the level of detail to document is when it comes to how input sequences are used in LINQ to Objects. What does it mean to say "this method uses deferred execution" _exactly_? If I call GetEnumerator() eagerly but defer the call to MoveNext(), is that still "deferred execution"? Should the documentation state when a sequence is buffered and when it’s streamed? Should it guarantee the order of the result sequence when the natural implementation makes that order easy to describe (e.g. for Distinct)? In this series I’ve tried to be as clear as possible about what actually happens – but that’s not to say that in some cases, the documentation wasn’t left _deliberately_ ambiguous. + +### Conclusion + +There are many other design considerations that I haven’t gone into here – particularly optimization, which I’ve already covered twice, probably saying everything I wanted to say here anyway. +I may add a few more bits to this post over time… but aside from that, I think I’m fundamentally _done_. I’ll write one more conclusion post, then declare Edulinq closed… +[C#](https://codeblog.jonskeet.uk/category/csharp/), [Edulinq](https://codeblog.jonskeet.uk/category/edulinq/), [LINQ](https://codeblog.jonskeet.uk/category/linq/) + +# [Reimplementing LINQ to Objects: Part 43 – Out-of-process queries with IQueryable](https://codeblog.jonskeet.uk/2011/02/20/reimplementing-linq-to-objects-part-43-out-of-process-queries-with-iqueryable/) + +[February 20, 2011](https://codeblog.jonskeet.uk/2011/02/20/reimplementing-linq-to-objects-part-43-out-of-process-queries-with-iqueryable/) [jonskeet](https://codeblog.jonskeet.uk/author/jonskeet/) [9 Comments](https://codeblog.jonskeet.uk/2011/02/20/reimplementing-linq-to-objects-part-43-out-of-process-queries-with-iqueryable/#comments) +I’ve been putting off writing about this for a while now, mostly because it’s such a huge topic. I’m not going to try to give more than a brief introduction to it here – don’t expect to be able to whip up your own LINQ to SQL implementation afterwards – but it’s worth at least having an idea of what happens when you use something like LINQ to SQL, NHibernate or the Entity Framework. +Just as LINQ to Objects is primarily interested in IEnumerable and the static Enumerable class, so out-of-process LINQ is primarily interested in IQueryable and the static Queryable class… but before we get to them, we need to talk about expression trees. + +### Expression Trees + +To put it in a nutshell, expression trees encapsulate logic in _data_ instead of _code_. While you _can_ introspect .NET code via [MethodBase.GetMethodBody](http://msdn.microsoft.com/en-us/library/system.reflection.methodbase.getmethodbody.aspx) and then [MethodBody.GetILAsByteArray](http://msdn.microsoft.com/en-us/library/system.reflection.methodbody.getilasbytearray.aspx), that’s not really a practical approach. The types in the [System.Linq.Expressions](http://msdn.microsoft.com/en-us/library/system.linq.expressions.aspx) define expressions in an easier-to-process manner. When expression trees were introduced in .NET 3.5, they were strictly for _expressions_, but the Dynamic Language Runtime uses expression trees to represent operations, and the range of logic represented had to expand accordingly, to include things like blocks. +While you certainly _can_ build expression trees yourself (usually via the factory methods on the nongeneric [Expression](http://msdn.microsoft.com/en-us/library/system.linq.expressions.expression.aspx) class), and it’s fun to do so at times, the most common way of creating them is to use the C# compiler’s support for them via lambda expressions. So far we’ve always seen a lambda expression being converted to a delegate, but it can also convert lambdas to instances of [Expression](http://msdn.microsoft.com/en-us/library/bb335710.aspx), where TDelegate is a delegate type which is compatible with the lambda expression. A concrete example will help here. The statement: +Expression> addOne = x => x + 1; +will be compiled into code which is _effectively_ something like this: +var parameter = Expression.Parameter(typeof(int), "x"); +var one = Expression.Constant(1, typeof(int)); +var addition = Expression.Add(parameter, one); +var addOne = Expression.Lambda>(addition,  new ParameterExpression[] { parameter }); +The compiler has some tricks up its sleeves which allow it to refer to methods, events and the like in a simpler way than we can from code, but largely you can regard the transformation as just a way of making life a _lot_ simpler than if you had to build the expression trees yourself every time. + +### IQueryable, IQueryable and IQueryProvider + +Now that we’ve got the idea of being able to inspect logic relatively easily at execution time, let’s see how it applies to LINQ. +There are three interfaces to introduce, and it’s probably easiest to start with how they appear in a class diagram: + +![IEnumerabIe< Generic Interface -O IEnumerabIe IEnumerabIe Interface IQueryabIe< T > Generic Interface -O IQueryab le -b IEnumerabIe IQ ueryable Interface -O IEnumerabIe Element Type provider Type Abstract Class -D Memberlnfo Exp ression Abstract Class IQ ueryProvider Interface Methods CreoteQuery 0 veriood) Execute overload) ](Exported%20image%2020240808113923-0.png) + +Most of the time, queries are represented using the generic [IQueryable](http://msdn.microsoft.com/en-us/library/bb351562.aspx) interface, but this doesn’t actually add much over the nongeneric [IQueryable](http://msdn.microsoft.com/en-us/library/system.linq.iqueryable.aspx) interface it extends, other than _also_ extending IEnumerable – so you can iterate over the contents of an IQueryable just as with any other sequence. +IQueryable contains the interesting bits, in the form of three properties: [ElementType](http://msdn.microsoft.com/en-us/library/system.linq.iqueryable.elementtype.aspx) which indicates the type of the elements within the query (in other words, a dynamic form of the T from IQueryable), [Expression](http://msdn.microsoft.com/en-us/library/system.linq.iqueryable.expression.aspx) returns the expression tree for the query so far, and [Provider](http://msdn.microsoft.com/en-us/library/system.linq.iqueryable.provider.aspx) returns the query provider which is responsible for creating _new_ queries and executing the existing one. We won’t need to use the ElementType property ourselves, but we’ll need both the Provider and Expression properties. + +### The static Queryable class + +We’re not going to implement any of the interfaces ourselves, but I’ve got a small sample program to demonstrate how they all work, imagining we were implementing most of [Queryable](http://msdn.microsoft.com/en-us/library/system.linq.queryable.aspx) ourselves. This static class contains extension methods for IQueryable just as Enumerable does for IEnumerable. _Most_ of the query operators from LINQ to Objects appear in Queryable as well, but there are a few notable omissions, such as the To{Lookup, Array, List, Dictionary} methods. If you call one of those on an IQueryable, the Enumerable implementations will be used instead. (IQueryable extends IEnumerable, so the extension methods in Enumerable are applicable to IQueryable sequences as well.) +The big difference between the Queryable and Enumerable methods in terms of their _declarations_ is in the parameters: + +- The "source" parameter in Queryable is always of type IQueryable instead of IEnumerable. (Other sequence parameters such as the sequence to concatenate for Queryable.Concat are expressed as IEnumerable, interestingly enough. This allows you to express a SQL query using "local" data as well; the query methods work out whether the sequence is actually an IQueryable and act accordingly.) +- Any parameters which were delegates in Enumerable are expression trees in Queryable; so while the selector parameter in Enumerable.Select is of type Func, the equivalent in Queryable.Select is of type Expression> + +The big difference between the methods in terms of what they _do_ is that whereas the Enumerable methods actually do the work (eventually – possibly after deferred execution of course), the Queryable methods themselves really _don’t_ do any work: they just ask the query provider to build up a query indicating that they’ve been called. +Let’s have a look at Where for example. If we wanted to implement Queryable.Where, we would have to: + +- Perform argument checking +- Get the "current" query’s Expression +- Build a new expression representing a call to Queryable.Where using the current expression as the source, and the predicate expression as the predicate +- Ask the current query’s provider to build a new IQueryable based on that call expression, and return it. + +It all sounds a bit recursive, I realize – the Where call needs to record that a Where call has happened… but that’s all. You may very well wonder where all the work is happening. We’ll come to that. +Now building a call expression is slightly tedious because you need to have the right MethodInfo – and as Where is overloaded, that means distinguishing between the two Where methods, which is easier said than done. I’ve actually used a LINQ query to find the right overload – the one where the predicate parameter Expression> rather than Expression>. In the .NET implementation, methods can use [MethodBase.GetCurrentMethod()](http://msdn.microsoft.com/en-us/library/system.reflection.methodbase.getcurrentmethod.aspx) instead… although equally they could have created a bunch of static variables computed at class initialization time. We can’t use GetCurrentMethod() for experimentation purposes, because the query provider is likely to expect the exact correct method from System.Linq.Queryable in the System.Core assembly. +Here’s our sample implementation, broken up quite a lot to make it easier to understand: +public static IQueryable Where( +    this IQueryable source, +    Expression> predicate) +{ +    if (source == null) +    { +        throw new ArgumentNullException("source"); +    } +    if (predicate == null) +    { +        throw new ArgumentNullException("predicate"); +    } +         +    Expression sourceExpression = source.Expression; +    Expression quotedPredicate = Expression.Quote(predicate); +         +    // This gets the "open" method, without specific type arguments. The second parameter +    // of the method we want is of type Expression>, so the sole generic +    // type argument to Expression itself has two generic type arguments. +    // Let’s face it, reflection on generic methods is a mess. +    MethodInfo method = typeof(Queryable).GetMethods() +                                         .Where(m => m.Name == "Where") +                                         .Where(m => m.GetParameters()[1] +                                                      .ParameterType +                                                      .GetGenericArguments()[0] +                                                      .GetGenericArguments().Length == 2) +                                         .First(); +         +    // This gets the method with the same type arguments as ours +    MethodInfo closedMethod = method.MakeGenericMethod(new Type[] { typeof(TSource) }); +         +    // Now we can create a *representation* of this exact method call +    Expression methodCall = Expression.Call(closedMethod, sourceExpression, quotedPredicate); +         +    // … and ask our query provider to create a query for it +    return source.Provider.CreateQuery(methodCall); +} +There’s only one part of this code that I don’t really understand the need for, and that’s the call to Expression.Quote on the predicate expression tree. I’m sure there’s a good reason for it, but _this particular example_ would work without it, as far as I can see. The real implementation uses it though, so dare say it’s required in some way. +EDIT: Daniel’s comment has made this somewhat clearer to me. Each of the arguments to Expression.Call after the MethodInfo itself is meant to be an expression which represents the argument to the method call. In our example we need an expression which represents an argument of type Expression>. We already have the value, but we need to provide the layer of wrapping… just as we did with Expression.Constant in the very first expression tree I showed at the top. To wrap the expression value we’ve got, we use Expression.Quote. It’s still not clear to me _exactly_ why we can use Expression.Quote but not Expression.Constant, but at least it’s clearer why we need _something_… +EDIT: I’m gradually getting there. [This Stack Overflow answer from Eric Lippert](http://stackoverflow.com/questions/3716492/what-does-expression-quote-do-that-expression-constant-cant-already-do) has much to say on the topic. I’m still trying to get my head round it, but I’m sure when I’ve read Eric’s answer several times, I’ll get there. +We can even test that this works, by using the [Queryable.AsQueryable](http://msdn.microsoft.com/en-us/library/bb353734.aspx) method from the real .NET implementation. This creates an IQuerable from any IEnumerable using a built-in query provider. Here’s the test program, where FakeQueryable is a static class containing the extension method above: +using System; +using System.Collections.Generic; +using System.Linq; +class Test +{ +    static void Main() +    {         +        List list = new List { 3, 5, 1 }; +        IQueryable source = list.AsQueryable(); +        IQueryable query = FakeQueryable.Where(source, x => x > 2); +         +        foreach (int value in query) +        { +            Console.WriteLine(value); +        } +    } +} +This works, printing just 3 and 5, filtering out the 1. Yay! (I’m explicitly calling FakeQueryable.Where rather than letting extension method resolution find it, just to make things clearer.) +Um, but what’s doing the actual work? We’ve implemented the Where clause without providing any filtering ourselves. It’s really the query provider which has built an appropriate IQueryable implementation. When we call GetEnumerator() implicitly in the foreach loop, the query can examine everything that’s built up in the expression tree (which could contain multiple operators – it’s nesting queries within queries, essentially) and work out what to do. In the case of our IQueryable built from a list, it just does the filtering in-process… but if we were using LINQ to SQL, _that’s_ when the SQL would be generated. The provider recognizes the specific methods from Queryable, and applies filters, projections etc. That’s why it was important that our demo Where method pretended that the real Queryable.Where had been called – otherwise the query provider wouldn’t know what the call expression +Just to hammer the point home even further… Queryable itself neither knows nor cares what kind of data source you’re using. Its job is _not_ to perform any query operations itself; its job is to _record_ the requested query operations in a source-agnostic manner, and let the source provider handle them when it needs to. + +### Immediate execution with IQueryProvider.Execute + +All the operators using deferred execution in Queryable are implemented in much the same way as our demo Where method. However, that doesn’t cover the situation where we need to execute the query _now_, because it has to return a value directly instead of another query. +This time I’m going to use ElementAt as the sample, simply because it’s only got one overload, which makes it very easy to grab the relevant MethodInfo. The general procedure is exactly the same as building a new query, except that this time we call the provider’s Execute method instead of CreateQuery. +public static TSource ElementAt(this IQueryable source, int index) +{ +    if (source == null) +    { +        throw new ArgumentNullException("source"); +    } +         +    Expression sourceExpression = source.Expression; +    Expression indexExpression = Expression.Constant(index); +         +    MethodInfo method = typeof(Queryable).GetMethod("ElementAt");         +    MethodInfo closedMethod = method.MakeGenericMethod(new Type[] { typeof(TSource) }); +         +    // Now we can create a *representation* of this exact method call +    Expression methodCall = Expression.Call(closedMethod, sourceExpression, indexExpression); +         +    // … and ask our query provider to execute it +    return source.Provider.Execute(methodCall); +} +The type argument we provide to Execute is the desired _return_ type – so for Count, we’d call Execute for example. Again, it’s up to the query provider to work out what the call actually means. +It’s worth mentioning that both CreateQuery and Execute have generic and non-generic overloads. I haven’t personally encountered a use for the non-generic ones, but I gather they’re useful for various situations in generated code, particularly if you really don’t know the element type – or at least only know it dynamically, and don’t want to have to use reflection to generate an appropriate generic method call. + +### Transparent support in source code + +One of the aspects of LINQ which raises it to the "genius" status (and "slightly scary" at the same time) is that most of the time, most developers don’t need to make any changes to their source code in order to use Enumerable or Queryable. Take this query expression and its translation: +var query = from person in family +            where person.LastName == "Skeet" +            select person.FirstName; +// Translation +var query = family.Where(person => person.LastName == "Skeet") +                  .Select(person => person.FirstName); +Which set of query methods will that use? It entirely depends on the compile-time type of the "family" variable. If that’s a type which implements IQueryable, it will use the extension methods in Queryable, the lambda expression will be converted into expression trees, and the type of "query" will be IQueryable. Otherwise (and assuming the type implements IEnumerable isn’t some other interesting type such as [ParallelEnumerable](http://msdn.microsoft.com/en-us/library/system.linq.parallelenumerable.aspx)) it will use the extension methods in Enumerable, the lambda expressions will be converted into delgeates, and the type of "query" will be IEnumerable. +The query expression translation part of the specification has no need to care about this, because it’s simply translating into a form which uses lambda expressions – the rest of overload resolution and lambda expression conversion deals with the details. +Genius… although it does mean you need to be careful that _really_ you know where your query evaluation is going to take place – you don’t want to accidentally end up performing your whole query in-process having shipped the entire contents of a database across a network connection… + +### Conclusion + +This was really a whistlestop tour of the "other" side of LINQ – and without going into any of the details of the real providers such as LINQ to SQL. However, I hope it’s given you enough of a flavour for what’s going on to appreciate the general design. Highlights: + +- _Expression trees_ are used to capture logic in a data structure which can be examined relatively easily at execution time +- Lambda expressions can be converted into expression trees as well as delegates +- IQueryable and IQueryable form a sort of parallel interface hierarchy to IEnumerable and IEnumerable – although the queryable forms extend the enumerable forms +- IQueryProvider enables one query to be built based on another, or executed immediately where appropriate +- Queryable provides equivalent extension methods to most of the Enumerable LINQ operators, except that it uses IQueryable sources and expression trees instead of delegates +- Queryable doesn’t handle the queries itself at all; it simply records what’s been called and delegates the real processing to the query provider + +I _think_ I’ve now covered most of the topics I wanted to mention after finishing the actual Edulinq implementation. Next up I’ll talk about some of the thorny design issues (most of which I’ve already mentioned, but which bear repeating) and then I’ll write a brief "series conclusion" post with a list of links to all the other parts. +[C#](https://codeblog.jonskeet.uk/category/csharp/), [Edulinq](https://codeblog.jonskeet.uk/category/edulinq/), [LINQ](https://codeblog.jonskeet.uk/category/linq/) + +# [Reimplementing LINQ to Objects: Part 42 – More optimization](https://codeblog.jonskeet.uk/2011/01/30/reimplementing-linq-to-objects-part-42-more-optimization/) + +[January 30, 2011](https://codeblog.jonskeet.uk/2011/01/30/reimplementing-linq-to-objects-part-42-more-optimization/) [jonskeet](https://codeblog.jonskeet.uk/author/jonskeet/) [4 Comments](https://codeblog.jonskeet.uk/2011/01/30/reimplementing-linq-to-objects-part-42-more-optimization/#comments) +A few parts ago, I jotted down a few thoughts on optimization. Three more topics on that general theme have occurred to me, one of them prompted by the comments. + +### User-directed optimizations + +I mentioned last time that for micro-optimization purposes, we could derive a tiny benefit if there were operators which allowed us to turn off potential optimizations – effectively declare in the LINQ query that we believed the input sequence would _never_ be an IList or an ICollection, so it wasn’t worth checking it. I still believe that level of optimization would be futile. +However, going the other way is entirely possible. Imagine if we could say, "There are probably a lot of items in this collection, and the operations I want to perform on them are independent and thread-safe. Feel free to parallelize them." +That’s exactly what Parallel LINQ gives you, of course. A simple call to AsParallel() somewhere in the query – often at the start, but it doesn’t have to be – enables parallelism. You need to be careful how you use this, of course, which is why it’s opt-in… and it gives you a fair amount of control in terms of degrees of potential parallelism, whether the results are required in the original order and so on. +In some ways my "TopBy" proposal is similar in a very small way, in that it gives information relatively early in the query, allowing the subsequent parts (ThenBy clauses) to take account of the extra information provided by the user. On the other hand, the effect is extremely localized – basically just for the sequence of clauses to do with ordering. +Related to the idea of parallelism is the idea of side-effects, and how they affect LINQ to Objects itself. + +### Side-effects and optimization + +The optimizations in LINQ to Objects appear to make some assumptions about side-effects: + +- Iterating over a collection won’t cause any side-effects +- Predicates _may_ cause side-effects + +Without the first point, all kinds of optimizations would effectively be inappropriate. As the simplest example, Count() won’t use an iterator – it will just take the count of the collection. What if this was an odd collection which mutated something during iteration, though? Or what if accessing the Count property itself had side-effects? At that point we’d be violating our principle of not changing observable behaviour by optimizing. Again, the optimizations are basically assuming "sensible" behaviour from collections. +There’s a rather more subtle possible cause of side-effects which I’ve never seen discussed. In some situations – most obviously Skip – an operator can be implemented to move over an iterator for a time without taking each "current" value. This is due to the separation of MoveNext() from Current. What if we were dealing with an iterator which had side-effects _only when Current was fetched_? It would be easy to write such a sequence – but again, I suspect there’s an implicit assumption that such sequences simply don’t exist, or that it’s reasonable for the behaviour of LINQ operators with respect to them to be left unspecified. +Predicates, on the other hand, might not be so sensible. Suppose we were computing "sequence.Last(x => 10 / x > 1)" on the sequence { 5, 0, 2 }. Iterating over the sequence forwards, we end up with a DivideByZeroException – whereas if we detected that the sequence was a list, and worked our way backwards from the end, we’d see that 10 / 2 > 1, and return that last element (2) immediately. Of course, exceptions aren’t the only kind of side-effect that a predicate can have: it _could_ mutate other state. However, it’s generally easier to spot that and cry foul of it being a proper functional predicate than notice the possibility of an exception. +I believe this is the reason the predicated Last overload _isn’t_ optimized. It would be nice if these assumptions were documented, however. + +### Assumptions about performance + +There’s a final set of assumptions which the common ICollection/IList optimizations have all been making: that using the more "direct" members of the interfaces (specifically Count and the indexer) are more efficient than simply iterating. The interfaces make no such declarations: there’s no requirement that Count _has_ to be O(1), for example. Indeed, it’s not even the case in the BCL. The first time you ask a "view between" on a sorted set for its count after the underlying set has changed, it has to count the elements again. +I’ve had this problem before, [removing items from a HashSet in Java](https://codeblog.jonskeet.uk/2010/07/29/there-s-a-hole-in-my-abstraction-dear-liza-dear-liza). The problem is that there’s no way of communicating this information in a standardized way. We _could_ use attributes for everything, but it gets very complicated, and I strongly suspect it would be a complete pain to use. Basically, performance is one area where abstractions just don’t hold up – or rather, the abstractions aren’t _designed_ to include performance characteristics. +Even if we knew the complexity of (say) Count that still wouldn’t help us necessarily. Suppose it’s an O(n) operation – that sounds bad, until you discover that for this particular horrible collection, _each iteration step_ is also O(n) for some reason. Or maybe there’s a collection with an O(1) count but a _horrible_ constant value, whereas iterating is really quick per item… so for small values of O(n), iteration would be faster. Then you’ve got to bear in mind how much processor time is needed trying to work out the fastest approach… it’s all bonkers. +So instead we make these assumptions, and for the most part they’re correct. Just be aware of their presence. + +### Conclusion + +I have reached the conclusion that I’m tired, and need sleep. I might write about Queryable, IQueryable and query expressions next time. +[C#](https://codeblog.jonskeet.uk/category/csharp/), [Edulinq](https://codeblog.jonskeet.uk/category/edulinq/), [LINQ](https://codeblog.jonskeet.uk/category/linq/) + +# [Reimplementing LINQ to Objects: Part 41 – How query expressions work](https://codeblog.jonskeet.uk/2011/01/28/reimplementing-linq-to-objects-part-41-how-query-expressions-work/) + +[January 28, 2011](https://codeblog.jonskeet.uk/2011/01/28/reimplementing-linq-to-objects-part-41-how-query-expressions-work/) [jonskeet](https://codeblog.jonskeet.uk/author/jonskeet/) [6 Comments](https://codeblog.jonskeet.uk/2011/01/28/reimplementing-linq-to-objects-part-41-how-query-expressions-work/#comments) +Okay, first a quick plug. This _won’t_ be in as much detail as chapter 11 of [C# in Depth](http://manning.com/skeet2/). If you want more, buy a copy. (Until Feb 1st, there’s 43% off it if you buy it from Manning with coupon code j2543.) Admittedly that chapter has to _also_ explain all the basic operators rather than just query expression translations, but that’s a fair chunk of it. +If you’re already familiar with query expressions, don’t expect to discover anything particularly insightful here. However, you might be interested in the cheat sheet at the end, in case you forget some of the syntax occasionally. (I know I do.) + +### What is this "query expression" of which you speak? + +Query expressions are a little nugget of goodness hidden away in section 7.16 of the [C# specification](http://csharpindepth.com/Articles/Chapter1/Specifications.aspx). Unlike some language features like generics and dynamic typing, query expressions keep themselves to themselves, and don’t impinge on the rest of the spec. A query expression is a bit of C# which looks a bit like a mangled version of SQL. For example: +from person in people +where person.FirstName.StartsWith("J") +orderby person.Age +select person.LastName +It looks somewhat unlike the rest of C#, which is both a blessing and a curse. On the one hand, queries stand out so it’s easy to see they’re queries. On the other hand… they stand out rather than fitting in with the rest of your code. To be honest I haven’t found this to be an issue, but it can take a little getting used to. +Every query expression can be represented in C# code, but the reverse isn’t true. Query expressions only take in a subset of the standard query operators – and only a limited set of the overloads, at that. It’s not unusual to see a query expression followed by a "normal" query operator call, for example: +var list = (from person in people +            where person.FirstName.StartsWith("J") +            orderby person.Age +            select person.LastName) +           .ToList(); +So, that’s very roughly what they look like. That’s the sort of thing I’m dealing with in this post. Let’s start dissecting them. + +### Compiler translations + +First it’s worth introducing the general principle of query expressions: they effectively get translated step by step into C# which eventually _doesn’t_ contain any query expressions. To stick with our first example, that ends up be translated into this code: +people.Where(person => person.FirstName.StartsWith("J")) +      .OrderBy(person => person.Age) +      .Select(person => person.LastName) +It’s important to understand that the compiler hasn’t done anything apart from systematic translation to get to this point. In particular, so far we haven’t depended on what "people" is, nor "Where", "OrderBy" or "Select". +Can you tell what this code does yet? You can probably hazard a pretty good guess, but you can’t tell. Is it going to call Edulinq.Enumerable.Select, or System.Linq.Enumerable.Select, or something entirely different? It depends on the context. Heck, "people" could be the name of a type which has a static Where method. Or maybe it could be a reference to a class which has an _instance_ method called Where… the options are open. +Of course, they don’t stay open for long: the compiler takes that expression and compiles it applying all the normal rules. It converts the lambda expression into either a delegate or an expression tree, tries to resolve Where, OrderBy and Select as normal, and life continues. (Don’t worry if you’re not sure about expression trees yet – I’ll come to them in another post.) +The important point is that the query expression translations don’t know about System.Linq. The spec barely mentioned IEnumerable, and certainly doesn’t rely on it. The whole thing is _pattern based_. If you have an API which provides some or all of the operators used by the pattern, in an appropriate way, you can use query expressions with it. That’s the secret sauce that allows you to use the same syntax for LINQ to Objects, LINQ to SQL, LINQ to Entities, Reactive Extensions, Parallel Extensions and more. + +### Range variables and the initial "from" clause + +The first part of the query to look at is the first "from" clause, at the start of the query. It’s worth mentioning upfront that this is handled somewhat differently to any _later_ "from" clauses – I’ll explain how they’re translated later. +So we have an expression of the form: +from _[type]_ _identifier_ in _expression_ +The "expression" part is just any expression. In most cases there _isn’t_ a type specified, in which case the translated version is simply the expression, but with the compiler remembering the identifier as a _range variable_. I’ll do my best to explain what range variables are in a minute :) +If there _is_ a type specified, that represents a call to Cast<_type_>(). So examples of the two translations so far are: +// Query (incomplete) +from x in people +// Translation (+ range variable of "x") +people +// Query (incomplete) +from Person x in people +// Translation (+ range variable of "x") +(people).Cast() +These aren’t complete query expressions – queries have very precise rules about how they can start and end. They _always_ start with a "from" clause like this, and always end either with a "group by" clause or a "select" clause. +So what’s the point of the range variable? Well, that’s what gets used as the name of the lambda expression parameter used in all the later clauses. Let’s add a select clause to create a complete expression and demonstrate how the variable could be used. + +### A "select" clause + +A select clause is usually translated into a call to Select, using the "body" of the clause as the body of the lambda expression… and the range variable as the parameter. So to expand our previous query, we might have this translation: +// Query +from x in people +select x.Name +// Translation +people.Select(x => x.Name) +That’s all that range variables are used for: to provide placeholders within lambda expressions, effectively. They’re quite unlike normal variables in most senses. It only makes sense to talk about the "value" of a range variable within a particular clause at a particular point in time when the clause is executing, for one particular value. Their nearest conceptual neighbour is probably the iteration variable declared in a foreach statement, but even that’s not really the same – particularly given the way [iteration variables are captured](http://blogs.msdn.com/b/ericlippert/archive/2009/11/12/closing-over-the-loop-variable-considered-harmful.aspx), often to the surprise of developers. +The body part has to be a single _expression_ – you can’t use "statement lambdas" in query expressions. For example, there’s no query expression which would translate to this: +// Can’t express this in a query expression +people.Select(x => {  +                     Console.WriteLine("Got " + x); +                     return x.Name; +                   }) +That’s a perfectly valid C# expression, it’s just there’s now way of expressing it directly as a query expression. +I mentioned that a select clause _usually_ translates into a Select call. There are two cases where it doesn’t: + +- If it’s the sole clause after a secondary "from" clause, or a "group by", "join" or "join … into" clause, the body is used in the translation of that clause +- If it’s an "identity" projection coming after another clause, it’s removed entirely. + +I’ll deal with the first point when we reach the relevant clauses. The second point leads to these translations: +// Query +from x in people +where x.IsAdult +select x +// Translation: Select is removed +people.Where(x => x.IsAdult) +// Query +from x in people +select x +// Translation: Select is *not* removed +people.Select(x => x) +The point of including the "pointless" select in the second translation is to hide the original source sequence; it’s assumed that there’s no need to do this in the first translation as the "Where" call will already have protected the source sufficiently. + +### The "where" clause + +This one’s really simple – especially as we’ve already seen it! A where clause always just translates into a Where call. Sample translation, this time with no funny business removing degenerate query expressions: +// Query +from x in people +where x.IsAdult +select x.Name +// Translation +people.Where(x => x.IsAdult) +      .Select(x => x.Name) +Note how the range variable is propagated through the query. + +### The "orderby" clause + +Here’s a secret: I can never remember offhand whether it’s "orderby" or "order by" – it’s confusing because it really is "group by", but "orderby" is actually just a single word. Of course, Visual Studio gives a pretty unsubtle hint in terms of colouring. +In the simplest form, an orderby clause might look like this: +// Query +from x in people +orderby x.Age +select x.Name +// Translation +people.OrderBy(x => x.Age) +      .Select(x => x.Name) +There are two things which can add complexity though: + +- You can order by multiple expressions, separating them by commas +- Each expression can be ordered ascending implicitly, ascending _explicitly_ or descending explicitly. + +The first sort expression is always translated into OrderBy or OrderByDescending; subsequent ones always become ThenBy or ThenByDescending. It makes no difference whether you explicitly specify "ascending" or not – I’ve very rarely seen it in real queries. Here’s an example putting it all together: +// Query +from x in people +orderby x.Age, x.FirstName descending, x.LastName ascending +select x.LastName +// Translation +people.OrderBy(x => x.Age) +      .ThenByDescending(x => x.FirstName) +      .ThenBy(x => x.LastName) +      .Select(x => x.LastName) +Top tip: don’t use multiple "orderby" clauses consecutively. This query is almost certainly _not_ what you want: +// Don’t do this! +from x in people  +orderby x.Age +orderby x.FirstName +select x.LastName +That will end up sorting by FirstName and _then_ Age, and doing so rather slowly as it has to sort twice. + +### The "group by" clause + +Grouping is another alternative to "select" as the final clause in a query. There are two expressions involved: the element selector (what you want to get in each group) and the key selector (how you want the groups to be organized). Unsurprisingly, this uses the GroupBy operator. So you might have a query to group people in families by their last name, with each group containing the first names of the family members: +// Query expression +from x in people  +group x.FirstName by x.LastName +// Translation +people.GroupBy(x => x.LastName, x => x.FirstName) +If the element selector is trivial, it isn’t specified as part of the translation: +// Query expression +from x in people  +group x by x.LastName +// Translation +people.GroupBy(x => x.LastName) + +### Query continuations + +Both "select" and "group by" can be followed by "into _identifier_". This is known as a _query continuation_, and it’s really simple. Its translation in the specification isn’t in terms of a method call, but instead it transforms one query expression into another, effectively nesting one query as the source of another. I find that translation tricky to think about, personally… I prefer to think of it as using a temporary variable, like this: +// Original query +var query = from x in people +            select x.Name into y +            orderby y.Length +            select y[0]; +// Query continuation translation +var tmp = from x in people +          select x.Name; +var query = from y in tmp +            orderby y.Length +            select y[0]; +// Final translation into methods +var query = people.Select(x => x.Name) +                  .OrderBy(y => y.Length) +                  .Select(y => y[0]); +Obviously that final translation _could_ have been expressed in terms of two statements as well… they’d be equivalent. This is why it’s important that LINQ uses deferred execution – you can split up a query as much as you like, and it won’t alter the execution flow. The query wouldn’t actually _execute_ when the value is assigned to "tmp" – it’s just _preparing_ the query for execution. + +### Transparent identifiers and the "let" clause + +The rest of the query expression clauses all introduce an extra range variable in some form or other. This is the part of query expression translation which is hardest to understand, because it affects how any usage of the range variable in the query expression is translated. +We’ll start with probably the simplest of the remaining clauses: the "let" clause. This simply introduces a new range variable based upon a projection. It’s a bit like a "select", but after a "let" clause both the original range variable _and_ the new one are in scope for the rest of the query. They’re typically used to avoid redundant computations, or simply to make the code simpler to read. For example, suppose computing an employee’s tax is a complicated operation, and we want to display a list of employees and the tax they pay, with the higher tax-payer first: +from x in employees +let tax = x.ComputeTax() +orderby tax descending +select x.LastName + ": " + tax +That’s pretty readable, and we’ve managed to avoid computing the tax twice (once for sorting and once for display). +The problem is, both "x" and "tax" are in scope at the same time… so what are we going to pass to the Select method at the end? We need one entity to pass through our query, which knows the value of both "x" and "tax" at any point (after the "let" clause, obviously). This is precisely the point of a transparent identifier. You can think of the above query as being translated into this: +// Translation from "let" clause to another query expression +from x in employees +select new { x, tax = x.ComputeTax() } into z +orderby z.tax descending +select z.x.LastName + ": " + z.tax +// Final translated query +employees.Select(x => new { x, tax = x.ComputeTax() }) +         .OrderByDescending(z => z.tax) +         .Select(z => z.x.LastName + ": " + z.tax) +Here "z" is the transparent identifier – which I’ve made somewhat more opaque by giving it a name. In the specification, the query translations are performed in terms of "*" – which clearly isn’t a valid identifier, but which stands in for the transparent one. +The good news about transparent identifiers is that most of the time you don’t need to think of them at all. They simply let you have multiple range variables in scope at the same time. I find myself only bothering to think about them explicitly when I’m trying to work out the full translation of a query expression which uses them. It’s worth knowing about them to avoid being stumped by the concept of (say) a select clause being able to use multiple range variables, but that’s all. +Now that we’ve got the basic concept, we can move onto the final few clauses. + +### Secondary "from" clauses + +We’ve seen that the introductory "from" clause isn’t actually translated into a method call, but any subsequent ones are. The syntax is still the same, but the translation uses SelectMany. In many cases this is used just like a cross-join (Cartesian product) but it’s more flexible than that, as the "inner" sequence introduced by the secondary "from" clause can depend on the current value from the "outer" sequence. Here’s an example of that. with the call to SelectMany in the translation: +// Query expression +from parent in adults +from child in parent.Children +where child.Gender == Gender.Male +select child.Name + " is a son of " + parent.Name +// Translation (using z for the transparent identifier) +adults.SelectMany(parent => parent.Children, +                  (parent, child) => new { parent, child }) +      .Where(z => z.child.Gender == Gender.Male) +      .Select(z => z.child.Name + " is a son of " + z.parent.Name; +Again we can see the effect of the transparent identifier – an anonymous type is introduced to propagate the { parent, child } tuple through the rest of the query. +There’s a special case, however – if "the rest of the query" is _just_ a "select" clause, we don’t need the anonymous type. We can just apply the projection directly in the SelectMany call. Here’s a similar example, but this time without the "where" clause: +// Query expression +from parent in adults +from child in parent.Children +select child.Name + " is a child of " + parent.Name +// Translation (using z for the transparent identifier) +adults.SelectMany(parent => parent.Children, +                  (parent, child) => child.Name + " is a child of " + parent.Name) +This same trick is used in GroupJoin and Join, but I won’t go into the details there. It’s simpler to just provide examples which use the shortcut, instead of including unnecessary extra clauses just to force the transparent identifier to appear in the translation. +Note that just like the introductory "from" clause, you can specify a type for the range variable, which forces a call to "Cast<>". + +### Simple "join" clauses (no "into") + +A "join" clause without an "into" part corresponds to a call to the Join method, which represents an inner equijoin. In some ways this is like an extra "from" clause with a "where" clause to provide the relevant filtering, but there’s a significant difference: while the "from" clause (and SelectMany) allow you to project each element in the outer sequence to an inner sequence, in Join you merely provide the inner sequence directly, once. You also have to specify the two key selectors – one for the outer sequence, and one for the inner sequence. The general syntax is: +join _identifier_ in _inner-sequence_ on _outer-key-selector_ equals _inner-key-selector_ +The identifier names the extra range variable introduced. Here’s an example including the translation: +// Query expression +from customer in customers +join order in orders on customer.Id equals order.CustomerId +select customer.Name + ": " + order.Price +// Translation +customers.Join(orders, +               customer => customer.Id, +               order => order.CustomerId, +               (customer, order) => customer.Name + ": " + order.Price) +Note how if you put the key selectors the wrong way round, it’s highly unlikely that the result will compile – the lambda expression for the outer sequence doesn’t "know about" the inner sequence element, and vice versa. The C# compiler is even nice enough to guess the probable cause, and suggest the fix. + +### Group joins – "join … into" + +Group joins look exactly the same as inner joins, except they have an extra "into _identifier_" part at the end. Again, this introduces an extra range variable – but it’s the identifier after the "into" which ends up in scope, not the one after "join"; that one is _only_ used in the key selector. This is easier to see when we look at a sample translation: +// Query expression +from customer in customers +join order in orders on customer.Id equals order.CustomerId into customerOrders +select customer.Name + ": " + customerOrders.Count() +// Translation +customers.GroupJoin(orders, +                    customer => customer.Id, +                    order => order.CustomerId, +                    (customer, customerOrders) => customer.Name + ": " + customerOrders.Count()) +If we had tried to refer to "order" in the select clause, the result would have been an error: it’s not in scope any more. Note that this is _not_ a query continuation unlike "select … into" and "group … into". It introduces a new range variable, but all the previous range variables are still in scope. +That’s it! That’s all the translations that the C# compiler supports. VB’s query expressions are rather richer – but I suspect that’s at least _partly_ because it’s more painful to write the "dot notation" syntax in VB, as the lambda expression syntax isn’t as nice as C#’s. + +### Translation cheat sheet + +I thought it would be useful to produce a short table of the kinds of clauses supported in query expressions, with the translation used by the C# compiler. The translation is given assuming a single range variable named "x" is in scope. I haven’t given the alternative options where transparent identifiers are introduced – this table isn’t meant to be a replacement for all the information above! (Likewise this doesn’t mention the optimizations for degenerate query expressions or "identity projection" groupings.) + +| | | +|---|---| +|**Query expression clause**|**Translation**| +|First "from _[type]_ _x_ in _sequence_"|Just "sequence" or "sequence.Cast()", but with the introduction of a range variable| +|Subsequent "from" clauses:
    "from _[type] y_ in _projection_"|SelectMany(x => projection, (x, y) => new { x, y })
    or SelectMany(x => projection.Cast(), (x, y) => new { x, y })| +|where _predicate_|Where(x => predicate)| +|select _projection_|Select(x => projection)| +|let y = projection|Select(x => new { x, y = projection })| +|orderby o1, o2 ascending, o3 descending
    (Each ordering may have descending or ascending specified explicitly; the default is ascending)|OrderBy(x => o1)
    .ThenBy(x => o2)
    .ThenByDescending(x => o3)| +|group _projection_ by _key-selector_|GroupBy(x => key-selector, x => projection)| +|join _y_ in _inner-sequece_
    _on_ _outer-key-selector_ equals _inner-key-selector_|Join(x => outer-key-selector,
        y => inner-key-selector,
        (x, y) => new { x, y })| +|join _y_ in _inner-sequece_
    _on_ _outer-key-selector_ equals _inner-key-selector_
    _into_ _z_|GroupJoin(x => outer-key-selector,
        y => inner-key-selector,
        (x, z) => new { x, z })| +|_query1_ into _y_
    _query2_|(Translation in terms of a new query expression)
    from y in (query1)
    query2| + +### Conclusion + +Hopefully that’s made a certain amount of sense out of a fairly complicated topic. I find it’s one of those "aha!" things – at some point it clicks, and then seems reasonably simple (aside from transparent identifiers, perhaps). Until that time, query expressions can be a bit magical. +As an aside, I have a sneaking suspicion that one of my first blog posts consisted of my initial impressions of LINQ, written in a plane on the way to the MVP conference in Seattle in September 2005. I would check, but I’m finishing this post in another plane, this time on the way to San Francisco. I think I’d have been somewhat surprised to be told in 2005 that I’d still be writing blog posts about LINQ over five years later. Mind you, I can think of any number of things which have happened in the intervening years which would have astonished me to about the same degree. +Next time: some more thoughts on optimization. Oh, and I’m likely to update my wishlist of extra operators as well, but within the existing post. +[C#](https://codeblog.jonskeet.uk/category/csharp/), [Edulinq](https://codeblog.jonskeet.uk/category/edulinq/), [LINQ](https://codeblog.jonskeet.uk/category/linq/) + +# [Reimplementing LINQ to Objects: Part 40 – Optimization](https://codeblog.jonskeet.uk/2011/01/26/reimplementing-linq-to-objects-part-40-optimization/) + +[January 26, 2011](https://codeblog.jonskeet.uk/2011/01/26/reimplementing-linq-to-objects-part-40-optimization/) [jonskeet](https://codeblog.jonskeet.uk/author/jonskeet/) [8 Comments](https://codeblog.jonskeet.uk/2011/01/26/reimplementing-linq-to-objects-part-40-optimization/#comments) +I’m not an expert in optimization, and most importantly I don’t have any real-world benchmarks to support this post, so please take it with a pinch of salt. That said, let’s dive into what optimizations are available in LINQ to Objects. + +### What do we mean by optimization? + +Just as we think of refactoring as changing the internal structure of code without changing its externally visible behaviour, optimization is the art/craft/science/voodoo of changing the _performance_ of code without changing its externally visible behaviour. Sort of. +This requires two definitions: "performance" and "externally visible behaviour". Neither are as simple as they sound. In almost all cases, performance is a trade-off, whether in speed vs memory, throughput vs latency, big-O complexity vs the factors _within_ that complexity bound, and best case vs worst case. +In LINQ to Objects the "best case vs worst case" is the balance which we need to consider most often: in the cases where we can make a saving, how significant is that saving? How much does it cost in _every_ case to make a saving _some_ of the time? How often do we actually take the fast path? +Externally visible behaviour is even harder to pin down, because we definitely don’t mean _all_ externally visible behaviour. Almost all the optimizations in Edulinq are visible if you work hard enough – indeed, that’s how I have unit tests for them. I can test that Count() uses the Count property of an ICollection instead of iterating over it by creating an ICollection implementation which works with Count but throws an exception if you try to iterate over it. I don’t think we care about that sort of change to externally visible behaviour. +What we really mean is, "If we use the code in a _sensible_ way, will we get the same results with the optimized code as we would without the optimization?" Much better. Nothing woolly about the term "sensible" at all, is there? More realistically, we could talk about a system where every type adheres to the contracts of every interface it implements – that would at least get rid of the examples used for unit testing. Still, even the performance of a system is externally visible… it’s easy to tell the difference between an implementation of Count() which is optimized and one which isn’t, if you’ve got a list of 10 million items. + +### How can we optimize in LINQ to Objects? + +Effectively we have one technique for significant optimization in LINQ to Objects: finding out that a sequence implements a more capable interface than IEnumerable, and then using that interface. (Or in the case of my optimization for HashSet and Contains, using a concrete type in the same way.) Count() is the most obvious example of this: if the sequence implements ICollection or ICollection, then we can use the Count property on that interface and we’re done. No need to iterate at all. +These are generally good optimizations because they allow us to transform an O(n) computation into an O(1) computation. That’s a pretty big win when it’s applicable, and the cost of checking is _reasonably_ small. So long as we hit the right type once every so often – and particularly if in those cases the sequences are long – then it’s a net gain. The performance characteristics are likely to be reasonably fixed here for any one program – it’s not like we’ll _sometimes_ win and _sometimes_ lose for a specific query… it’s that for some queries we win and some we won’t. If we were micro-optimizing, we might want a way of calling a "non-optimized" version which didn’t even bother trying the optimization, because we know it will always fail. I would regard such an approach as a colossal waste of effort in the majority of cases. +Some optimizations are slightly less obvious, particularly because they don’t offer a change in the big-O complexity, but can still make a significant difference. Take ToArray, for example. If we know the sequence is an IList we can construct an array of exactly the right size and ask the list to copy the elements into it. Chances are that copy can be very efficient indeed, basically copying a whole block of bits from one place to another – and we know we won’t need any resizing. Compare that with building up a buffer, resizing periodically including copying all the elements we’ve already discovered. Every part of that process is going to be slower, but they’re both O(n) operations really. This is a good example of where big-O notation doesn’t tell the whole story. Again, the optimization is almost certainly a good one to make. +Then there are distinctly dodgy optimizations which _can_ make a difference, but are unlikely to apply. My optimization for ElementAt and ElementAtOrDefault comes into play here. It’s fine to check whether an object implements IList, and use the indexer if so. That’s an obvious win. But I have an extra optimization to exit quickly if we can find out that the given index is out of the bounds of the sequence. Unfortunately that optimization is only useful when: + +- The sequence implements ICollection or ICollection (but remember it has to implement IEnumerable – there aren’t many collections implementing _only_ the non-generic ICollection, but the generic IEnumerable) +- The sequence _doesn’t_ implement IList (which gets rid of almost all implementations of ICollection) +- The given index is _actually_ greater than or equal to the size of the collection + +All that comes at the cost of a couple of type checks… not a great cost, and we _do_ potentially save an O(n) check for being given an index out of the bounds of the collection… but how often are we really going to make that win? This is where I’d love to have something like [Dapper](http://research.google.com/pubs/pub36356.html), but applied to LINQ to Objects and running in a significant number of real-world projects, just logging in as light a way as possible how often we win, how often we lose, and how big the benefit is. +Finally, we come to the optimizations which don’t make sense to me… such as the optimization for First in both Mono and LinqBridge. Both of these projects check whether the sequence is a list, so that they check the count and then use the indexer to fetch item 0 instead of calling GetEnumerator()/MoveNext()/Current. Now yes, there’s a chance this avoids creating an extra object (although not always, [as we’ve seen before](https://codeblog.jonskeet.uk/2011/01/18/gotcha-around-iterator-blocks)) – but they’re both O(1) operations which are likely to be darned fast. At this point not only is the payback very small (if it even exists) but the whole operation is likely to be so fast that the tiny check for whether the object implements IList is likely to become more significant. Oh, and then there’s the extra code complexity – yes, that’s only relevant to the implementers, but I’d personally rather they spent their time on other things (like getting OrderByDescending to work properly… smirk). In other words, I think this is a _bad_ target for optimization. At some point I’ll try to do a quick analysis of just how often the collection has to implement IList in order for it to be worth doing this – and whether the improvement is even measurable. +Of course there are other micro-optimizations available. When we don’t need to fetch the current item (e.g. when skipping over items) let’s just call MoveNext() instead of also assigning the return value of a property to a variable. I’ve done that in various places in Edulinq, but _not_ as an optimization strategy, which I suspect won’t make a significant difference, but for readability – to make it clearer to the reader that we’re just moving along the iterator, not examining the contents as we go. +The only other piece of optimization I think I’ve performed in Edulinq is the "yield the first results before sorting the rest" part of my quicksort implementation. I’m reasonably proud of that, at least conceptually. I don’t think it really fits into any other bucket – it’s just a matter of thinking about what we really need and when, deferring work just in case we never need to do it. + +### What can we _not_ optimize in LINQ to Objects? + +I’ve found a few optimizations in both Edulinq and other implementations which I believe to be invalid. +Here’s an example I happened to look at just this morning, when reviewing the code for [Skip](https://codeblog.jonskeet.uk/2011/01/02/reimplementing-linq-to-objects-part-23-take-skip-takewhile-skipwhile): +var list = source as IList; +if (list != null) +{ +    count = Math.Max(count, 0); +    // Note that "count" is the count of items to skip +    for (int index = count; index < list.Count; index++) +    { +        yield return list[index]; +    } +    yield break; +} +If our sequence is a list, we can just skip straight to the right part of it and yield the items one at a time. That sounds great, but what if the list changes (or is even truncated!) while we’re iterating over it? An implementation working with the simple iterator would usually throw an exception, as the change would invalidate the iterator. This is definitely a behavioural change. When I first wrote about Skip, I included this as a "possible" optimization – and actually turned it on in the Edulinq source code. I now believe it to be a mistake, and have removed it completely. +Another example is Reverse, and how it should behave. The documentation is fairly unclear, but when I ran the tests, the Mono implementation used an optimization whereby if the sequence is a list, it will just return items from the tail end using the indexer. (This has now been fixed – the Mono team is quick like that!) Again, that means that changes made to the list while iterating will be reflected in the reversed sequence. I believe the documentation for Reverse _ought_ to be clear that: + +- Execution is deferred: the input sequence isn’t read when the method is called. +- When the result sequence is first read by the caller, a snapshot is taken, and _that’s_ what’s used to return the data. +- If the result sequence is read more than once (i.e. GetEnumerator is called more than once) then a new snapshot is created each time – so changes to the input sequence between calls to GetEnumerator on the result sequence _will_ be observed. + +Now this is still not as precise as it might be in terms of what "reading" a sequence entails – in particular, a simple implementation of Reverse (as per Edulinq) will actually take the snapshot on the first call to MoveNext() on the iterator returned by GetEnumerator() – but that’s probably not too bad. The snapshotting behaviour itself is important though, and should be made explicit in my opinion. +The problem with both of these "optimizations" is arguably that they’re applying list-based optimizations _within an iterator block used for deferred execution_. Optimizing for lists either upfront at the point of the initial method call or within an immediate execution operator (Count, ToList etc) is fine, because we assume the sequence won’t change during the course of the method’s execution. We can’t make that assumption with an iterator block, because the flow of the code is very different: our code is visited repeatedly based on the caller’s use of MoveNext(). + +##### Sequence identity + +Another aspect of behaviour which isn’t well-specified is that of identity. When is it valid for an operator to return the input sequence itself as the result sequence? +In the Microsoft implementation, this can occur in two operators: AsEnumerable (which _always_ returns the input sequence reference, even if it’s null) and Cast (which returns the original reference only if it actually implements IEnumerable). +In Edulinq, I have two other operators which can return the input sequence: OfType (only if the original reference implements IEnumerable and TResult is a non-nullable value type) and Skip (if you provide a count which is zero or negative). Are these valid optimizations? Let’s think about why we might _not_ want them to be… +If you’re returning a sequence from one layer of your code to another, you usually want that sequence to be viewed _only_ as a sequence. In particular, if it’s backed by a List, you don’t want callers casting to List and modifying the list. With any operator implemented by an iterator block, that’s fine – the object returned from the operator has no accessible reference to its input, and the type itself only implements IEnumerable (and IEnumerator, and IDisposable, etc – but not IList). It’s not so good if the operator decides it’s okay to return the original reference. +The C# language specification refers to this in the section about query expression translation: a no-op projection at the end of a query can be omitted _if and only if there are other operators in the query_. So a query expression of "from foo in bar select foo" will translate to "bar.Select(foo => foo)" but if we had a "where" clause in the query, the Select call would be removed. It’s worth noting that the call to "Cast" generated when you explicitly specify the type of a range variable is _not_ enough to prevent the "no-op" projection from being generated… it’s almost as if the C# team "knows" that Cast can leak sequence identity whereas Where can’t. +Personally I think that the "hiding" of the input sequence should be guaranteed where it makes sense to do so, and explicitly _not_ guaranteed otherwise. We could also add an operator of something like "HideIdentity" which would simply (and unconditionally) add an extra iterator block into the pipeline. That way library authors wouldn’t have to guess, and would have a clear way of expressing their intention. Using Select(x => x) or Skip(0) is _not_ clear, and in the case of Skip it would even be pointless when using Edulinq. +As for whether my optimizations are valid – that’s up for debate, really. It seems hard to justify why leaking sequence identity would be okay for Cast but _not_ okay for OfType, whereas I think there’s a better case for claiming that Skip should always hide sequence identity. + +##### The Contains issue… + +If you remember, I have a disagreement around what Contains should do when you don’t provide an equality comparer, and when the sequence implements ICollection. I believe it should be consistent with the rest of LINQ to Objects, which _always_ uses the default equality comparer for the element type when it needs one but the user hasn’t specified one. Everyone else (Microsoft, Mono, LinqBridge) has gone with delegating to the collection’s implementation of ICollection.Contains. That plays well in terms of consistency of what happens if you call Contains on that object, so that it doesn’t matter what the compile-time type is. That’s a debate to go into in another post, but I just want to point out that this is _not_ an example of optimization. In some cases it may be faster (notably for HashSet) but it stands a _very_ good chance of changing the behaviour. There is absolutely nothing to suggest that the equality comparer used by ICollection should be the default one for the type – and in some cases it definitely isn’t. +It’s therefore a matter of what _result_ we want to get, not how to get that result faster. It’s correctness, not optimization – but both the LinqBridge and Mono tests which fail for Edulinq are called "Contains_CollectionOptimization_ReturnsTrueWithoutEnumerating" – and I think that shows a mistaken way of thinking about this. + +### Can we go further? + +I’ve been considering a couple of optimizations which I believe to be perfectly legitimate, but which none of the implementations I’ve seen have used. One reason I haven’t implemented them myself yet is that they will reduce the effectiveness of all my unit tests. You see, I’ve generally used Enumerable.Range as a good way of testing a non-list-based sequence… but what’s to stop Range and Repeat being implemented _as_ IList implementations? +All the non-mutating members are easy to implement, and we can just throw exceptions from the mutating members (as other read-only collections do). +Would this be more efficient? Well yes, if you ever performed a Count(), ElementAt(), ToArray(), ToList() etc operation on a range or a repeated element… but how often is _that_ going to happen? I suspect it’s pretty rare – probably rare enough not to make it worth my time, particularly when you then consider all the tests that would have to be rewritten to use something other than Range when I wanted a non-list sequence… + +### Conclusion + +Surprise, surprise – doing optimization well is difficult. When it’s obvious what _can_ be done, it’s not obvious what _should_ be done… and sometimes it’s not even what is valid in the first place. +Note that none of this has really talked about data structures and algorithms. I looked at some options when implementing ordering, and I’m _still_ thinking about the best approach for implementing TopBy (probably either a heap or a self-balancing tree – something which could take advantage of the size being constant would be nice) – but _in general_ the optimizations here haven’t required any cunning knowledge of computer science. That’s quite a good thing, because it’s many years since I’ve studied CS seriously… +I suspect that with this post more than almost any other, I’m likely to want to add extra items in the future (or amend mistakes which reveal my incompetence). Watch this space. +Next up, I think it would be worth revisiting query expressions from scratch. Anyone who’s read C# in Depth or has followed this blog for long enough is likely to be able to skip it, but I think the series would be incomplete without a quick dive into the compiler translations involved. +[C#](https://codeblog.jonskeet.uk/category/csharp/), [Edulinq](https://codeblog.jonskeet.uk/category/edulinq/), [LINQ](https://codeblog.jonskeet.uk/category/linq/) + +# [Reimplementing LINQ to Objects: Part 39 – Comparing implementations](https://codeblog.jonskeet.uk/2011/01/25/reimplementing-linq-to-objects-part-39-comparing-implementations/) + +[January 25, 2011](https://codeblog.jonskeet.uk/2011/01/25/reimplementing-linq-to-objects-part-39-comparing-implementations/) [jonskeet](https://codeblog.jonskeet.uk/author/jonskeet/) [12 Comments](https://codeblog.jonskeet.uk/2011/01/25/reimplementing-linq-to-objects-part-39-comparing-implementations/#comments) +While implementing Edulinq, I only focused on two implementations: .NET 4.0 and Edulinq. However, I was aware that there were other implementations available, notably [LinqBridge](http://linqbridge.googlecode.com/) and the one which comes with [Mono](http://mono-project.com/). Obviously it’s interesting to see how other implementations behave, so I’ve now made a few changes in order to make the test code run in these different environments. + +### The test environments + +I’m using Mono 2.8 (I can’t remember the minor version number offhand) but I tend to think of it as "Mono 3.5" or "Mono 4.0" depending on which runtime I’m using and which base libraries I’m compiling against, to correspond with the .NET versions. Both runtimes ship as part of Mono 2.8. I will use these version numbers for this post, and ask forgiveness for my lack of precision: whenever you see "Mono 3.5" please just think "Mono 2.8 running against the 2.0 runtime, possibly using some of the class libraries normally associated with .NET 3.5". +LinqBridge is a bit like Edulinq – a clean room implementation of LINQ to Objects, but built against .NET 2.0. It contains its own Func delegate declarations and its own version of ExtensionAttribute for extension methods. In my experience this makes it difficult to use with the "real" .NET 3.5, so my build targets .NET 2.0 when running against LinqBridge. This means that tests using HashSet had to be disabled. The version of LinqBridge I’m running against is 1.2 – the latest binary available on the web site. This has AsEnumerable as a plain static method rather than an extension method; the code has been fixed in source control, but I wanted to run against a prebuilt binary, so I’ve just disabled my own AsEnumerable tests for LinqBridge. Likewise the tests for Zip are disabled both for LinqBridge and the "Mono 3.5" tests as Zip was only introduced in .NET 4. +The other issue of not having .NET 4 available in the tests is that the string.Join(string, IEnumerable) overload is unavailable – something I’d used quite a lot in the test code. I’ve created a new static class called "StringEx" and replaced string.Join with StringEx.Join everywhere. +There are batch files under a new "testing" directory which will build and run: + +- Microsoft’s LINQ to Objects and Edulinq under .NET +- LinqBridge, Mono 3.5’s LINQ to Objects and Edulinq under Mono 3.5 +- Mono 4.0’s LINQ to Objects and Edulinq under Mono 4.0 + +Although I have LinqBridge running under .NET 2.0 in Visual Studio, it’s a bit of a pain building the tests from a batch file (at least without just calling msbuild). The failures running under Mono 3.5 are the same as those running under .NET 2.0 as far as I can tell, so I’m not too worried. +Note that while I have built the Mono tests under both the 3.5 and 4.0 profiles, the results were the same other than due to generic variance, so I’ve only included the results of the 4.0 profile below. + +### What do the tests cover? + +Don’t forget that the Edulinq tests were written in the spirit of investigation. They cover aspects of LINQ’s behaviour which are not guaranteed, both in terms of optimization and simple correctness of behaviour. I have included a test which demonstrates the "issue" with calling Contains on an ICollection which uses a non-default equality comparer, as well as the known issue with OrderByDescending using a comparer which returns int.MinValue. There are optimizations which are present in Edulinq but not in LINQ to Objects, and I have tests for those, too. +The tests which fail against Microsoft’s implementation (for known reasons) are normally marked with an [Ignore] attribute to prevent them from alarming me unduly during development. NUnit categories would make more sense here, but I don’t believe ReSharper supports them, and that’s the way I run the tests normally. Likewise the tests which take a very long time (such as counting more than int.MaxValue elements) are normally suppressed. +In order to truly run _all_ my tests, I now have a horrible hack using conditional compilation: if the ALL_TESTS preprocessor symbol is defined, I build my own IgnoreAttribute class in the Edulinq.Tests namespace, which effectively takes precedence over the NUnit one… so NUnit will ignore the [Ignore], so to speak. Frankly all this conditional compilation is pretty horrible, and I wouldn’t use it for a "real" project, but this is a slightly unusual situation. +EDIT: It turns out that ReSharper _does_ support categories. I’m not sure how far that support goes yet, but at the very least there’s "Group by categories" available. I may go through _all_ my tests and apply a category to each one: optimization, execution mode, time-consuming etc. We’ll see whether I can find the energy for that :) +So, let’s have a look at what the test results are… + +### Edulinq + +Unsurprisingly, Edulinq passes all its own tests, with the minor exception of CastTest.OriginalSourceReturnedDueToGenericCovariance running under Mono 3.5, which doesn’t include covariance. Arguably this test should be conditionalised to not even run in that situation, as it’s not expected to work. + +### Microsoft’s LINQ to Objects + +8 failures, all expected: + +- Contains delegates to the ICollection.Contains implementation if it exists, rather than using the default comparer for the type. This is a design and documentation issue which I’ve discussed in more detail in the [Contains part of this series](https://codeblog.jonskeet.uk/2011/01/12/reimplementing-linq-to-objects-part-32-contains). +- Optimization: ElementAt and ElementAtOrDefault don’t validate the specified index eagerly when the input sequence implements ICollection but not IList. +- Optimization: OfType always uses an intermediate iterator even when the input sequence already implements IEnumerable and T is a non-nullable value type. +- Optimization: SequenceEqual doesn’t compare the counts of the sequences eagerly even when both sequences implement ICollection +- Correctness: OrderByDescending doesn’t work if you use a key comparer which returns int.MinValue +- Consistency: Single and SingleOrDefault (with a predicate) don’t throw InvalidOperationException as soon as they encounter a second element matching the predicate; the predicate-less overloads _do_ throw as soon as they see a second element. + +All of these have been discussed already, so I won’t go into them now. + +### LinqBridge + +LinqBridge had a total of 33 failures. I haven’t looked into them in detail, but just going from the test output I’ve broken them down into the following broad categories: + +- Optimization: + + - Cast never returns the original source, presumably always introducing an intermediate iterator. + - All three of Microsoft’s "missed opportunities" listed above are also missed in LinqBridge +- Use of input sequences: + + - Except and Intersect appear to read the first sequence first (possibly completely?) and then the second sequence. Edulinq and LINQ to Objects read the second sequence completely and then stream the first sequence. This behaviour is undocumented. + - Join, GroupBy and GroupJoin appear not to be deferred at all. If I’m right, this is a definite bug. + - Aggregation accuracy: both Average and Sum over an IEnumerable appear to use a float accumulator instead of a double. This is probably worth fixing for the sake of both range and accuracy, but isn’t specified in the documentation. + - OrderBy (etc) appears to apply the key selector multiple times while sorting. The behaviour here isn’t documented, but as I [mentioned before](https://codeblog.jonskeet.uk/2011/01/05/reimplementing-linq-to-objects-part-26b-orderby-descending-thenby-descending), it could produce performance issues unnecessarily. +- Exceptions: + + - ToDictionary should throw an exception if you give it duplicate keys; it appears not to – at least when a custom comparer is used. (It’s possible it’s just not passing the comparer along.) + - The generic Max and Min methods don’t return the null value for the element type when that type is nullable. Instead, they throw an exception – which is the normal behaviour if the element type is non-nullable. This behaviour isn’t well documented, but is consistent with the behaviour of the non-generic overloads. See the [Min/Max post](https://codeblog.jonskeet.uk/2011/01/09/reimplementing-linq-to-objects-part-29-min-max) for more details. +- General bugs: + + - The generic form of Min/Max appears not to ignore null values when the element type is nullable. + - OrderByDescending appears to be broken in the same way as Microsoft’s implementation + - Range appears to be broken around its boundary testing. + - Join, GroupJoin, GroupBy and ToLookup break when presented with null keys + + +### Mono 4.0 (and 3.5, effectively) + +Mono failed 18 of the tests. There are fewer definite bugs than in LinqBridge, but it’s definitely not perfect. Here’s the breakdown: + +- Optimization: + + - Mono misses the same three opportunities that LinqBridge and Microsoft miss. + - Contains(item) delegates to ICollection when it’s implemented, just like in the Microsoft implementation. (I assume the authors would call this an "optimization", hence its location in this section.) I believe that LinqBridge has the same behaviour, but that test didn’t run in the LinqBridge configuration as it uses HashSet. +- Average/Sum accumulator types: + + - Mono appears to use float when working with float values, leading to more accumulator error than is necessary. +- Average overflow for integer types + + - Mono appears to use checked arithmetic when _summing_ a sequence, but not when taking the _average_ of a sequence. So the average of { long.MaxValue, long.MaxValue, 2 } is 0. (This originally confused me into thinking it was using floating point types during the summation, but I now believe it’s just a checked/unchecked issue.) +- Bugs: + + - Count doesn’t overflow either with or without a predicate + - The Max handling of double.NaN isn’t in line with .NET. I haven’t investigated the reason for this yet. + - OrderByDescending is broken in the same way as for LinqBridge and the Microsoft implementation. + - Range is broken for both Range(int.MinValue, 0) and Range(int.MaxValue, 1). Test those boundary cases, folks :) + - When reversing a list, Mono _doesn’t_ buffer the current contents. In other words, changes made while iterating over the reversed list are visible in the returned sequence. The documentation isn’t very clear about the desired behaviour here, admittedly. + - GroupJoin and Join match null keys, unlike Microsoft’s implementation. + + +### How does Edulinq fare against other unit tests? + +It didn’t seem fair to _only_ test other implementations against the Edulinq tests. After all, it’s only natural that my tests should work against my own code. What happens if we run the Mono and LinqBridge tests against my code? +The LinqBridge tests didn’t find anything surprising. There were two failures: + +- I don’t have the "delegate Contains to ICollection.Contains" behaviour, which the tests check for. +- I don’t optimize First in the case of the collection implementing IList. I view this as a pretty dubious optimization to be honest – I doubt that creating an iterator to get to the first item is going to be much slower than checking for IList, fetching the count, and then fetching the first item via the indexer… and it means that all _non-list_ implementations also have to check whether the sequence implements IList. I don’t intend to change Edulinq for this. + +The Mono tests picked up the same two failures as above, and two _genuine_ bugs: + +- By implementing Take via TakeWhile, I was iterating too far: in order for the condition to become false, we had to iterate to the first item we _wouldn’t_ return. +- ToLookup didn’t accept null keys – a fault which propagated to GroupJoin, Join and GroupBy too. (EDIT: It turns out that it’s more subtle than that. Nothing should break, but the MS implementation _ignores_ null keys for Join and GroupJoin. Edulinq now does the same, but I’ve raised a [Connect issue](https://connect.microsoft.com/VisualStudio/feedback/details/639943/enumerable-join-groupjoin-ignores-null-keys-inconsistency-with-tolookup-and-groupby) to suggest this should _at least_ be documented.) + +I’ve fixed these in source control, and will add an addendum to each of the relevant posts ([Take](https://codeblog.jonskeet.uk/2011/01/02/reimplementing-linq-to-objects-part-23-take-skip-takewhile-skipwhile), [ToLookup](https://codeblog.jonskeet.uk/2010/12/31/reimplementing-linq-to-objects-part-18-tolookup)) when I have a moment spare. +There’s one additional failure, trying to find the average of a sequence of two Int64.MaxValue values. That overflows on both Edulinq and LINQ to Objects – that’s the downside of using an Int64 to sum the values. As mentioned, Mono suffers a degree of inaccuracy instead; it’s all a matter of trade-offs. (A _really_ smart implementation might use Int64 while possible, and then go up to using Double where necessary, I suppose.) +Unfortunately I don’t have the tests for the Microsoft implementation, of course… I’d love to know whether there’s anything I’ve failed with there. + +### Conclusion + +This was very interesting – there’s a mixture of failure conditions around, and plenty of "non-failures" where each implementation’s tests are enforcing their own behaviour. +I do find it amusing that all three of the "mainstream" implementations have the same OrderByDescending bug though. Other than that, the clear bugs between Mono and LinqBridge don’t intersect, which is slightly surprising. +It’s nice to see that despite not setting out to create a "production-quality" implementation of LINQ to Objects, that’s _mostly_ what I’ve ended up with. Who knows – maybe some aspects of my implementation or tests will end up in Mono in the future :) +Given the various different optimizations mentioned in this post, I think it’s only fitting that next time I’ll discuss where we _can_ optimize, where it’s _worth_ optimizing, and some more tricks we could still pull out of the bag… +[C#](https://codeblog.jonskeet.uk/category/csharp/), [Edulinq](https://codeblog.jonskeet.uk/category/edulinq/), [LINQ](https://codeblog.jonskeet.uk/category/linq/) + +# [Reimplementing LINQ to Objects: Part 38 – What’s missing?](https://codeblog.jonskeet.uk/2011/01/22/reimplementing-linq-to-objects-part-38-what-s-missing/) + +[January 22, 2011](https://codeblog.jonskeet.uk/2011/01/22/reimplementing-linq-to-objects-part-38-what-s-missing/) [jonskeet](https://codeblog.jonskeet.uk/author/jonskeet/) [25 Comments](https://codeblog.jonskeet.uk/2011/01/22/reimplementing-linq-to-objects-part-38-what-s-missing/#comments) +I mentioned before that the Zip operator was only introduced in .NET 4, so clearly there’s a _little_ wiggle room for LINQ to Object’s query operators to grow in number. This post mentions some of the ones I think are most sorely lack – either because I’ve wanted them myself, or because I’ve seen folks on Stack Overflow want them for entirely reasonable use cases. +There is an issue with respect to other LINQ providers, of course: as soon as some useful operators are available for LINQ to Objects, there will be people who want to apply them to LINQ to SQL, the Entity Framework and the like. Worse, if they’re _not_ included in Queryable with overloads based on expression trees, the LINQ to Objects implementation will silently get picked – leading to what looks like a lovely query performing like treacle while the client slurps over the entire database. If they _are_ included in Queryable, then third party LINQ providers could end up with a nasty versioning problem. In other words, some care is needed and I’m glad I’m not the one who has to decide how new features are introduced. +I’ve deliberately _not_ looked at the extra set of operators introduced in the System.Interactive part of [Reactive Extensions](http://msdn.microsoft.com/en-us/devlabs/ee794896)… nor have I looked back over what we’ve implemented in [MoreLINQ](http://morelinq.googlecode.com/) (an open source project I started specifically to create new operators). I figured it would be worth thinking about this afresh – but look at both of those projects for actual implementations instead of just ideas. +Currently there’s no implementation of any of this in Edulinq – but I could potentially create an "Edulinq.Extras" assembly which made it all available. Let me know if any of these sounds particularly interesting to see in terms of implementation. + +### FooBy + +I _love_ OrderBy and ThenBy, with their descending cousins. They’re so much cleaner than building a custom comparer which just performs a comparison between two properties. So why stop with ordering? There’s a whole bunch of operators which could do with some "FooBy" love. For example, imagine we have a list of files, and we want to find the longest one. We don’t want to perform a total ordering by size descending, nor do we want to find the maximum file size itself: we want the file _with_ the maximum size. I’d like to be able to write that query as: +FileInfo biggestFile = files.MaxBy(file => file.Length); +Note that we can get a _similar_ result by performing one pass to find the maximum length, and then another pass to find the file with that length. However, that’s inefficient and assumes we can read the sequence twice (and get the same results both times). There’s no need for that. We could get the same result using Aggregate with a pretty complicated aggregation, but I think this is a sufficiently common case to deserve its own operator. +We’d want to specify which value would be returned if multiple files had the same length (my suggestion would be the first one we encountered with that length) and we could also specify a key comparer to use. The signatures would look like this: +public static TSource MaxBy( +    this IEnumerable source, +    Func keySelector) +public static TSource MaxBy( +    this IEnumerable source, +    Func keySelector, +    IComparer comparer) +Now it’s not just Max and Min that gain from this "By" idea. It would be useful to apply the same idea to the set operators. The simplest of these to think about would be DistinctBy, but UnionBy, IntersectBy and ExceptBy would be reasonable too. In the case of ExceptBy and IntersectBy we _could_ potentially take the key collection to indicate the keys of the elements we wanted to exclude/include, but it would probably be more consistent to force the two input sequences to be of the same type (as they would have to be for UnionBy and IntersectBy of course). ContainsBy _might_ be useful, but that would effectively be a Select followed by a normal Contains – possibly not useful enough to merit its own operator. + +### TopBy and TopByDescending + +These may sound like they belong in the FooBy section, but they’re somewhat different: they’re effectively specializations of OrderBy and OrderByDescending where you already know how many elements you want to preserve. The return type would be IOrderedEnumerable so you could still use ThenBy/ThenByDescending as normal. That would make the following two queries equivalent – but the second _might_ be a lot more efficient than the first: +var takeQuery = people.OrderBy(p => p.LastName) +                      .ThenBy(p => p.FirstName) +                      .Take(3); +var topQuery = people.TopBy(p => p.LastName, 3) +                     .ThenBy(p => p.FirstName); +An implementation could easily delegate to various different strategies depending on the number given – for example, if you asked for more than 10 values, it may not be worth doing anything more than a simple sort and restrict the output. If you asked for just the top 3 values, that could return an IOrderedEnumerable implementation specifically hard-coded to 3 values, etc. +Aside from anything else, if you were confident in what the implementation did (and that’s a _very_ big "if") you could use a potentially huge input sequence with such a query – larger than you could fit into memory in one go. That’s fine if you’re only keeping the top three values you’ve seen so far, but would fail for a complete ordering, even one which was able to yield results before performing _all_ the ordering: if it doesn’t _know_ you’re going to stop after three elements, it can’t throw anything away. +Perhaps this is too specialized an operator – but it’s an interesting one to think about. It’s worth noting that this probably only makes sense for LINQ to Objects, which never gets to see the whole query in one go. Providers like LINQ to SQL can optimize queries of the form OrderBy(…).ThenBy(…).Take(…) because by the time they need to translate the query into SQL, they will have an expression tree representation which includes the "Take" part. + +### TryFastCount and TryFastElementAt + +One of the implementation details of Edulinq is its TryFastCount method, which basically encapsulates the logic around attempting to find the count of a sequence if it implements ICollection or ICollection. Various built-in LINQ operators find this useful, and anyone writing their own operators has a reasonable chance of bumping into it as well. It seems pointless to duplicate the code all over the place… why not expose it? The signatures might look something like this: +public static bool TryFastCount( +    this IEnumerable source, +    out int count) +public static bool TryFastElementAt( +    this IEnumerable source, +    int index, +    out TSource value) +I would expect TryFastElementAt to use the indexer if the sequence implemented IList without performing any validation: that ought to be the responsibility of the caller. TryFastCount could use a Nullable return type instead of the return value / out parameter split, but I’ve kept it consistent with the methods which exist elsewhere in the framework + +### Scan and SelectAdjacent + +These are related operators in that they deal with wanting a more global view than just the current element. Scan would act similarly to Aggregate – except that it would yield the accumulator value after each element. Here’s an example of keeping a running total: +// Signature: +public static IEnumerable Scan( +    this IEnumerable source, +    TAccumulate seed, +    Func func) +     +int[] source = new int[] { 3, 5, 2, 1, 4 }; +var query = source.Scan(0, (current, item) => current + item); +query.AssertSequenceEqual(3, 8, 10, 11, 15); +There _could_ be a more complicated overload with an extra conversion from TAccumulate to an extra TResult type parameter. That would let us write a Fibonacci sequence query in one line, if we really wanted to… +The SelectAdjacent operator would simply present a selector function with pairs of adjacent items. Here’s a similar example, this time calculating the difference between each pair: +// Signature: +public static IEnumerable SelectAdjacent( +    this IEnumerable source, +    Func selector) +     +int[] source = new int[] { 3, 5, 2, 1, 4 }; +var query = source.SelectAdjacent((current, next) => next – current); +query.AssertSequenceEqual(2, -3, -1, 3); +One oddity here is that the result sequence always contains one item fewer than the source sequence. If we wanted to keep the length the same, there are various approaches we could take – but the best one would depend on the situation. +This sounds like a pretty obscure operator, but I’ve actually seen quite a few LINQ questions on Stack Overflow where it could have been useful. Is it useful often _enough_ to deserve its own operator? Maybe… maybe not. + +### DelimitWith + +This one is really just a bit of a peeve – but again, it’s a pretty common requirement. We often want to take a sequence and create a single string which is (say) a comma-delimited version. Yay, String.Join does exactly what we need – particularly in .NET 4, where there’s an [overload taking IEnumerable](http://msdn.microsoft.com/en-us/library/dd992421.aspx) so you don’t need to convert it to a string array first. However, it’s still a _static_ method on string – and the name "Join" also looks slightly odd in the context of a LINQ query, as it’s got nothing to do with a LINQ-style join. +Compare these two queries: which do you think reads better, and feels more "natural" in LINQ? +// Current state of play… +var names = string.Join(",", +                        people.Where(p => p.Age < 18) +                              .Select(p => p.FirstName)); +// Using DelimitWith +var names = people.Where(p => p.Age < 18) +                  .Select(p => p.FirstName) +                  .DelimitWith(","); +I know which I prefer :) + +### ToHashSet + +(Added on February 23rd 2011.) +I’m surprised I missed this one first time round – I’ve bemoaned its omission in various places before now. It’s easy to create a list, dictionary, lookup or array from an anonymous type, but you can’t create a set that way. That’s mad, given how simple the relevant operator is, even with an overload for a custom equality comparer: +public static HashSet ToHashSet( +    this IEnumerable source) +{ +    return source.ToHashSet(EqualityComparer.Default); +} +public static HashSet ToHashSet( +    this IEnumerable source, +    IEqualityComparer comparer) +{ +    if (source == null) +    { +        throw new ArgumentNullException("source"); +    } +    return new HashSet(source, comparer ?? EqualityComparer.Default); +} +This also makes it much simpler to create a HashSet in a readable way from an existing query expression, without either wrapping the whole query in the constructor call or using a local variable. + +### Conclusion + +These are just the most useful extra methods I thought of, based on the kinds of query folks on Stack Overflow have asked about. I think it’s interesting that some are quite general – MaxBy, ExceptBy, Scan and so on – whereas others (TopBy, SelectAdjacent and particularly DelimitWith) are simply aimed at making some very specific but common situations simpler. It feels to me like the more general operators really are _missing_ from LINQ – they would fit quite naturally – but the more specific ones probably deserve to be in a separate static class, as "extras". +This is only scratching the surface of what’s possible, of course – System.Interactive.EnumerableEx in Reactive Extensions has _loads_ of options. Some of them are deliberate parallels of the operators in Observable, but plenty make sense on their own too. +One operator you may have _expected_ to see in this list is ForEach. This is a controversial topic, but Eric Lippert [has written about it very clearly](http://blogs.msdn.com/b/ericlippert/archive/2009/05/18/foreach-vs-foreach.aspx) (no surprise there, then). Fundamentally LINQ is about _querying_ a sequence, not taking _action_ on it. ForEach breaks that philosophy, which is why I haven’t included it here. Usually a foreach statement is a perfectly good alternative, and make the "action" aspect clearer. +[C#](https://codeblog.jonskeet.uk/category/csharp/), [Edulinq](https://codeblog.jonskeet.uk/category/edulinq/), [LINQ](https://codeblog.jonskeet.uk/category/linq/) + +# [Reimplementing LINQ to Objects: Part 37 – Guiding principles](https://codeblog.jonskeet.uk/2011/01/20/reimplementing-linq-to-objects-part-37-guiding-principles/) + +[January 20, 2011](https://codeblog.jonskeet.uk/2011/01/20/reimplementing-linq-to-objects-part-37-guiding-principles/) [jonskeet](https://codeblog.jonskeet.uk/author/jonskeet/) [5 Comments](https://codeblog.jonskeet.uk/2011/01/20/reimplementing-linq-to-objects-part-37-guiding-principles/#comments) +Now that I’m "done" reimplementing LINQ to Objects – in that I’ve implemented all the methods in System.Linq.Enumerable – I wanted to write a few posts looking at the bigger picture. I’m not 100% sure of what this will consist of yet; I want to avoid this blog series continuing forever. However, I’m confident it will contain (in no particular order): + +- This post: principles governing the behaviour of LINQ to Objects +- Missing operators: what else I’d have liked to see in Enumerable +- Optimization: where the .NET implementation could be further optimized, and why some obvious-sounding optimizations may be inappropriate +- How query expression translations work, in brief (and with a cheat sheet) +- The difference between IQueryable and IEnumerable +- Sequence identity, the "Contains" issue, and other knotty design questions +- Running the Edulinq tests against other implementations + +If there are other areas you want me to cover, please let me know. + +### The principles behind the LINQ to Objects implementation + +The design LINQ to Objects is built on a few guiding principles, both in terms of design and implementation details. You need to understand these, but also implementations should be clear about what they’re doing in these terms too. + +### Extension method targets and argument validation + +IEnumerable is the core sequence type, not just for LINQ but for .NET as a whole. Almost _everything_ is written in terms of IEnumerable at least as input, with the following exceptions: + +- Empty, Range and Repeat don’t have input sequences (these are the only non-extension methods) +- OfType and Cast work on the non-generic IEnumerable type instead +- ThenBy and ThenByDescending work on IOrderedEnumerable + +All operators other than AsEnumerable verify that any input sequence is non-null. This validation is performed eagerly (i.e. when the method is called) even if the operator uses deferred execution for the results. Any delegate used (typically a projection or predicate of some kind) must be non-null. Again, this validation is performed eagerly. +IEqualityComparer is used for all custom equality comparisons. Any parameter of this type _may_ be null, in which case the default equality comparer for the type is used. In _most_ cases the default equality comparer for the type is also used when no custom equality comparer is used, but Contains has some odd behaviour around this. Equality comparers are expected to be able to handle null values. IComparer is _only_ used by the OrderBy/ThenBy operators and their descending counterparts – and only then if you want custom comparisons between keys. Again, a null IComparer means "use the default for the type" + +### Timing of input sequence "opening" + +Any operator with a return type of IEnumerable or IOrderedEnumerable uses _deferred execution_. This means that the method doesn’t read anything from any input sequences until someone starts reading from the result sequence. It’s not clearly defined exactly _when_ input sequences will first be accessed – for some operators if may be when GetEnumerator() is called; for others it may be on the first call to MoveNext() on the resulting iterator. Callers should not depend on these slight variations. Deferred execution is common for operators in the middle of queries. Operators which use deferred execution effectively represent queries rather than the results of queries – so if you change the contents of the original source of the query and then iterate over the query itself again, you’ll see the change. For example: +List source = new List(); +var query = source.Select(x => x.ToUpper()); +         +// This loop won’t write anything out +foreach (string x in query) +{ +    Console.WriteLine(x); +} +         +source.Add("foo"); +source.Add("bar"); +// This loop will write out "FOO" and "BAR" – even +// though we haven’t changed the value of "query" +foreach (string x in query) +{ +    Console.WriteLine(x); +} +Deferred execution is one of the hardest parts of LINQ to understand, but once you do, everything becomes somewhat simpler. +All other operators use _immediate execution_, fetching all the data they need from the input before they return a value… so that by the time they _do_ return, they will no longer see or care about changes to the input sequence. For operators returning a scalar value (such as Sum and Average) this is blatantly obvious – the value of a variable of type double isn’t going to change just because you’ve added something to a list. However, it’s slightly less for the "ToXXX" methods: ToLookup, ToArray, ToList and ToDictionary. These do _not_ return views on the original sequence, unlike the "As" methods: AsEnumerable which we’ve seen, and Queryable.AsQueryable which I didn’t implement. Focus on the prefix part of the name: the "To" part indicates a conversion to a particular type. The "As" prefix indicates a wrapper of some kind. This is consistent with other parts of the framework, such as List.AsReadOnly and Array.AsReadOnly. +Very importantly, LINQ to Objects only iterates over any input sequence at most **once**, whether the execution is deferred or immediate. Some operators would be easier to implement if you could iterate over the input twice – but it’s important that they don’t do so. Of course if you provide the same sequence for two inputs, it will treat those as logically different sequences. Similarly if you iterate over a result sequence more than once (for operators that return IEnumerable or a related interface, rather than List or an array etc), that will iterate over the input sequence again. +This means it’s fine to use LINQ to Objects with sequences which may only be read once (such as a network stream), or which are relatively expensive to reread (imagine a log file reader over a huge set of logs) or which give inconsistent results (imagine a sequence of random numbers). In some cases it’s okay to use LINQ to Objects with an infinite sequence – in others it’s not. It’s _usually_ fairly obvious which is the case. + +### Timing of input sequence reading, and memory usage + +Where possible within deferred execution, operators act in a _streaming_ fashion, only reading from the input sequence when they have to, and "forgetting" data as soon as they can. This allows for long – potentially infinite – sequences to be handled elegantly without memory running out. +Some operators naturally need to read all the data in before they can return anything. The most obvious example of this is Reverse, which will always yield the last element of the input stream as the first element in the result stream. +A third pattern occurs with operators such as Distinct, which yield data as they go, but accumulate elements too, taking more and more memory until the caller stops iterating (usually either by jumping out of the foreach loop, or letting it terminate naturally). +Where an operator takes two input sequences – such as Join – you need to understand the consumption of each one separately. For example, Join uses deferred execution, but as soon as you ask for the first element of the result set, it will read the "second" sequence _completely_ and buffer it – whereas the "first" sequence is streamed. This isn’t the case for all operators with two inputs, of course – Zip streams both input sequences, for example. Check the documentation – and the relevant Edulinq blog post – for details. +Obviously any operator which uses immediate execution has to read all the data it’s interested in before it returns. This doesn’t necessarily mean they will read to the end of the sequence though, and they may not need to buffer the data they read. (Simple examples are ToList which has to keep everything, and Sum which doesn’t.) + +### Queries vs data + +Closely related to the details of when the input is read is the concept of what the result of an operator actually represents. Operators which use deferred execution return _queries_: each time you iterate over the result sequence, the query will look at the input sequence again. The query itself doesn’t contain the data – it just knows how to get at the data. +Operators which use immediate execution work the other way round: they read all the data they need, and then forget about the input sequence. For operators like Average and Sum this is obvious as it’s just a simple scalar value – but for operators like ToList, ToDictionary, ToLookup and ToArray, it means that the operator has to make a copy of everything it needs. (This is potentially a _shallow_ copy of course – depending on what user-defined projections are applied. The normal behaviour of mutable reference types is still valid.) +I realise that in many ways I’ve just said the same thing multiple times now – but hopefully that will help this crucial aspect of LINQ behaviour sink in, if you were still in any doubt. + +### Exception handling + +I’m unaware of any situation in which LINQ to Objects will catch an exception. If your predicate or projection throws an exception, it will propagate in the obvious way. +However, LINQ to Objects _does_ ensure that any iterator it reads from is disposed appropriately – assuming that the caller disposes of any result sequences properly, of course. Note that the foreach statement implicitly disposes of the iterator in a finally block. + +### Optimization + +Various operators are optimized when they detect at execution time that the input sequence they’re working on offers a shortcut. +The types most commonly detected are: + +- ICollection and ICollection for their Count property +- IList for its random access indexer + +I’ll look at optimization in much more detail in a separate post. + +### Conclusion + +This post has not been around the guiding principles behind LINQ itself – lambda calculus or anything like that. It’s more been a summary of the various aspects of behaviour we’ve seen across the various operators we’ve implemented. They’re the rules I’ve had to follow in order to make Edulinq reasonably consistent with LINQ to Objects. +Next time I’ll talk about some of the operators which I think _should_ have made it into the core framework, at least for LINQ to Objects. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/How AsyncAwait Really Works in C - .NET Blog.md b/OneNote/Ben's Notebook/Reading/Read Later/How AsyncAwait Really Works in C - .NET Blog.md new file mode 100644 index 0000000..88633b4 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/How AsyncAwait Really Works in C - .NET Blog.md @@ -0,0 +1,384 @@ +Clipped from: [https://devblogs.microsoft.com/dotnet/how-async-await-really-works/](https://devblogs.microsoft.com/dotnet/how-async-await-really-works/) + +![Exported image](Exported%20image%2020240808113926-0.jpeg) + +Stephen Toub - MSFT +Several weeks ago, the [.NET Blog](https://devblogs.microsoft.com/dotnet/) featured a post [What is .NET, and why should you choose it?](https://devblogs.microsoft.com/dotnet/why-dotnet/). It provided a high-level overview of the platform, summarizing various components and design decisions, and promising more in-depth posts on the covered areas. This post is the first such follow-up, deep-diving into the history leading to, the design decisions behind, and implementation details of async/await in C# and .NET. +The support for async/await has been around now for over a decade. In that time, it’s transformed how scalable code is written for .NET, and it’s both viable and extremely common to utilize the functionality without understanding exactly what’s going on under the covers. You start with a synchronous method like the following (this method is “synchronous” because a caller will not be able to do anything else until this whole operation completes and control is returned back to the caller): +// Synchronously copy all data from source to destination.public void CopyStreamToStream(Stream source, Stream destination){ var buffer = new byte[0x1000]; int numRead; while ((numRead = source.Read(buffer, 0, buffer.Length)) != 0) { destination.Write(buffer, 0, numRead); }} +Then you sprinkle a few keywords, change a few method names, and you end up with the following asynchronous method instead (this method is “asynchronous” because control is expected to be returned back to its caller very quickly and possibly before the work associated with the whole operation has completed): +// Asynchronously copy all data from source to destination.public async Task CopyStreamToStreamAsync(Stream source, Stream destination){ var buffer = new byte[0x1000]; int numRead; while ((numRead = await source.ReadAsync(buffer, 0, buffer.Length)) != 0) { await destination.WriteAsync(buffer, 0, numRead); }} +Almost identical in syntax, still able to utilize all of the same control flow constructs, but now non-blocking in nature, with a significantly different underlying execution model, and with all the heavy lifting done for you under the covers by the C# compiler and core libraries. +While it’s common to use this support without knowing exactly what’s happening under the hood, I’m a firm believer that understanding how something actually works helps you to make even better use of it. For async/await in particular, understanding the mechanisms involved is especially helpful when you want to look below the surface, such as when you’re trying to debug things gone wrong or improve the performance of things otherwise gone right. In this post, then, we’ll deep-dive into exactly how await works at the language, compiler, and library level, so that you can make the most of these valuable features. +To do that well, though, we need to go way back to before async/await to understand what state-of-the-art asynchronous code looked like in its absence. Fair warning, it wasn’t pretty. + +## In the beginning… + +All the way back in .NET Framework 1.0, there was the Asynchronous Programming Model pattern, otherwise known as the APM pattern, otherwise known as the Begin/End pattern, otherwise known as the IAsyncResult pattern. At a high-level, the pattern is simple. For a synchronous operation DoStuff: +class Handler{ public int DoStuff(string arg);} +there would be two corresponding methods as part of the pattern: a BeginDoStuff method and an EndDoStuff method: +class Handler{ public int DoStuff(string arg); public IAsyncResult BeginDoStuff(string arg, AsyncCallback? callback, object? state); public int EndDoStuff(IAsyncResult asyncResult);} +BeginDoStuff would accept all of the same parameters as does DoStuff, but in addition it would also accept an [AsyncCallback](https://github.com/dotnet/runtime/blob/967a59712996c2cdb8ce2f65fb3167afbd8b01f3/src/libraries/System.Private.CoreLib/src/System/AsyncCallback.cs#L14) delegate and an opaque state object, one or both of which could be null. The Begin method was responsible for initiating the asynchronous operation, and if provided with a callback (often referred to as the “continuation” for the initial operation), it was also responsible for ensuring the callback was invoked when the asynchronous operation completed. The Begin method would also construct an instance of a type that implemented [IAsyncResult](https://github.com/dotnet/runtime/blob/967a59712996c2cdb8ce2f65fb3167afbd8b01f3/src/libraries/System.Private.CoreLib/src/System/IAsyncResult.cs#L17-L27), using the optional state to populate that IAsyncResult‘s AsyncState property: +namespace System{ public interface IAsyncResult { object? AsyncState { get; } WaitHandle AsyncWaitHandle { get; } bool IsCompleted { get; } bool CompletedSynchronously { get; } } public delegate void AsyncCallback(IAsyncResult ar);} +This IAsyncResult instance would then both be returned from the Begin method as well as passed to the AsyncCallback when it was eventually invoked. When ready to consume the results of the operation, a caller would then pass that IAsyncResult instance to the End method, which was responsible for ensuring the operation was completed (synchronously waiting for it to complete by blocking if it wasn’t) and then returning any result of the operation, including propagating any errors/exceptions that may have occurred. Thus, instead of writing code like the following to perform the operation synchronously: +try{ int i = handler.DoStuff(arg);  Use(i);}catch (Exception e){ ... // handle exceptions from DoStuff and Use} +the Begin/End methods could be used in the following manner to perform the same operation asynchronously: +try{ handler.BeginDoStuff(arg, iar => { try { Handler handler = (Handler)iar.AsyncState!; int i = handler.EndDoStuff(iar); Use(i); } catch (Exception e2) { ... // handle exceptions from EndDoStuff and Use } }, handler);}catch (Exception e){ ... // handle exceptions thrown from the synchronous call to BeginDoStuff} +For anyone who’s dealt with callback-based APIs in any language, this should feel familiar. +Things only got more complicated from there, however. For instance, there’s the issue of “stack dives.” A stack dive is when code repeatedly makes calls that go deeper and deeper on the stack, to the point where it could potentially stack overflow. The Begin method is allowed to invoke the callback synchronously if the operation completes synchronously, meaning the call to Begin might itself directly invoke the callback. And “asynchronous” operations that complete synchronously are actually very common; they’re not “asynchronous” because they’re guaranteed to complete asynchronously but rather are just permitted to. For example, consider an asynchronous read from some networked operation, like receiving from a socket. If you need only a small amount of data for each individual operation, such as reading some header data from a response, you might put a buffer in place in order to avoid the overhead of lots of system calls. Instead of doing a small read for just the amount of data you need immediately, you perform a larger read into the buffer and then consume data from that buffer until its exhausted; that lets you reduce the number of expensive system calls required to actually interact with the socket. Such a buffer might exist behind whatever asynchronous abstraction you’re using, such that the first “asynchronous” operation you perform (filling the buffer) completes asynchronously, but then all subsequent operations until that underlying buffer is exhausted don’t actually need to do any I/O, instead just pulling from the buffer, and can thus all complete synchronously. When the Begin method performs one of these operations, and finds it completes synchronously, it can then invoke the callback synchronously. That means you have one stack frame that called the Begin method, another stack frame for the Begin method itself, and now another stack frame for the callback. Now what happens if that callback turns around and calls Begin again? If that operation completes synchronously and its callback is invoked synchronously, you’re now again several more frames deep on the stack. And so on, and so on, until eventually you run out of stack. +This is a real possibility that’s easy to repro. Try this program on .NET Core: +using System.Net;using System.Net.Sockets;using Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);listener.Bind(new IPEndPoint(IPAddress.Loopback, 0));listener.Listen();using Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);client.Connect(listener.LocalEndPoint!);using Socket server = listener.Accept();_ = server.SendAsync(new byte[100_000]);var mres = new ManualResetEventSlim();byte[] buffer = new byte[1];var stream = new NetworkStream(client);void ReadAgain(){ stream.BeginRead(buffer, 0, 1, iar => { if (stream.EndRead(iar) != 0) { ReadAgain(); // uh oh! } else { mres.Set(); } }, null);};ReadAgain();mres.Wait(); +Here I’ve set up a simple client socket and server socket connected to each other. The server sends 100,000 bytes to the client, which then proceeds to use BeginRead/EndRead to consume them “asynchronously” one at a time (this is terribly inefficient and is only being done in the name of pedagogy). The callback passed to BeginRead finishes the read by calling EndRead, and then if it successfully read the desired byte (in which case it wasn’t yet at end-of-stream), it issues another BeginRead via a recursive call to the ReadAgain local function. However, in .NET Core, socket operations are much faster than they were on .NET Framework, and will complete synchronously if the OS is able to satisfy the operation synchronously (noting the kernel itself has a buffer used to satisfy socket receive operations). Thus, this stack overflows: + +[![Stack overflow due to improper handling of synchronous completion](Exported%20image%2020240808113926-1.png)](https://devblogs.microsoft.com/dotnet/wp-content/uploads/sites/10/2023/03/BeginReadStackOverflow.png) + +So, compensation for this was built into the APM model. There are two possible ways to compensate for this: + +1. Don’t allow the AsyncCallback to be invoked synchronously. If it’s always invoked asynchronously, even if the operation completes synchronously, then the risk of stack dives goes away. But so too does performance, because operations that complete synchronously (or so quickly that they’re observably indistinguishable) are very common, and forcing each of those to queue its callback adds measurable overhead. +2. Employ a mechanism that allows the caller rather than the callback to do the continuation work if the operation completes synchronously. That way, you escape the extra method frame and continue doing the follow-on work no deeper on the stack. + +The APM pattern goes with option (2). For that, the IAsyncResult interface exposes two related but distinct members: IsCompleted and CompletedSynchronously. IsCompleted tells you whether the operation has completed: you can check it multiple times, and eventually it’ll transition from false to true and then stay there. In contrast, CompletedSynchronously never changes (or if it does, it’s a nasty bug waiting to happen); it’s used to communicate between the caller of the Begin method and the AsyncCallback which of them is responsible for performing any continuation work. If CompletedSynchronously is false, then the operation is completing asynchronously and any continuation work in response to the operation completing should be left up to the callback; after all, if the work didn’t complete synchronously, the caller of Begin can’t really handle it because the operation isn’t known to be done yet (and if the caller were to just call End, it would block until the operation completed). If, however, CompletedSynchronously is true, if the callback were to handle the continuation work, then it risks a stack dive, as it’ll be performing that continuation work deeper on the stack than where it started. Thus, any implementations at all concerned about such stack dives need to examine CompletedSynchronously and have the caller of the Begin method do the continuation work if it’s true, which means the callback then needs to _not_ do the continuation work. This is also why CompletedSynchronously must never change: the caller and the callback need to see the same value to ensure that the continuation work is performed once and only once, regardless of race conditions. +In our previous DoStuff example, that then leads to code like this: +try{ IAsyncResult ar = handler.BeginDoStuff(arg, iar => { if (!iar.CompletedSynchronously) { try { Handler handler = (Handler)iar.AsyncState!; int i = handler.EndDoStuff(iar); Use(i); } catch (Exception e2) { ... // handle exceptions from EndDoStuff and Use } } }, handler); if (ar.CompletedSynchronously) { int i = handler.EndDoStuff(ar); Use(i); }}catch (Exception e){ ... // handle exceptions that emerge synchronously from BeginDoStuff and possibly EndDoStuff/Use} +That’s a mouthful. And so far we’ve only looked at consuming the pattern… we haven’t looked at implementing the pattern. While most developers wouldn’t need to be concerned about leaf operations (e.g. implementing the actual Socket.BeginReceive/EndReceive methods that interact with the operating system), many, many developers would need to be concerned with composing these operations (performing multiple asynchronous operations that together form a larger one), which means not only consuming other Begin/End methods but also implementing them yourself so that your composition itself can be consumed elsewhere. And, you’ll notice there was no control flow in my previous DoStuff example. Introduce multiple operations into this, especially with even simple control flow like a loop, and all of a sudden this becomes the domain of experts that enjoy pain, or blog post authors trying to make a point. +So just to drive that point home, let’s implement a complete example. At the beginning of this post, I showed a CopyStreamToStream method that copies all of the data from one stream to another (à la Stream.CopyTo, but, for the sake of explanation, assuming that doesn’t exist): +public void CopyStreamToStream(Stream source, Stream destination){ var buffer = new byte[0x1000]; int numRead; while ((numRead = source.Read(buffer, 0, buffer.Length)) != 0) { destination.Write(buffer, 0, numRead); }} +Straightforward: we repeatedly read from one stream and then write the resulting data to the other, read from one stream and write to the other, and so on, until we have no more data to read. Now, how would we implement this asynchronously using the APM pattern? Something like this: +public IAsyncResult BeginCopyStreamToStream( Stream source, Stream destination, AsyncCallback callback, object state){ var ar = new MyAsyncResult(state); var buffer = new byte[0x1000]; Action readWriteLoop = null!; readWriteLoop = iar => { try { for (bool isRead = iar == null; ; isRead = !isRead) { if (isRead) { iar = source.BeginRead(buffer, 0, buffer.Length, static readResult => { if (!readResult.CompletedSynchronously) { ((Action)readResult.AsyncState!)(readResult); } }, readWriteLoop); if (!iar.CompletedSynchronously) { return; } } else { int numRead = source.EndRead(iar!); if (numRead == 0) { ar.Complete(null); callback?.Invoke(ar); return; } iar = destination.BeginWrite(buffer, 0, numRead, writeResult => { if (!writeResult.CompletedSynchronously) { try { destination.EndWrite(writeResult); readWriteLoop(null); } catch (Exception e2) { ar.Complete(e); callback?.Invoke(ar); } } }, null); if (!iar.CompletedSynchronously) { return; } destination.EndWrite(iar); } } } catch (Exception e) { ar.Complete(e); callback?.Invoke(ar); } }; readWriteLoop(null); return ar;}public void EndCopyStreamToStream(IAsyncResult asyncResult){ if (asyncResult is not MyAsyncResult ar) { throw new ArgumentException(null, nameof(asyncResult)); } ar.Wait();}private sealed class MyAsyncResult : IAsyncResult{ private bool _completed; private int _completedSynchronously; private ManualResetEvent? _event; private Exception? _error; public MyAsyncResult(object? state) => AsyncState = state; public object? AsyncState { get; } public void Complete(Exception? error) { lock (this) { _completed = true; _error = error; _event?.Set(); } } public void Wait() { WaitHandle? h = null; lock (this) { if (_completed) { if (_error is not null) { throw _error; } return; } h = _event ??= new ManualResetEvent(false); } h.WaitOne(); if (_error is not null) { throw _error; } } public WaitHandle AsyncWaitHandle { get { lock (this) { return _event ??= new ManualResetEvent(_completed); } } } public bool CompletedSynchronously { get { lock (this) { if (_completedSynchronously == 0) { _completedSynchronously = _completed ? 1 : -1; } return _completedSynchronously == 1; } } } public bool IsCompleted { get { lock (this) { return _completed; } } }} +Yowsers. And, even with all of that gobbledygook, it’s still not a great implementation. For example, the IAsyncResult implementation is locking on every operation rather than doing things in a more lock-free manner where possible, the Exception is being stored raw rather than as an [ExceptionDispatchInfo](https://github.com/dotnet/runtime/blob/967a59712996c2cdb8ce2f65fb3167afbd8b01f3/src/libraries/System.Private.CoreLib/src/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs#L9-L16) that would enable augmenting its call stack when propagated, there’s a lot of allocation involved in each individual operation (e.g. a delegate being allocated for each BeginWrite call), and so on. Now, imagine having to do all of this for each method you wanted to write. Every time you wanted to write a reusable method that would consume another asynchronous operation, you’d need to do all of this work. And if you wanted to write reusable combinators that could operate over multiple discrete IAsyncResults efficiently (think Task.WhenAll), that’s another level of difficulty; every operation implementing and exposing its own APIs specific to that operation meant there was no lingua franca for talking about them all similarly (though some developers wrote libraries that tried to ease the burden a bit, typically via another layer of callbacks that enabled the API to supply an appropriate AsyncCallback to a Begin method). +And all of that complication meant that very few folks even attempted this, and for those who did, well, bugs were rampant. To be fair, this isn’t really a criticism of the APM pattern. Rather, it’s a critique of callback-based asynchrony in general. We’re all so used to the power and simplicity that control flow constructs in modern languages provide us with, and callback-based approaches typically run afoul of such constructs once any reasonable amount of complexity is introduced. No other mainstream language had a better alternative available, either. +We needed a better way, one in which we learned from the APM pattern, incorporating the things it got right while avoiding its pitfalls. An interesting thing to note is that the APM pattern is just that, a pattern; the runtime, core libraries, and compiler didn’t provide any assistance in consuming or implementing the pattern. + +## Event-Based Asynchronous Pattern + +.NET Framework 2.0 saw a few APIs introduced that implemented a different pattern for handling asynchronous operations, one primarily intended for doing so in the context of client applications. This Event-based Asynchronous Pattern, or EAP, also came as a pair of members (at least, possibly more), this time a method to initiate the asynchronous operation and an event to listen for its completion. Thus, our earlier DoStuff example might have been exposed as a set of members like this: +class Handler{ public int DoStuff(string arg); public void DoStuffAsync(string arg, object? userToken); public event DoStuffEventHandler? DoStuffCompleted;}public delegate void DoStuffEventHandler(object sender, DoStuffEventArgs e);public class DoStuffEventArgs : AsyncCompletedEventArgs{ public DoStuffEventArgs(int result, Exception? error, bool canceled, object? userToken) : base(error, canceled, usertoken) => Result = result; public int Result { get; }} +You’d register your continuation work with the DoStuffCompleted event and then invoke the DoStuffAsync method; it would initiate the operation, and upon that operation’s completion, the DoStuffCompleted event would be raised asynchronously from the caller. The handler could then run its continuation work, likely validating that the userToken supplied matched the one it was expecting, enabling multiple handlers to be hooked up to the event at the same time. +This pattern made a few use cases a bit easier while making other uses cases significantly harder (and given the previous APM CopyStreamToStream example, that’s saying something). It didn’t get rolled out in a widespread manner, and it came and went effectively in a single release of .NET Framework, albeit leaving behind the APIs added during its tenure, like Ping.SendAsync/Ping.PingCompleted: +public class Ping : Component{ public void SendAsync(string hostNameOrAddress, object? userToken); public event PingCompletedEventHandler? PingCompleted; ...} +However, it did add one notable advance that the APM pattern didn’t factor in at all, and that has endured into the models we embrace today: [SynchronizationContext](https://github.com/dotnet/runtime/blob/967a59712996c2cdb8ce2f65fb3167afbd8b01f3/src/libraries/System.Private.CoreLib/src/System/Threading/SynchronizationContext.cs#L6). +SynchronizationContext was also introduced in .NET Framework 2.0, as an abstraction for a general scheduler. In particular, SynchronizationContext‘s most used method is Post, which queues a work item to whatever scheduler is represented by that context. The base implementation of SynchronizationContext, for example, just represents the ThreadPool, and so the [base implementation of](https://github.com/dotnet/runtime/blob/95df571be36ed8973d09746b61fae16b2e3f251f/src/libraries/System.Private.CoreLib/src/System/Threading/SynchronizationContext.cs#L22) SynchronizationContext.Post simply delegates to [ThreadPool.QueueUserWorkItem](https://learn.microsoft.com/dotnet/api/system.threading.threadpool.queueuserworkitem), which is used to ask the ThreadPool to invoke the supplied callback with the associated state on one the pool’s threads. However, SynchronizationContext‘s bread-and-butter isn’t just about supporting arbitrary schedulers, rather it’s about supporting scheduling in a manner that works according to the needs of various application models. +Consider a UI framework like Windows Forms. As with most UI frameworks on Windows, controls are associated with a particular thread, and that thread runs a message pump which runs work that’s able to interact with those controls: only that thread should try to manipulate those controls, and any other thread that wants to interact with the controls should do so by sending a message to be consumed by the UI thread’s pump. Windows Forms makes this easy with methods like Control.BeginInvoke, which queues the supplied delegate and arguments to be run by whatever thread is associated with that Control. You can thus write code like this: +private void button1_Click(object sender, EventArgs e){ ThreadPool.QueueUserWorkItem(_ => { string message = ComputeMessage(); button1.BeginInvoke(() => { button1.Text = message; }); });} +That will offload the ComputeMessage() work to be done on a ThreadPool thread (so as to keep the UI responsive while it’s being processed), and then when that work has completed, queue a delegate back to the thread associated with button1 to update button1‘s label. Easy enough. WPF has something similar, just with its Dispatcher type: +private void button1_Click(object sender, RoutedEventArgs e){ ThreadPool.QueueUserWorkItem(_ => { string message = ComputeMessage(); button1.Dispatcher.InvokeAsync(() => { button1.Content = message; }); });} +And .NET MAUI has something similar. But what if I wanted to put this logic into a helper method? e.g. +// Call ComputeMessage and then invoke the update action to update controls.internal static void ComputeMessageAndInvokeUpdate(Action update) { ... } +I could then use that like this: +private void button1_Click(object sender, EventArgs e){ ComputeMessageAndInvokeUpdate(message => button1.Text = message);} +but how could ComputeMessageAndInvokeUpdate be implemented in such a way that it could work in any of those applications? Would it need to be hardcoded to know about every possible UI framework? That’s where SynchronizationContext shines. We might implement the method like this: +internal static void ComputeMessageAndInvokeUpdate(Action update){ SynchronizationContext? sc = SynchronizationContext.Current; ThreadPool.QueueUserWorkItem(_ => { string message = ComputeMessage(); if (sc is not null) { sc.Post(_ => update(message), null); } else { update(message); } });} +That uses the SynchronizationContext as an abstraction to target whatever “scheduler” should be used to get back to the necessary environment for interacting with the UI. Each application model then ensures it’s published as SynchronizationContext.Current a SynchronizationContext-derived type that does the “right thing.” For example, [Windows Forms has this](https://github.com/dotnet/winforms/blob/41b11b6a7290a2bbc0c293042f30d9632e55aae2/src/System.Windows.Forms/src/System/Windows/Forms/WindowsFormsSynchronizationContext.cs#L13): +public sealed class WindowsFormsSynchronizationContext : SynchronizationContext, IDisposable{ public override void Post(SendOrPostCallback d, object? state) => _controlToSendTo?.BeginInvoke(d, new object?[] { state }); ...} +and [WPF has this](https://github.com/dotnet/wpf/blob/c67b9f6f5ad04f5c264b52de0733a8832714615f/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Threading/DispatcherSynchronizationContext.cs#L18): +public sealed class DispatcherSynchronizationContext : SynchronizationContext{ public override void Post(SendOrPostCallback d, Object state) => _dispatcher.BeginInvoke(_priority, d, state); ...} +ASP.NET _used_ to [have one](https://referencesource.microsoft.com/#System.Web/AspNetSynchronizationContext.cs,16), which didn’t actually care about what thread work ran on, but rather that work associated with a given request was serialized such that multiple threads wouldn’t concurrently be accessing a given HttpContext: +internal sealed class AspNetSynchronizationContext : AspNetSynchronizationContextBase{ public override void Post(SendOrPostCallback callback, Object state) => _state.Helper.QueueAsynchronous(() => callback(state)); ...} +This also isn’t limited to such main application models. For example, [xunit](https://github.com/xunit/xunit) is a popular unit testing framework, one that .NET’s core repos use for their unit testing, and it also employs multiple custom SynchronizationContexts. You can, for example, allow tests to run in parallel but limit the number of tests that are allowed to be running concurrently. How is that enabled? Via a SynchronizationContext: +public class MaxConcurrencySyncContext : SynchronizationContext, IDisposable{ public override void Post(SendOrPostCallback d, object? state) { var context = ExecutionContext.Capture(); workQueue.Enqueue((d, state, context)); workReady.Set(); }} +[MaxConcurrencySyncContext](https://github.com/xunit/xunit/blob/601e2d830853fa2ef0048d34afae520d6b73deca/src/xunit.v3.core/Sdk/MaxConcurrencySyncContext.cs#L14)‘s Post method just queues the work to its own internal work queue, which it then processes on its own worker threads, where it controls how many there are based on the max concurrency desired. You get the idea. +How does this tie in with the Event-based Asynchronous Pattern? Both EAP and SynchronizationContext were introduced at the same time, and the EAP dictated that the completion events should be queued to whatever SynchronizationContext was current when the asynchronous operation was initiated. To simplify that ever so slightly (and arguably not enough to warrant the extra complexity), some helper types were also introduced in System.ComponentModel, in particular AsyncOperation and AsyncOperationManager. The former was just a tuple that wrapped the user-supplied state object and the captured SynchronizationContext, and the latter just served as a simple factory to do that capture and create the AsyncOperation instance. Then EAP implementations would use those, e.g. Ping.SendAsync called [AsyncOperationManager.CreateOperation](https://github.com/dotnet/runtime/blob/5f94bffeff62f4b767a311a4505d6d40d86279d9/src/libraries/System.ComponentModel.EventBasedAsync/src/System/ComponentModel/AsyncOperationManager.cs#L10-L36) to capture the SynchronizationContext, and then when the operation completed, the AsyncOperation‘s [PostOperationCompleted](https://github.com/dotnet/runtime/blob/5f94bffeff62f4b767a311a4505d6d40d86279d9/src/libraries/System.ComponentModel.EventBasedAsync/src/System/ComponentModel/AsyncOperation.cs#L51-L77) method would be invoked to call the stored SynchronizationContext‘s Post method. +SynchronizationContext provides a few more trinkets worthy of mention as they’ll show up again in a bit. In particular, it exposes OperationStarted and OperationCompleted methods. The base implementation of these virtuals are empty, doing nothing, but a derived implementation might override these to know about in-flight operations. That means EAP implementations would also invoke these OperationStarted/OperationCompleted at the beginning and end of each operation, in order to inform any present SynchronizationContext and allow it to track the work. This is particularly relevant to the EAP pattern because the methods that initiate the async operations are void returning: you get nothing back that allows you to track the work individually. We’ll get back to that. +So, we needed something better than the APM pattern, and the EAP that came next introduced some new things but didn’t really address the core problems we faced. We still needed something better. + +## Enter Tasks + +.NET Framework 4.0 introduced the System.Threading.Tasks.Task type. At its heart, a Task is just a data structure that represents the eventual completion of some asynchronous operation (other frameworks call a similar type a “promise” or a “future”). A Task is created to represent some operation, and then when the operation it logically represents completes, the results are stored into that Task. Simple enough. But _the_ key feature that Task provides that makes it leaps and bounds more useful than IAsyncResult is that it builds into itself the notion of a continuation. That one feature means you can walk up to any Task and ask to be notified asynchronously when it completes, with the task itself handling the synchronization to ensure the continuation is invoked regardless of whether the task has already completed, hasn’t yet completed, or is completing concurrently with the notification request. Why is that so impactful? Well, if you remember back to our discussion of the old APM pattern, there were two primary problems. + +1. You had to implement a custom IAsyncResult implementation for every operation: there was no built-in IAsyncResult implementation anyone could just use for their needs. +2. You had to know prior to the Begin method being called what you wanted to do when it was complete. This makes it a significant challenge to implement combinators and other generalized routines for consuming and composing arbitrary async implementations. + +In contrast, with Task, that shared representation lets you walk up to an async operation _after_ you’ve already initiated the operation and provide a continuation _after_ you’ve already initiated the operation… you don’t need to provide that continuation _to_ the method that initiates the operation. Everyone who has asynchronous operations can produce a Task, and everyone who consumes asynchronous operations can consume a Task, and nothing custom needs to be done to connect the two: Task becomes the lingua franca for enabling producers and consumers of asynchronous operations to talk. And that has changed the face of .NET. More on that in a bit… +For now, let’s better understand what this actually means. Rather than dive into the intricate code for Task, we’ll do the pedagogical thing and just implement a simple version. This isn’t meant to be a great implementation, rather only complete enough functionally to help understand the meat of what is a Task, which, at the end of the day, is really just a data structure that handles coordinating the setting and reception of a completion signal. We’ll start with just a few fields: +class MyTask{ private bool _completed; private Exception? _error; private Action? _continuation; private ExecutionContext? _ec; ...} +We need a field to know whether the task has completed (_completed), and we need a field to store any error that caused the task to fail (_error); if we were also implementing a generic MyTask, there’d also be a private TResult _result field for storing the successful result of the operation. Thus far, this looks a lot like our custom IAsyncResult implementation earlier (not a coincidence, of course). But now the pièce de résistance, the _continuation field. In this simple implementation, we’re supporting just a single continuation, but that’s enough for explanatory purposes (the real Task employs an [object](https://github.com/dotnet/runtime/blob/81977309048600e67fdb44a7d4c99aaad89846d7/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs#L176-L178) field that can either be an individual continuation object or a List<> of continuation objects). This is a delegate that will be invoked when the task completes. +Now, a bit of surface area. As noted, one of the fundamental advances in Task over previous models was the ability to supply the continuation work (the callback) _after_ the operation was initiated. We need a method to let us do that, so let’s add ContinueWith: +public void ContinueWith(Action action){ lock (this) { if (_completed) { ThreadPool.QueueUserWorkItem(_ => action(this)); } else if (_continuation is not null) { throw new InvalidOperationException("Unlike Task, this implementation only supports a single continuation."); } else { _continuation = action; _ec = ExecutionContext.Capture(); } }} +If the task has already been marked completed by the time ContinueWith is called, ContinueWith just queues the execution of the delegate. Otherwise, the method stores the delegate, such that the continuation may be queued when the task completes (it also stores something called an ExecutionContext, and then uses that when the delegate is later invoked, but don’t worry about that part for now… we’ll get to it). Simple enough. +Then we need to be able to mark the MyTask as completed, meaning whatever asynchronous operation it represents has finished. For that, we’ll expose two methods, one to mark it completed successfully (“SetResult”), and one to mark it completed with an error (“SetException”): +public void SetResult() => Complete(null);public void SetException(Exception error) => Complete(error);private void Complete(Exception? error){ lock (this) { if (_completed) { throw new InvalidOperationException("Already completed"); } _error = error; _completed = true; if (_continuation is not null) { ThreadPool.QueueUserWorkItem(_ => { if (_ec is not null) { ExecutionContext.Run(_ec, _ => _continuation(this), null); } else { _continuation(this); } }); } }} +We store any error, we mark the task as having been completed, and then if a continuation had previously been registered, we queue it to be invoked. +Finally, we need a way to propagate any exception that may have occurred in the task (and, if this were a generic MyTask, to return its _result); to facilitate certain scenarios, we also allow this method to block waiting for the task to complete, which we can implement in terms of ContinueWith (the continuation just signals a ManualResetEventSlim that the caller then blocks on waiting for completion). +public void Wait(){ ManualResetEventSlim? mres = null; lock (this) { if (!_completed) { mres = new ManualResetEventSlim(); ContinueWith(_ => mres.Set()); } } mres?.Wait(); if (_error is not null) { ExceptionDispatchInfo.Throw(_error); }} +And that’s basically it. Now to be sure, the real Task is way more complicated, with a much more efficient implementation, with support for any number of continuations, with a multitude of knobs about how it should behave (e.g. should continuations be queued as is being done here or should they be invoked synchronously as part of the task’s completion), with the ability to store multiple exceptions rather than just one, with special knowledge of cancellation, with tons of helper methods for doing common operations (e.g. Task.Run which creates a Task to represent a delegate queued to be invoked on the thread pool), and so on. But there’s no magic to any of that; at its core, it’s just what we saw here. +You might also notice that my simple MyTask has public SetResult/SetException methods directly on it, whereas Task doesn’t. Actually, Task _does_ have such methods, [they’re just internal](https://github.com/dotnet/runtime/blob/81977309048600e67fdb44a7d4c99aaad89846d7/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs#L3271), with a System.Threading.Tasks.TaskCompletionSource type serving as a separate “producer” for the task and its completion; that was done not out of technical necessity but as a way to keep the completion methods off of the thing meant only for consumption. You can then hand out a Task without having to worry about it being completed out from under you; the completion signal is an implementation detail of whatever created the task and also reserves the right to complete it by keeping the TaskCompletionSource to itself. (CancellationToken and CancellationTokenSource follow a similar pattern: CancellationToken is just a struct wrapper for a CancellationTokenSource, serving up only the public surface area related to consuming a cancellation signal but without the ability to produce one, which is a capability restricted to whomever has access to the CancellationTokenSource.) +Of course, we can implement combinators and helpers for this MyTask similar to what Task provides. Want a simple MyTask.WhenAll? Here you go: +public static MyTask WhenAll(MyTask t1, MyTask t2){ var t = new MyTask(); int remaining = 2; Exception? e = null; Action continuation = completed => { e ??= completed._error; // just store a single exception for simplicity if (Interlocked.Decrement(ref remaining) == 0) { if (e is not null) t.SetException(e); else t.SetResult(); } }; t1.ContinueWith(continuation); t2.ContinueWith(continuation); return t;} +Want a MyTask.Run? You got it: +public static MyTask Run(Action action){ var t = new MyTask(); ThreadPool.QueueUserWorkItem(_ => { try { action(); t.SetResult(); } catch (Exception e) { t.SetException(e); } }); return t;} +How about a MyTask.Delay? Sure: +public static MyTask Delay(TimeSpan delay){ var t = new MyTask(); var timer = new Timer(_ => t.SetResult()); timer.Change(delay, Timeout.InfiniteTimeSpan); return t;} +You get the idea. +With Task in place, all previous async patterns in .NET became a thing of the past. Anywhere an asynchronous implementation previously was implemented with the APM pattern or the EAP pattern, new Task-returning methods were exposed. + +### And ValueTasks + +Task continues to be the workhorse for asynchrony in .NET to this day, with new methods exposed every release and routinely throughout the ecosystem that return Task and Task. However, Task is a class, which means creating one does come with an allocation. For the most part, one extra allocation for a long-lived asynchronous operation is a pittance and won’t meaningfully impact performance for all but the most performance-sensitive operations. However, as was previously noted, synchronous completion of asynchronous operations is fairly common. Stream.ReadAsync was introduced to return a Task, but if you’re reading from, say, a BufferedStream, there’s a really good chance many of your reads are going to complete synchronously due to simply needing to pull data from an in-memory buffer rather than performing syscalls and real I/O. Having to allocate an additional object just to return such data is unfortunate (note it was the case with APM as well). For non-generic Task-returning methods, the method can just return a singleton already-completed task, and in fact one such singleton is provided by Task in the form of Task.CompletedTask. But for Task, it’s impossible to cache a Task for every possible TResult. What can we do to make such synchronous completion faster? +It is possible to cache _some_ Tasks. For example, Task is very common, and there’s only two meaningful things to cache there: a Task when the Result is true and one when the Result is false. Or while we wouldn’t want to try caching four billion Tasks to accommmodate every possible Int32 result, small Int32 values are very common, so we could cache a few for, say, -1 through 8. Or for arbitrary types, default is a reasonably common value, so we could cache a Task where Result is default(TResult) for every relevant type. And in fact, [Task.FromResult](https://github.com/dotnet/runtime/blob/81977309048600e67fdb44a7d4c99aaad89846d7/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs#L5222-L5273) does that today (as of recent versions of .NET), using a small cache of such reusable Task singletons and returning one of them if appropriate or otherwise allocating a new Task for the exact provided result value. Other schemes can be created to handle other reasonably common cases. For example, when working with Stream.ReadAsync, it’s reasonably common to call it multiple times on the same stream, all with the same count for the number of bytes allowed to be read. And it’s reasonably common for the implementation to be able to fully satisfy that count request. Which means it’s reasonably common for Stream.ReadAsync to repeatedly return the same int result value. To avoid multiple allocations in such scenarios, multiple Stream types (like MemoryStream) will cache the last Task they successfully returned, and if the next read ends up also completing synchronously and successfully with the same result, it can just return the same Task again rather than creating a new one. But what about other cases? How can this allocation for synchronous completions be avoided more generally in situations where the performance overhead really matters? +That’s where ValueTask comes into the picture ([a much more detailed examination of](https://devblogs.microsoft.com/dotnet/understanding-the-whys-whats-and-whens-of-valuetask/) ValueTask is also available). ValueTask started life as a discriminated union between a TResult and a Task. At the end of the day, ignoring all the bells and whistles, [that’s all it is](https://github.com/dotnet/corefx/blob/d6173e069a9bcedfdfd7f4f41e67d23f67157b61/src/System.Threading.Tasks.Extensions/src/System/Threading/Tasks/ValueTask.cs#L53-L58) (or, rather, was), either an immediate result or a promise for a result at some point in the future: +public readonly struct ValueTask{ private readonly Task? _task; private readonly TResult _result; ...} +A method could then return such a ValueTask instead of a Task, and at the expense of a larger return type and a little more indirection, avoid the Task allocation if the TResult was known by the time it needed to be returned. +There are, however, super duper extreme high-performance scenarios where you want to be able to avoid the Task allocation even in the asynchronous-completion case. For example, Socket lives at the bottom of the networking stack, and SendAsync and ReceiveAsync on sockets are on the super hot path for many a service, with both synchronous and asynchronous completions being very common (most sends complete synchronously, and many receives complete synchronously due to data having already been buffered in the kernel). Wouldn’t it be nice if, on a given Socket, we could make such sending and receiving allocation-free, regardless of whether the operations complete synchronously or asynchronously? +That’s where System.Threading.Tasks.Sources.IValueTaskSource enters the picture: +public interface IValueTaskSource{ ValueTaskSourceStatus GetStatus(short token); void OnCompleted(Action continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags); TResult GetResult(short token);} +The IValueTaskSource interface allows an implementation to provide its own backing object for a ValueTask, enabling the object to implement methods like GetResult to retrieve the result of the operation and OnCompleted to hook up a continuation to the operation. With that, ValueTask evolved [a small change to its definition](https://github.com/dotnet/runtime/blob/81977309048600e67fdb44a7d4c99aaad89846d7/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/ValueTask.cs#L465-L468), with its Task? _task field replaced by an object? _obj field: +public readonly struct ValueTask{ private readonly object? _obj; private readonly TResult _result; ...} +Whereas the _task field was either a Task or null, the _obj field now can also be an IValueTaskSource. Once a Task is marked as completed, that’s it, it will remain completed and never transition back to an incomplete state. In contrast, an object implementing IValueTaskSource has full control over the implementation, and is free to transition bidirectionally between complete and incomplete states, as ValueTask‘s contract is that a given instance may be consumed only once, thus by construction it shouldn’t observe a post-consumption change in the underlying instance (this is why analysis rules like [CA2012](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2012) exist). This then enables types like Socket to pool IValueTaskSource instances to use for repeated calls. Socket caches up to two such instances, one for reads and one for writes, since the 99.999% case is to have at most one receive and one send in-flight at the same time. +I mentioned ValueTask but not ValueTask. When dealing only with avoiding allocation for synchronous completion, there’s little performance benefit to a non-generic ValueTask (representing result-less, void operations), since the same condition can be represented with Task.CompletedTask. But once we care about the ability to use a poolable underlying object for avoiding allocation in asynchronous completion case, that then also matters for the non-generic. Thus, when IValueTaskSource was introduced, so too were IValueTaskSource and ValueTask. +So, we have Task, Task, ValueTask, and ValueTask. We’re able to interact with them in various ways, representing arbitrary asynchronous operations and hooking up continuations to handle the completion of those asynchronous operations. And yes, we can do so _before_ or _after_ the operation completes. +_But_… those continuations are still callbacks! +We’re still forced into a continuation-passing style for encoding our asynchronous control flow!! +It’s still really hard to get right!!! +How can we fix that???? + +## C# Iterators to the Rescue + +The glimmer of hope for that solution actually came about a few years before Task hit the scene, with C# 2.0, when it added support for iterators. +“Iterators?” you ask? “You mean for IEnumerable?” That’s the one. Iterators let you write a single method that is then used by the compiler to implement an IEnumerable and/or an IEnumerator. For example, if I wanted to create an enumerable that yielded the Fibonacci sequence, I might write something like this: +public static IEnumerable Fib(){ int prev = 0, next = 1; yield return prev; yield return next; while (true) { int sum = prev + next; yield return sum; prev = next; next = sum; }} +I can then enumerate this with a foreach: +foreach (int i in Fib()){ if (i > 100) break; Console.Write($"{i} ");} +I can compose it with other IEnumerables via combinators like those on System.Linq.Enumerable: +foreach (int i in Fib().Take(12)){ Console.Write($"{i} ");} +Or I can just manually enumerate it directly via an IEnumerator: +using IEnumerator e = Fib().GetEnumerator();while (e.MoveNext()){ int i = e.Current; if (i > 100) break; Console.Write($"{i} ");} +All of the above result in this output: +0 1 1 2 3 5 8 13 21 34 55 89 +The really interesting thing about this is that in order to achieve the above, we need to be able to enter and exit that Fib method multiple times. We call MoveNext, it enters the method, the method then executes until it encounters a yield return, at which point the call to MoveNext needs to return true and a subsequent access to Current needs to return the yielded value. Then we call MoveNext again, and we need to be able to pick up in Fib just after where we last left off, and with all of the state from the previous invocation intact. Iterators are effectively coroutines provided by the C# language / compiler, with the compiler expanding my Fib iterator into a full-blown state machine: +public static IEnumerable Fib() => new d__0(-2);[CompilerGenerated]private sealed class d__0 : IEnumerable, IEnumerable, IEnumerator, IEnumerator, IDisposable{ private int <>1__state; private int <>2__current; private int <>l__initialThreadId; private int 5__2; private int 5__3; private int 5__4; int IEnumerator.Current => <>2__current; object IEnumerator.Current => <>2__current; public d__0(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__2 = 0; 5__3 = 1; <>2__current = 5__2; <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = 5__3; <>1__state = 2; return true; case 2: <>1__state = -1; break; case 3: <>1__state = -1; 5__2 = 5__3; 5__3 = 5__4; break; } 5__4 = 5__2 + 5__3; <>2__current = 5__4; <>1__state = 3; return true; } IEnumerator IEnumerable.GetEnumerator() { if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; return this; } return new d__0(0); } IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable)this).GetEnumerator(); void IEnumerator.Reset() => throw new NotSupportedException(); void IDisposable.Dispose() { }} +All of the logic for Fib is now inside of the MoveNext method, but as part of a jump table that lets the implementation branch to where it last left off, which is tracked in a generated state field on the enumerator type. And the variables I wrote as locals, like prev, next, and sum, have been “lifted” to be fields on the enumerator, so that they may persist across invocations of MoveNext. +(Note that the previous code snippet showing how the C# compiler emits the implementation won’t compile as-is. The C# compiler synthesizes “unspeakable” names, meaning it names types and members it creates in a way that’s valid IL but invalid C#, so as not to risk conflicting with any user-named types and members. I’ve kept everything named as the compiler does, but if you want to experiment with compiling it, you can rename things to use valid C# names instead.) +In my previous example, the last form of enumeration I showed involved manually using the IEnumerator. At that level, we’re manually invoking MoveNext(), deciding when it was an appropriate time to re-enter the coroutine. But… what if instead of invoking it like that, I could instead have the next invocation of MoveNext actually be part of the continuation work performed when an asynchronous operation completes? What if I could yield return something that represents an asynchronous operation and have the consuming code hook up a continuation to that yielded object where that continuation then does the MoveNext? With such an approach, I could write a helper method like this: +static Task IterateAsync(IEnumerable tasks){ var tcs = new TaskCompletionSource(); IEnumerator e = tasks.GetEnumerator(); void Process() { try { if (e.MoveNext()) { e.Current.ContinueWith(t => Process()); return; } } catch (Exception e) { tcs.SetException(e); return; } tcs.SetResult(); }; Process(); return tcs.Task;} +Now this is getting interesting. We’re given an enumerable of tasks that we can iterate through. Each time we MoveNext to the next Task and get one, we then hook up a continuation to that Task; when that Task completes, it’ll just turn around and call right back to the same logic that does a MoveNext, gets the next Task, and so on. This is building on the idea of Task as a single representation for any asynchronous operation, so the enumerable we’re fed can be a sequence of any asynchronous operations. Where might such a sequence come from? From an iterator, of course. Remember our earlier CopyStreamToStream example and how gloriously horrible the APM-based implementation was? Consider this instead: +static Task CopyStreamToStreamAsync(Stream source, Stream destination){ return IterateAsync(Impl(source, destination)); static IEnumerable Impl(Stream source, Stream destination) { var buffer = new byte[0x1000]; while (true) { Task read = source.ReadAsync(buffer, 0, buffer.Length); yield return read; int numRead = read.Result; if (numRead <= 0) { break; } Task write = destination.WriteAsync(buffer, 0, numRead); yield return write; write.Wait(); } }} +Wow, this is almost legible. We’re calling that IterateAsync helper, and the enumerable we’re feeding it is one produced by an iterator that’s handling all the control flow for the copy. It calls Stream.ReadAsync and then yield returns that Task; that yielded task is what will be handed off to IterateAsync after it calls MoveNext, and IterateAsync will hook a continuation up to that Task, which when it completes will then just call back into MoveNext and end up back in this iterator just after the yield. At that point, the Impl logic gets the result of the method, calls WriteAsync, and again yields the Task it produced. And so on. +And that, my friends, is the beginning of async/await in C# and .NET. Something around 95% of the logic in support of iterators and async/await in the C# compiler is shared. Different syntax, different types involved, but fundamentally the same transform. Squint at the yield returns, and you can almost see awaits in their stead. +In fact, some enterprising developers [used iterators in this fashion for asynchronous programming](https://learn.microsoft.com/archive/msdn-magazine/2008/june/concurrent-affairs-simplified-apm-with-the-asyncenumerator) before async/await hit the scene. And a similar transformation was prototyped in the experimental [Axum](https://en.wikipedia.org/wiki/Axum_(programming_language)) programming language, serving as a key inspiration for C#’s async support. Axum provided an async keyword that could be put onto a method, just like async can now in C#. Task wasn’t yet ubiquitous, so inside of async methods, the Axum compiler heuristically matched synchronous method calls to their APM counterparts, e.g. if it saw you calling stream.Read, it would find and utilize the corresponding stream.BeginRead and stream.EndRead methods, synthesizing the appropriate delegate to pass to the Begin method, while also generating a complete APM implementation for the async method being defined such that it was compositional. It even integrated with SynchronizationContext! While Axum was eventually shelved, it served as an awesome and motivating prototype for what eventually became async/await in C#. + +## async/await under the covers + +Now that we know how we got here, let’s dive in to how it actually works. For reference, here’s our example synchronous method again: +public void CopyStreamToStream(Stream source, Stream destination){ var buffer = new byte[0x1000]; int numRead; while ((numRead = source.Read(buffer, 0, buffer.Length)) != 0) { destination.Write(buffer, 0, numRead); }} +and again here’s what the corresponding method looks like with async/await: +public async Task CopyStreamToStreamAsync(Stream source, Stream destination){ var buffer = new byte[0x1000]; int numRead; while ((numRead = await source.ReadAsync(buffer, 0, buffer.Length)) != 0) { await destination.WriteAsync(buffer, 0, numRead); }} +A breadth of fresh air in comparison to everything we’ve seen thus far. The signature changed from void to async Task, we call ReadAsync and WriteAsync instead of Read and Write, respectively, and both of those operations are prefixed with await. That’s it. The compiler and the core libraries take over the rest, fundamentally changing how the code is actually executed. Let’s dive into how. + +### Compiler Transform + +As we’ve already seen, as with iterators, the compiler rewrites the async method into one based on a state machine. We still have a method with the same signature the developer wrote (public Task CopyStreamToStreamAsync(Stream source, Stream destination)), but the body of that method is completely different: +[AsyncStateMachine(typeof(d__0))]public Task CopyStreamToStreamAsync(Stream source, Stream destination){ d__0 stateMachine = default; stateMachine.<>t__builder = AsyncTaskMethodBuilder.Create(); stateMachine.source = source; stateMachine.destination = destination; stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task;}private struct d__0 : IAsyncStateMachine{ public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; public Stream source; public Stream destination; private byte[] 5__2; private TaskAwaiter <>u__1; private TaskAwaiter <>u__2; ...} +Note that the only signature difference from what the dev wrote is the lack of the async keyword itself. async isn’t actually a part of the method signature; like unsafe, when you put it in the method signature, you’re expressing an implementation detail of the method rather than something that’s actually exposed as part of the contract. Using async/await to implement a Task-returning method is an implementation detail. +The compiler has generated a struct named d__0, and it’s zero-initialized an instance of that struct on the stack. Importantly, if the async method completes synchronously, this state machine will never have left the stack. That means there’s no allocation associated with the state machine _unless_ the method needs to complete asynchronously, meaning it awaits something that’s not yet completed by that point. More on that in a bit. +This struct _is_ the state machine for the method, containing not only all of the transformed logic from what the developer wrote, but also fields for tracking the current position in that method as well as all of the “local” state the compiler lifted out of the method that needs to survive between MoveNext invocations. It’s the logical equivalent of the IEnumerable/IEnumerator implementation we saw in the iterator. (Note that the code I’m showing is from a release build; in debug builds the C# compiler will actually generate these state machine types as classes, as doing so can aid in certain debugging exercises). +After initializing the state machine, we see a call to [AsyncTaskMethodBuilder.Create()](https://github.com/dotnet/runtime/blob/6319039691477bf9296a0d62fd4a2491868966d8/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilder.cs#L25). While we’re currently focused on Tasks, the C# language and compiler allow for arbitrary types ([“task-like” types](https://learn.microsoft.com/dotnet/csharp/language-reference/proposals/csharp-7.0/task-types#builder-type)) to be returned from async methods, e.g. I can write a method public async MyTask CopyStreamToStreamAsync, and it would compile just fine as long as we augment the MyTask we defined earlier in an appropriate way. That appropriateness includes declaring an associated “builder” type and associating it with the type via the AsyncMethodBuilder attribute: +[AsyncMethodBuilder(typeof(MyTaskMethodBuilder))]public class MyTask{ ...}public struct MyTaskMethodBuilder{ public static MyTaskMethodBuilder Create() { ... } public void Start(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine { ... } public void SetStateMachine(IAsyncStateMachine stateMachine) { ... } public void SetResult() { ... } public void SetException(Exception exception) { ... } public void AwaitOnCompleted( ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine { ... } public void AwaitUnsafeOnCompleted( ref TAwaiter awaiter, ref TStateMachine stateMachine) where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine { ... } public MyTask Task { get { ... } }} +In this context, such a “builder” is something that knows how to create an instance of that type (the Task property), complete it either successfully and with a result if appropriate (SetResult) or with an exception (SetException), and handle hooking up continuations to awaited things that haven’t yet completed (AwaitOnCompleted/AwaitUnsafeOnCompleted). In the case of System.Threading.Tasks.Task, it is by default associated with the AsyncTaskMethodBuilder. Normally that association is provided via an [AsyncMethodBuilder(...)] attribute applied to the type, but Task is known specially to C# and so isn’t actually adorned with that attribute. As such, the compiler has reached for the builder to use for this async method, and is constructing an instance of it using the Create method that’s part of the pattern. Note that as with the state machine, AsyncTaskMethodBuilder is also a struct, so there’s no allocation here, either. +The state machine is then populated with the arguments to this entry point method. Those parameters need to be available to the body of the method that’s been moved into MoveNext, and as such these arguments need to be stored in the state machine so that they can be referenced by the code on the subsequent call to MoveNext. The state machine is also initialized to be in the initial -1 state. If MoveNext is called and the state is -1, we’ll end up starting logically at the beginning of the method. +Now the most unassuming but most consequential line: a call to the builder’s [Start](https://github.com/dotnet/runtime/blob/6319039691477bf9296a0d62fd4a2491868966d8/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilder.cs#L32-L33) method. This is another part of the pattern that must be exposed on a type used in the return position of an async method, and it’s used to perform the initial MoveNext on the state machine. The builder’s Start method is effectively just this: +public void Start(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine{ stateMachine.MoveNext();} +such that calling stateMachine.<>t__builder.Start(ref stateMachine); is really just calling stateMachine.MoveNext(). In which case, why doesn’t the compiler just emit that directly? Why have Start at all? The answer is that there’s a tad bit more to Start than I let on. But for that, we need to take a brief detour into understanding ExecutionContext. + +_ExecutionContext_ + +We’re all familiar with passing around state from method to method. You call a method, and if that method specifies parameters, you call the method with arguments in order to feed that data into the callee. This is explicitly passing around data. But there are other more implicit means. For example, rather than passing data as arguments, a method could be parameterless but could dictate that some specific static fields may be populated prior to making the method call, and the method will pull state from there. Nothing about the method’s signature indicates it takes arguments, because it doesn’t: there’s just an implicit contract between the caller and callee that the caller might populate some memory locations and the callee might read those memory locations. The callee and the caller may not even realize it’s happening if they’re intermediaries, e.g. method A might populate the statics and then call B which calls C which calls D which eventually calls E that reads the values of those statics. This is often referred to as “ambient” data: it’s not passed to you via parameters but rather is just sort of hanging out there and available for you to consume if desired. +We can take this a step further, and use thread-local state. Thread-local state, which in .NET is achieved via static fields attributed as [ThreadStatic] or via the ThreadLocal type, can be used in the same way, but with the data limited to just the current thread of execution, with every thread able to have its own isolated copy of those fields. With that, you could populate the thread static, make the method call, and then upon the method’s completion revert the changes to the thread static, enabling a fully isolated form of such implicitly passed data. +But, what about asynchrony? If we make an asynchronous method call and logic inside that asynchronous method wants to access that ambient data, how would it do so? If the data were stored in regular statics, the asynchronous method would be able to access it, but you could only ever have one such method in flight at a time, as multiple callers could end up overwriting each others’ state when they write to those shared static fields. If the data were stored in thread statics, the asynchronous method would be able to access it, but only up until the point where it stopped running synchronously on the calling thread; if it hooked up a continuation to some operation it initiated and that continuation ended up running on some other thread, it would no longer have access to the thread static information. Even if it did happen to run on the same thread, either by chance or because the scheduler forced it to, by the time it did it’s likely the data would have been removed and/or overwritten by some other operation initiated by that thread. For asynchrony, what we need is a mechanism that would allow arbitrary ambient data to flow across these asynchronous points, such that throughout an async method’s logic, wherever and whenever that logic might run, it would have access to that same data. +Enter ExecutionContext. The ExecutionContext type is the vehicle by which ambient data flows from async operation to async operation. It lives in a [ThreadStatic], but then when some asynchronous operation is initiated, it’s “captured” (a fancy way of saying “read a copy from that thread static”), stored, and then when the continuation of that asynchronous operation is run, the ExecutionContext is first restored to live in the [ThreadStatic] on the thread which is about to run the operation. ExecutionContext is the mechanism by which AsyncLocal is implemented (in fact, in .NET Core, ExecutionContext is entirely about AsyncLocal, nothing more), such that if you store a value into an AsyncLocal, and then for example queue a work item to run on the ThreadPool, that value will be visible in that AsyncLocal inside of that work item running on the pool: +var number = new AsyncLocal();number.Value = 42;ThreadPool.QueueUserWorkItem(_ => Console.WriteLine(number.Value));number.Value = 0;Console.ReadLine(); +That will print 42 every time this is run. It doesn’t matter that the moment after we queue the delegate we reset the value of the AsyncLocal back to 0, because the ExecutionContext was captured as part of the QueueUserWorkItem call, and that capture included the state of the AsyncLocal at that exact moment. We can see this in more detail by implementing our own simple thread pool: +using System.Collections.Concurrent;var number = new AsyncLocal();number.Value = 42;MyThreadPool.QueueUserWorkItem(() => Console.WriteLine(number.Value));number.Value = 0;Console.ReadLine();class MyThreadPool{ private static readonly BlockingCollection<(Action, ExecutionContext?)> s_workItems = new(); public static void QueueUserWorkItem(Action workItem) { s_workItems.Add((workItem, ExecutionContext.Capture())); } static MyThreadPool() { for (int i = 0; i < Environment.ProcessorCount; i++) { new Thread(() => { while (true) { (Action action, ExecutionContext? ec) = s_workItems.Take(); if (ec is null) { action(); } else { ExecutionContext.Run(ec, s => ((Action)s!)(), action); } } }) { IsBackground = true }.UnsafeStart(); } }} +Here MyThreadPool has a BlockingCollection<(Action, ExecutionContext?)> that represents its work item queue, with each work item being the delegate for the work to be invoked as well as the ExecutionContext associated with that work. The static constructor for the pool spins up a bunch of threads, each of which just sits in an infinite loop taking the next work item and running it. If no ExecutionContext was captured for a given delegate, the delegate is just invoked directly. But if an ExecutionContext was captured, rather than invoking the delegate directly, we call the ExecutionContext.Run method, which will restore the supplied ExecutionContext as the current context prior to running the delegate, and will then reset the context afterwards. This example includes the exact same code with an AsyncLocal previously shown, except this time using MyThreadPool instead of ThreadPool, yet it will still output 42 each time, because the pool is properly flowing ExecutionContext. +As an aside, you’ll note I called UnsafeStart in MyThreadPool‘s static constructor. Starting a new thread is exactly the kind of asynchronous point that should flow ExecutionContext, and indeed, Thread‘s Start method uses ExecutionContext.Capture to capture the current context, store it on the Thread, and then use that captured context when eventually invoking the Thread‘s ThreadStart delegate. I didn’t want to do that in this example, though, as I didn’t want the Threads to capture whatever ExecutionContext happened to be present when the static constructor ran (doing so could make a demo about ExecutionContext more convoluted), so I used the UnsafeStart method instead. Threading-related methods that begin with Unsafe behave exactly the same as the corresponding method that lacks the Unsafe prefix except that they _don’t_ capture ExecutionContext, e.g. Thread.Start and Thread.UnsafeStart do identical work, but whereas Start captures ExecutionContext, UnsafeStart does not. + +_Back To Start_ + +We took a detour into discussing ExecutionContext when I was writing about the implementation of AsyncTaskMethodBuilder.Start, which I said was effectively: +public void Start(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine{ stateMachine.MoveNext();} +and then suggested I simplified a bit. That simplification was ignoring the fact that the method actually needs to factor ExecutionContext into things, and is thus more like this: +public void Start(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine{ ExecutionContext previous = Thread.CurrentThread._executionContext; // [ThreadStatic] field try { stateMachine.MoveNext(); } finally { ExecutionContext.Restore(previous); // internal helper }} +Rather than just calling stateMachine.MoveNext() as I’d previously suggested we did, we do a dance here of getting the current ExecutionContext, then invoking MoveNext, and then upon its completion resetting the current context back to what it was prior to the MoveNext invocation. +The reason for this is to prevent ambient data leakage from an async method out to its caller. An example method demonstrates why that matters: +async Task ElevateAsAdminAndRunAsync(){ using (WindowsIdentity identity = LoginAdmin()) { using (WindowsImpersonationContext impersonatedUser = identity.Impersonate()) { await DoSensitiveWorkAsync(); } }} +“Impersonation” is the act of changing ambient information about the current user to instead be that of someone else; this lets code act on behalf of someone else, using their privileges and access. In .NET, such impersonation flows across asynchronous operations, which means it’s part of ExecutionContext. Now imagine if Start didn’t restore the previous context, and consider this code: +Task t = ElevateAsAdminAndRunAsync();PrintUser();await t; +This code could find that the ExecutionContext modified inside of ElevateAsAdminAndRunAsync remains after ElevateAsAdminAndRunAsync returns to its synchronous caller (which happens the first time the method awaits something that’s not yet complete). That’s because after calling Impersonate, we call DoSensitiveWorkAsync and await the task it returns. Assuming that task isn’t complete, it will cause the invocation of ElevateAsAdminAndRunAsync to yield and return to the caller, with the impersonation still in effect on the current thread. That is not something we want. As such, Start erects this guard that ensures any modifications to ExecutionContext don’t flow _out_ of the synchronous method call and only flow along with any subsequent work performed by the method. + +_MoveNext_ + +So, the entry point method was invoked, the state machine struct was initialized, Start was called, and that invoked MoveNext. What is MoveNext? It’s the method that contains all of the original logic from the dev’s method, but with a whole bunch of changes. Let’s start just by looking at the scaffolding of the method. Here’s a decompiled version of what the compiler emit for our method, but with everything inside of the generated try block removed: +private void MoveNext(){ try { ... // all of the code from the CopyStreamToStreamAsync method body, but not exactly as it was written } catch (Exception exception) { <>1__state = -2; 5__2 = null; <>t__builder.SetException(exception); return; } <>1__state = -2; 5__2 = null; <>t__builder.SetResult();} +Whatever other work is performed by MoveNext, it has the responsibility of completing the Task returned from the async Task method when all of the work is done. If the body of the try block throws an exception that goes unhandled, then the task will be faulted with that exception. And if the async method successfully reaches its end (equivalent to a synchronous method returning), it will complete the returned task successfully. In either of those cases, it’s setting the state of the state machine to indicate completion. (I sometimes hear developers theorize that, when it comes to exceptions, there’s a difference between those thrown before the first await and after… based on the above, it should be clear that is _not_ the case. Any exception that goes unhandled inside of an async method, no matter where it is in the method and no matter whether the method has yielded, will end up in the above catch block, with the caught exception then stored into the Task that’s returned from the async method.) +Also note that this completion is going through the builder, using its SetException and SetResult methods that are part of the pattern for a builder expected by the compiler. If the async method has previously suspended, the builder will have already had to manufacture a Task as part of that suspension handling (we’ll see how and where soon), in which case calling SetException/SetResult will complete that Task. If, however, the async method hasn’t previously suspended, then we haven’t yet created a Task or returned anything to the caller, so the builder has more flexibility in how it produces that Task. If you remember previously in the entry point method, the very last thing it does is return the Task to the caller, which it does by returning the result of accessing the builder’s Task property (so many things called “Task”, I know): +public Task CopyStreamToStreamAsync(Stream source, Stream destination){ ... return stateMachine.<>t__builder.Task;} +The builder knows if the method ever suspended, in which case it has a Task that was already created and just returns that. If the method never suspended and the builder doesn’t yet have a task, it can manufacture a completed task here. In this case, with a successful completion, it can just use Task.CompletedTask rather than allocating a new task, avoiding any allocation. In the case of a generic Task, the builder can just use Task.FromResult(TResult result). +The builder can also do whatever translations it deems are appropriate to the kind of object it’s creating. For example, Task actually has three possible final states: success, failure, and canceled. The AsyncTaskMethodBuilder‘s SetException method [special-cases](https://github.com/dotnet/runtime/blob/3e73be1b8082840545dbf85867cc4f9023e9b1aa/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs#L461-L486) OperationCanceledException, transitioning the Task into a TaskStatus.Canceled final state if the exception provided is or derives from OperationCanceledException; otherwise, the task ends as TaskStatus.Faulted. Such a distinction often isn’t apparent in consuming code; since the exception is stored into the Task regardless of whether it’s marked as Canceled or Faulted, code await‘ing that Task will not be able to observe the difference between the states (the original exception will be propagated in either case)… it only affects code that interacts with the Task directly, such as via ContinueWith, which has overloads that enable a continuation to be invoked only for a subset of completion statuses. +Now that we understand the lifecycle aspects, here’s everything filled in inside the try block in MoveNext: +private void MoveNext(){ try { int num = <>1__state; TaskAwaiter awaiter; if (num != 0) { if (num != 1) { 5__2 = new byte[4096]; goto IL_008b; } awaiter = <>u__2; <>u__2 = default(TaskAwaiter); num = (<>1__state = -1); goto IL_00f0; } TaskAwaiter awaiter2 = <>u__1; <>u__1 = default(TaskAwaiter); num = (<>1__state = -1); IL_0084: awaiter2.GetResult(); IL_008b: awaiter = source.ReadAsync(5__2, 0, 5__2.Length).GetAwaiter(); if (!awaiter.IsCompleted) { num = (<>1__state = 1); <>u__2 = awaiter; <>t__builder.AwaitUnsafeOnCompleted(ref awaiter, ref this); return; } IL_00f0: int result; if ((result = awaiter.GetResult()) != 0) { awaiter2 = destination.WriteAsync(5__2, 0, result).GetAwaiter(); if (!awaiter2.IsCompleted) { num = (<>1__state = 0); <>u__1 = awaiter2; <>t__builder.AwaitUnsafeOnCompleted(ref awaiter2, ref this); return; } goto IL_0084; } } catch (Exception exception) { <>1__state = -2; 5__2 = null; <>t__builder.SetException(exception); return; } <>1__state = -2; 5__2 = null; <>t__builder.SetResult();} +This kind of complication might feel a tad familiar. Remember how convoluted our manually-implemented BeginCopyStreamToStream based on APM was? This isn’t quite as complicated, but is also way better in that the compiler is doing the work for us, having rewritten the method in a form of continuation passing while ensuring that all necessary state is preserved for those continuations. Even so, we can squint and follow along. Remember that the state was initialized to -1 in the entry point. We then enter MoveNext, find that this state (which is now stored in the num local) is neither 0 nor 1, and thus execute the code that creates the temporary buffer and then branches to label IL_008b, where it makes the call to stream.ReadAsync. Note that at this point we’re still running synchronously from this call to MoveNext, and thus synchronously from Start, and thus synchronously from the entry point, meaning the developer’s code called CopyStreamToStreamAsync and it’s still synchronously executing, having not yet returned back a Task to represent the eventual completion of this method. That might be about to change… +We call Stream.ReadAsync and we get back a Task from it. The read may have completed synchronously, it may have completed asynchronously but so fast that it’s now already completed, or it might not have completed yet. Regardless, we have a Task that represents its eventual completion, and the compiler emits code that inspects that Task to determine how to proceed: if the Task has in fact already completed (doesn’t matter whether it was completed synchronously or just by the time we checked), then the code for this method can just continue running synchronously… no point in spending unnecessary overhead queueing a work item to handle the remainder of the method’s execution when we can instead just keep running here and now. But to handle the case where the Task hasn’t completed, the compiler needs to emit code to hook up a continuation to the Task. It thus needs to emit code that asks the Task “are you done?” Does it talk to the Task directly to ask that? +It would be limiting if the only thing you could await in C# was a System.Threading.Tasks.Task. Similarly, it would be limiting if the C# compiler had to know about every possible type that could be awaited. Instead, C# does what it typically does in cases like this: it employs a pattern of APIs. Code can await anything that exposes that appropriate pattern, the “awaiter” pattern (just as you can foreach anything that provides the proper “enumerable” pattern). For example, we can augment the MyTask type we wrote earlier to implement the awaiter pattern: +class MyTask{ ... public MyTaskAwaiter GetAwaiter() => new MyTaskAwaiter { _task = this }; public struct MyTaskAwaiter : ICriticalNotifyCompletion { internal MyTask _task; public bool IsCompleted => _task._completed; public void OnCompleted(Action continuation) => _task.ContinueWith(_ => continuation()); public void UnsafeOnCompleted(Action continuation) => _task.ContinueWith(_ => continuation()); public void GetResult() => _task.Wait(); }} +A type can be awaited if it exposes a GetAwaiter() method, which Task does. That method needs to return something that in turn exposes several members, including an IsCompleted property, which is used to check at the moment IsCompleted is called whether the operation has already completed. And you can see that happening: at IL_008b, the Task returned from ReadAsync has GetAwaiter called on it, and then IsCompleted accessed on that struct awaiter instance. If IsCompleted returns true, then we’ll end up falling through to IL_00f0, where the code calls another member of the awaiter: GetResult(). If the operation failed, GetResult() is responsible for throwing an exception in order to propagate it out of the await in the async method; otherwise, GetResult() is responsible for returning the result of the operation, if there is one. In the case here of the ReadAsync, if that result is 0, then we break out of our read/write loop, go to the end of the method where it calls SetResult, and we’re done. +Backing up a moment, though, the really interesting part of all of this is what happens if that IsCompleted check actually returns false. If it returns true, we just keep on processing the loop, akin to in the APM pattern when CompletedSynchronously returned true and the caller of the Begin method, rather than the callback, was responsible for continuing execution. But if IsCompleted returns false, we need to suspend the execution of the async method until the await‘d operation completes. That means returning out of MoveNext, and as this was part of Start and we’re still in the entry point method, that means returning the Task out to the caller. But before any of that can happen, we need to hook up a continuation to the Task being awaited (noting that to avoid stack dives as in the APM case, if the asynchronous operation completes after IsCompleted returns false but before we get to hook up the continuation, the continuation still needs to be invoked asynchronously from the calling thread, and thus it’ll get queued). Since we can await anything, we can’t just talk to the Task instance directly; instead, we need to go through some pattern-based method to perform this. +Does that mean there’s a method on the awaiter that will hook up the continuation? That would make sense; after all, Task itself supports continuations, has a ContinueWith method, etc… shouldn’t it be the TaskAwaiter returned from GetAwaiter that exposes the method that lets us set up a continuation? It does, in fact. The awaiter pattern requires that the awaiter implement the INotifyCompletion interface, which contains a single method void OnCompleted(Action continuation). An awaiter can also optionally implement the ICriticalNotifyCompletion interface, which inherits INotifyCompletion and adds a void UnsafeOnCompleted(Action continuation) method. Per our previous discussion of ExecutionContext, you can guess what the difference between these two methods is: both hook up the continuation, but whereas OnCompleted should flow ExecutionContext, UnsafeOnCompleted needn’t. The need for two distinct methods here, INotifyCompletion.OnCompleted and ICriticalNotifyCompletion.UnsafeOnCompleted, is largely historical, having to do with Code Access Security, or CAS. CAS no longer exists in .NET Core, and it’s off by default in .NET Framework, having teeth only if you opt back in to the legacy partial trust feature. When partial trust is used, CAS information flows as part of ExecutionContext, and thus not flowing it is “unsafe”, hence why methods that don’t flow ExecutionContext were prefixed with “Unsafe”. Such methods were also attributed as [SecurityCritical], and partially trusted code can’t call a [SecurityCritical] method. As a result, two variants of OnCompleted were created, with the compiler preferring to use UnsafeOnCompleted if provided, but with the OnCompleted variant always provided on its own in case an awaiter needed to support partial trust. From an async method perspective, however, the builder always flows ExecutionContext across await points, so an awaiter that also does so is unnecessary and duplicative work. +Ok, so the awaiter does expose a method to hook up the continuation. The compiler _could_ use it directly, except for a very critical piece of the puzzle: what exactly should the continuation be? And more to the point, with what object should it be associated? Remember that the state machine struct is on the stack, and the MoveNext invocation we’re currently running in is a method call on that instance. We need to preserve the state machine so that upon resumption we have all the correct state, which means the state machine can’t just keep living on the stack; it needs to be copied to somewhere on the heap, since the stack is going to end up being used for other subsequent, unrelated work performed by this thread. And then the continuation needs to invoke the MoveNext method on that copy of the state machine on the heap. +Moreover, ExecutionContext is relevant here as well. The state machine needs to ensure that any ambient data stored in the ExecutionContext is captured at the point of suspension and then applied at the point of resumption, which means the continuation also needs to incorporate that ExecutionContext. So, just creating a delegate that points to MoveNext on the state machine is insufficient. It’s also undesirable overhead. If when we suspend we create a delegate that points to MoveNext on the state machine, each time we do so we’ll be boxing the state machine struct (even when it’s already on the heap as part of some other object) and allocating an additional delegate (the delegate’s this object reference will be to a newly boxed copy of the struct). We thus need to do a complicated dance whereby we ensure we only promote the struct from the stack to the heap the first time the method suspends execution but all other times uses the same heap object as the target of the MoveNext, and in the process ensures we’ve captured the right context, and upon resumption ensures we’re using that captured context to invoke the operation. +That’s a lot more logic than we want the compiler to emit… we instead want it encapsulated in a helper, for several reasons. First, it’s a lot of complicated code to be emitted into each user’s assembly. Second, we want to allow customization of that logic as part of implementing the builder pattern (we’ll see an example of why later when talking about pooling). And third, we want to be able to evolve and improve that logic and have existing previously-compiled binaries just get better. That’s not a hypothetical; the library code for this support was completely overhauled in .NET Core 2.1, such that the operation is much more efficient than it was on .NET Framework. We’ll start by exploring exactly how this worked on .NET Framework, and then look at what happens now in .NET Core. +You can see in the code generated by the C# compiler happens when we need to suspend: +if (!awaiter.IsCompleted) // we need to suspend when IsCompleted is false{ <>1__state = 1; <>u__2 = awaiter; <>t__builder.AwaitUnsafeOnCompleted(ref awaiter, ref this); return;} +We’re storing into the state field the state id that indicates the location we should jump to when the method resumes. We’re then persisting the awaiter itself into a field, so that it can be used to call GetResult after resumption. And then just before returning out of the MoveNext call, the very last thing we do is call <>t__builder.AwaitUnsafeOnCompleted(ref awaiter, ref this), asking the builder to hook up a continuation to the awaiter for this state machine. (Note that it calls the builder’s AwaitUnsafeOnCompleted rather than the builder’s AwaitOnCompleted because the awaiter implements ICriticalNotifyCompletion; the state machine handles flowing ExecutionContext so we needn’t require the awaiter to as well… as mentioned earlier, doing so would just be duplicative and unnecessary overhead.) +The implementation of that AwaitUnsafeOnCompleted method is too complicated to copy here, so I’ll summarize [what it does](https://referencesource.microsoft.com/#mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs,535) on .NET Framework: + +1. It uses ExecutionContext.Capture() to grab the current context. +2. It then allocates a MoveNextRunner object to wrap both the captured context as well as the boxed state machine (which we don’t yet have if this is the first time the method suspends, so we just use null as a placeholder). +3. It then creates an Action delegate to a Run method on that MoveNextRunner; this is how it’s able to get a delegate that will invoke the state machine’s MoveNext in the context of the captured ExecutionContext. +4. If this is the first time the method is suspending, we won’t yet have a boxed state machine, so at this point it boxes it, creating a copy on the heap by storing the instance into a local typed as the IAsyncStateMachine interface. That box is then stored into the MoveNextRunner that was allocated. +5. Now comes a somewhat mind-bending step. If you look back at the definition of the state machine struct, it contains the builder, public AsyncTaskMethodBuilder <>t__builder;, and if you look at the definition of the builder, it contains internal IAsyncStateMachine m_stateMachine;. The builder needs to reference the boxed state machine so that on subsequent suspensions it can see it’s already boxed the state machine and doesn’t need to do so again. But we just boxed the state machine, and that state machine contained a builder whose m_stateMachine field is null. We need to mutate that boxed state machine’s builder’s m_stateMachine to point to its parent box. To achieve that, the IAsyncStateMachine interface that the compiler-generated state machine struct implements includes a void SetStateMachine(IAsyncStateMachine stateMachine); method, and that state machine struct includes an implementation of that interface method: + +private void SetStateMachine(IAsyncStateMachine stateMachine) => <>t__builder.SetStateMachine(stateMachine); +So the builder boxes the state machine, and then passes that box to the box’s SetStateMachine method, which calls to the builder’s SetStateMachine method, which stores the box into the field. Whew. + +7. Finally, we have an Action that represents the continuation, and that’s passed to the awaiter’s UnsafeOnCompleted method. In the case of a TaskAwaiter, the task will store that Action into the task’s continuation list, such that when the task completes, it’ll invoke the Action, call back through the MoveNextRunner.Run, call back through ExecutionContext.Run, and finally invoke the state machine’s MoveNext method to re-enter the state machine and continue running from where it left off. + +That’s what happens on .NET Framework, and you can witness the outcome of this in a profiler, such as by running an allocation profiler to see what’s allocated on each await. Let’s take this silly program, which I’ve written just to highlight the allocation costs involved: +using System.Threading;using System.Threading.Tasks;class Program{ static async Task Main() { var al = new AsyncLocal() { Value = 42 }; for (int i = 0; i < 1000; i++) { await SomeMethodAsync(); } } static async Task SomeMethodAsync() { for (int i = 0; i < 1000; i++) { await Task.Yield(); } }} +This program is creating an AsyncLocal to flow the value 42 through all subsequent async operations. It’s then calling SomeMethodAsync 1000 times, each of which is suspending/resuming 1000 times. In Visual Studio, I run this using the [.NET Object Allocation Tracking profiler](https://learn.microsoft.com/visualstudio/profiling/dotnet-alloc-tool), which yields the following results: + +[![Allocation associated with asynchronous operations on .NET Framework](Exported%20image%2020240808113926-2.png)](https://devblogs.microsoft.com/dotnet/wp-content/uploads/sites/10/2023/03/AllocationNetFramework.png) + +That’s… a lot of allocation! Let’s examine each of these to understand where they’re coming from. + +- ExecutionContext. There’s over a million of these being allocated. Why? Because in .NET Framework, ExecutionContext is a _mutable_ data structure. Since we want to flow the data that was present at the time an async operation was forked and we don’t want it to then see mutations performed after that fork, we need to copy the ExecutionContext. Every single forked operation requires such a copy, so with 1000 calls to SomeMethodAsync each of which is suspending/resuming 1000 times, we have a million ExecutionContext instances. Ouch. +- Action. Similarly, every time we await something that’s not yet complete (which is the case with our million await Task.Yield()s), we end up allocating a new Action delegate to pass to that awaiter’s UnsafeOnCompleted method. +- MoveNextRunner. Same deal; there’s a million of these, since in the outline of the steps earlier, every time we suspend, we’re allocating a new MoveNextRunner to store the Action and the ExecutionContext, in order to execute the former with the latter. +- LogicalCallContext. Another million. These are an implementation detail of AsyncLocal on .NET Framework; AsyncLocal stores its data into the ExecutionContext‘s “logical call context”, which is a fancy way of saying the general state that’s flowed with the ExecutionContext. So, if we’re making a million copies of the ExecutionContext, we’re making a million copies of the LogicalCallContext, too. +- QueueUserWorkItemCallback. Each Task.Yield() is queueing a work item to the thread pool, resulting in a million allocations of the work item objects used to represent those million operations. +- Task. There’s a thousand of these, so at least we’re out of the “million” club. Every async Task invocation that completes asynchronously needs to allocate a new Task instance to represent the eventual completion of that call. +- d__1. This is the box of the compiler-generated state machine struct. 1000 methods suspend, 1000 boxes occur. +- QueueSegment/IThreadPoolWorkItem[]. There are several thousand of these, and they’re not technically related to async methods specifically, but rather to work being queued to the thread pool in general. In .NET Framework, the thread pool’s queue is a linked list of non-circular segments. These segments aren’t reused; for a segment of length N, once N work items have been enqueued into and dequeued from that segment, the segment is discarded and left up for garbage collection. + +That was .NET Framework. [This](https://github.com/dotnet/runtime/blob/8de96c8b1b1cc3a781f23dcdf68c0aeb62dadbe7/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs#L97-L145) is .NET Core: + +[![Allocation associated with asynchronous operations on .NET Core](Exported%20image%2020240808113926-3.png)](https://devblogs.microsoft.com/dotnet/wp-content/uploads/sites/10/2023/03/AllocationNetCore.png) + +So much prettier! For this sample on .NET Framework, there were more than 5 million allocations totaling ~145MB of allocated memory. For that same sample on .NET Core, there were instead only ~1000 allocations totaling only ~109KB. Why so much less? + +- ExecutionContext. In .NET Core, ExecutionContext is now _immutable_. The downside to that is that every change to the context, e.g. by setting a value into an AsyncLocal, requires allocating a new ExecutionContext. The upside, however, is that flowing context is way, way, way more common than is changing it, and as ExecutionContext is now immutable, we no longer need to clone as part of flowing it. “Capturing” the context is literally just reading it out of a field, rather than reading it and doing a clone of its contents. So it’s not only way, way, way more common to flow than to change, it’s also way, way, way cheaper. +- LogicalCallContext. This no longer exists in .NET Core. In .NET Core, the only thing ExecutionContext exists for is the storage for AsyncLocal. Other things that had their own special place in ExecutionContext are modeled in terms of AsyncLocal. For example, impersonation in .NET Framework would flow as part of the SecurityContext that’s part of ExecutionContext; in .NET Core, impersonation flows via an AsyncLocal that uses a valueChangedHandler to make appropriate changes to the current thread. +- QueueSegment/IThreadPoolWorkItem[]. In .NET Core, the ThreadPool‘s global queue is now implemented as a ConcurrentQueue, and ConcurrentQueue has been rewritten to be a linked list of _circular_ segments of non-fixed size. Once the size of a segment is large enough that the segment never fills because steady-state dequeues are able to keep up with steady-state enqueues, no additional segments need to be allocated, and the same large-enough segment is just used endlessly. + +What about the rest of the allocations, like Action, MoveNextRunner, and d__1? Understanding how the remaining allocations were removed requires diving into how this now works on .NET Core. +Let’s rewind our discussion back to when we were discussing what happens at suspension time: +if (!awaiter.IsCompleted) // we need to suspend when IsCompleted is false{ <>1__state = 1; <>u__2 = awaiter; <>t__builder.AwaitUnsafeOnCompleted(ref awaiter, ref this); return;} +The code that’s emitted here is the same regardless of which platform surface area is being targeted, so regardless of .NET Framework vs .NET Core, the generated IL for this suspension is identical. What changes, however, is the implementation of that AwaitUnsafeOnCompleted method, which on .NET Core is much different: + +1. Things do start out the same: the method calls ExecutionContext.Capture() to get the current execution context. +2. Then things diverge from .NET Framework. The builder in .NET Core has just a single field on it: + +public struct AsyncTaskMethodBuilder{ private Task? m_task; ...} +After capturing the ExecutionContext, it checks whether that m_task field contains an instance of an [AsyncStateMachineBox](https://github.com/dotnet/runtime/blob/8de96c8b1b1cc3a781f23dcdf68c0aeb62dadbe7/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs#L273), where TStateMachine is the type of the compiler-generated state machine struct. That AsyncStateMachineBox type is the “magic.” It’s defined like this: +private class AsyncStateMachineBox : Task, IAsyncStateMachineBox where TStateMachine : IAsyncStateMachine{ private Action? _moveNextAction; public TStateMachine? StateMachine; public ExecutionContext? Context; ...} +Rather than having a separate Task, this _is_ the task (note its base type). Rather than boxing the state machine, the struct just lives as a strongly-typed field on this task. And rather than having a separate MoveNextRunner to store both the Action and the ExecutionContext, they’re just fields on this type, and since this _is_ the instance that gets stored into the builder’s m_task field, we have direct access to it and don’t need to re-allocate things on every suspension. If the ExecutionContext changes, we can just overwrite the field with the new context and don’t need to allocate anything else; any Action we have still points to the right place. So, after capturing the ExecutionContext, if we already have an instance of this AsyncStateMachineBox, this isn’t the first time the method is suspending, and we can just store the newly captured ExecutionContext into it. If we don’t already have an instance of AsyncStateMachineBox, then we need to allocate it: +var box = new AsyncStateMachineBox();taskField = box; // important: this must be done before storing stateMachine into box.StateMachine!box.StateMachine = stateMachine;box.Context = currentContext; +Note that line which the source comments as “important”. This takes the place of that complicated SetStateMachine dance in .NET Framework, such that SetStateMachine isn’t actually used at all in .NET Core. The taskField you see there is a ref to the AsyncTaskMethodBuilder‘s m_task field. We allocate the AsyncStateMachineBox, then via taskField store that object into the builder’s m_task (this is the builder that’s in the state machine struct on the stack), and then copy that stack-based state machine (which now already contains the reference to the box) into the heap-based AsyncStateMachineBox, such that the AsyncStateMachineBox appropriately and recursively ends up referencing itself. Still mind bending, but a much more efficient mind bending. + +4. We can then get an Action to a method on this instance that will invoke its MoveNext method that will do the appropriate ExecutionContext restoration prior to calling into the StateMachine‘s MoveNext. And that Action can be cached into the _moveNextAction field such that any subsequent use can just reuse the same Action. That Action is then passed to the awaiter’s UnsafeOnCompleted to hook up the continuation. + +That explanation explains why most of the rest of the allocations are gone: d__1 doesn’t get boxed and instead just lives as a field on the task itself, and the MoveNextRunner is no longer needed as it existed only to store the Action and ExecutionContext. But, based on this explanation, we should have still seen 1000 Action allocations, one per method call, and we didn’t. Why? And what about those QueueUserWorkItemCallback objects… we’re still queueing as part of Task.Yield(), so why aren’t those showing up? +As I noted, one of the nice things about pushing off the implementation details into the core library is it can evolve the implementation over time, and we’ve already seen how it evolved from .NET Framework to .NET Core. It’s also evolved further from the initial rewrite for .NET Core, with additional optimizations that benefit from having internal access to key components in the system. In particular, the async infrastructure knows about core types like Task and TaskAwaiter. And because it knows about them and has internals access, it doesn’t have to play by the publicly-defined rules. The awaiter pattern followed by the C# language requires an awaiter to have an AwaitOnCompleted or AwaitUnsafeOnCompleted method, both of which take the continuation as an Action, and that means the infrastructure needs to be able to create an Action to represent the continuation, in order to work with arbitrary awaiters the infrastructure knows nothing about. But if the infrastructure encounters an awaiter it _does_ know about, it’s under no obligation to take the same code path. For all of the core awaiters defined in System.Private.CoreLib, then, the infrastructure has a leaner path it can follow, one that doesn’t require an Action at all. These awaiters all know about IAsyncStateMachineBoxes, and are able to treat the box object itself as the continuation. So, for example, the YieldAwaitable returned by Task.Yield is able to queue the IAsyncStateMachineBox itself directly into the ThreadPool as a work item, and the TaskAwaiter used when await‘ing a Task is able to store the IAsyncStateMachineBox itself directly into the Task‘s continuation list. No Action needed, no QueueUserWorkItemCallback needed. +Thus, in the very common case where an async method only awaits things from System.Private.CoreLib (Task, Task, ValueTask, ValueTask, YieldAwaitable, and the ConfigureAwait variants of those), worst case is there’s only ever a single allocation of overhead associated with the entire lifecycle of the async method: if the method ever suspends, it allocates that single Task-derived type which stores all other required state, and if the method never suspends, there’s no additional allocation incurred. +We can get rid of that last allocation as well, if desired, at least in an amortized fashion. As has been shown, there’s a default builder associated with Task (AsyncTaskMethodBuilder), and similarly there’s a default builder associated with Task (AsyncTaskMethodBuilder) and with ValueTask and ValueTask (AsyncValueTaskMethodBuilder and AsyncValueTaskMethodBuilder, respectively). For ValueTask/ValueTask, the builders are actually fairly simple, as they themselves only handle the synchronously-and-successfully-completing case, in which case the async method completes without ever suspending and the builders can just return a ValueTask.Completed or a ValueTask wrapping the result value. For everything else, they just delegate to AsyncTaskMethodBuilder/AsyncTaskMethodBuilder, since the ValueTask/ValueTask that’ll be returned just wraps a Task and it can share all of the same logic. But [.NET 6 and C# 10](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-6) introduced the ability for a method to override the builder that’s used on a method-by-method basis, and introduced a couple of specialized builders for ValueTask/ValueTask that are able to pool IValueTaskSource/IValueTaskSource objects representing the eventual completion rather than using Tasks. +We can see the impact of this in our sample. Let’s slightly tweak our SomeMethodAsync we were profiling to return ValueTask instead of Task: +static async ValueTask SomeMethodAsync(){ for (int i = 0; i < 1000; i++) { await Task.Yield(); }} +That will result in this generated entry point: +[AsyncStateMachine(typeof(d__1))]private static ValueTask SomeMethodAsync(){ d__1 stateMachine = default; stateMachine.<>t__builder = AsyncValueTaskMethodBuilder.Create(); stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task;} +Now, we add [AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder))] to the declaration of SomeMethodAsync: +[AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder))]static async ValueTask SomeMethodAsync(){ for (int i = 0; i < 1000; i++) { await Task.Yield(); }} +and the compiler instead outputs this: +[AsyncStateMachine(typeof(d__1))][AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder))]private static ValueTask SomeMethodAsync(){ d__1 stateMachine = default; stateMachine.<>t__builder = PoolingAsyncValueTaskMethodBuilder.Create(); stateMachine.<>1__state = -1; stateMachine.<>t__builder.Start(ref stateMachine); return stateMachine.<>t__builder.Task;} +The actual C# code gen for the entirety of the implementation, including the whole state machine (not shown), is almost identical; the _only_ difference is the type of the builder that’s created and stored and thus used everywhere we previously saw references to the builder. And if you look at [the code for](https://github.com/dotnet/runtime/blob/8de96c8b1b1cc3a781f23dcdf68c0aeb62dadbe7/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/PoolingAsyncValueTaskMethodBuilderT.cs#L152-L218) PoolingAsyncValueTaskMethodBuilder, you’ll see its structure is almost identical to that of AsyncTaskMethodBuilder, including using some of the exact same shared routines for doing things like special-casing known awaiter types. The key difference is that instead of doing new AsyncStateMachineBox() when the method first suspends, it instead does StateMachineBox.RentFromCache(), and upon the async method (SomeMethodAsync) completing and an await on the returned ValueTask completing, the rented box is returned to the cache. That means (amortized) zero allocation: + +[![Allocation associated with asynchronous operations on .NET Core with pooling](Exported%20image%2020240808113926-4.png)](https://devblogs.microsoft.com/dotnet/wp-content/uploads/sites/10/2023/03/AllocationNetCoreWithPooling.png) + +That cache in and of itself is a bit interesting. Object pooling can be a good idea and it can be a bad idea. The more expensive an object is to create, the more valuable it is to pool them; so, for example, it’s a lot more valuable to pool really large arrays than it is to pool really tiny arrays, because larger arrays not only require more CPU cycles and memory accesses to zero out, they put more pressure on the garbage collector to collect more often. For very small objects, though, pooling them can be a net negative. Pools are just memory allocators, as is the GC, so when you pool, you’re trading off the costs associated with one allocator for the costs associated with another, and the GC is very efficient at handling lots of tiny, short-lived objects. If you do a lot of work in an object’s constructor, avoiding that work can dwarf the costs of the allocator itself, making pooling valuable. But if you do little to no work in an object’s constructor, and you pool it, you’re betting that your allocator (your pool) is more efficient for the access patterns employed than is the GC, and that is frequently a bad bet. There are other costs involved as well, and in some cases you can end up effectively fighting against the GC’s heuristics; for example, the GC is optimized based on the premise that references from higher generation (e.g. gen2) objects to lower generation (e.g. gen0) objects are relatively rare, but pooling objects can invalidate those premises. +Now, the objects created by async methods aren’t _tiny_, and they can be on super hot paths, so pooling can be reasonable. But to make it as valuable as possible we also want to avoid as much overhead as possible. The pool is thus very simple, opting to make renting and returning really fast with little to no contention, even if that means it might end up allocating more than it would if it more aggressively cached more. For each state machine type, the implementation [pools](https://github.com/dotnet/runtime/blob/8de96c8b1b1cc3a781f23dcdf68c0aeb62dadbe7/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/PoolingAsyncValueTaskMethodBuilderT.cs#L287-L292) up to a single state machine box per _thread_ and a single state machine box per _core_; this allows it to rent and return with minimal overhead and minimal contention (no other thread can be accessing the thread-specific cache at the same time, and it’s rare for another thread to be accessing the core-specific cache at the same time). And while this might seem like a relatively small pool, it’s also quite effective at significantly reducing steady state allocation, given that the pool is only responsible for storing objects not currently in use; you could have a million async methods all in flight at any given time, and even though the pool is only able to store up to one object per thread and per core, it can still avoid dropping lots of objects, since it only needs to store an object long enough to transfer it from one operation to another, not while it’s in use by that operation. + +### SynchronizationContext and ConfigureAwait + +We talked about SynchronizationContext previously in the context of the EAP pattern and mentioned that it would show up again. SynchronizationContext makes it possible to call reusable helpers and automatically be scheduled back whenever and to wherever the calling environment deems fit. As a result, it’s natural to expect that to “just work” with async/await, and it does. Going back to our button click handler from earlier: +ThreadPool.QueueUserWorkItem(_ =>{ string message = ComputeMessage(); button1.BeginInvoke(() => { button1.Text = message; });}); +with async/await we’d like to instead be able to write this as follows: +button1.Text = await Task.Run(() => ComputeMessage()); +That invocation of ComputeMessage is offloaded to the thread pool, and upon the method’s completion, execution transitions back to the UI thread associated with the button, and the setting of its Text property happens on that thread. +That integration with SynchronizationContext is left up to the awaiter implementation (the code generated for the state machine knows nothing about SynchronizationContext), as it’s the awaiter that is responsible for actually invoking or queueing the supplied continuation when the represented asynchronous operation completes. While a custom awaiter need not respect SynchronizationContext.Current, the awaiters for Task, Task, ValueTask, and ValueTask all do. That means that, by default, when you await a Task, a Task, a ValueTask, a ValueTask, or even the result of a Task.Yield() call, the awaiter by default will look up the current SynchronizationContext and then if it successfully got a non-default one, will eventually queue the continuation to that context. +We can see this if we look at the code involved in TaskAwaiter. Here’s a snippet of the [relevant code](https://github.com/dotnet/runtime/blob/967a59712996c2cdb8ce2f65fb3167afbd8b01f3/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs#L2558-L2583) from Corelib: +internal void UnsafeSetContinuationForAwait(IAsyncStateMachineBox stateMachineBox, bool continueOnCapturedContext){ if (continueOnCapturedContext) { SynchronizationContext? syncCtx = SynchronizationContext.Current; if (syncCtx != null && syncCtx.GetType() != typeof(SynchronizationContext)) { var tc = new SynchronizationContextAwaitTaskContinuation(syncCtx, stateMachineBox.MoveNextAction, flowExecutionContext: false); if (!AddTaskContinuation(tc, addBeforeOthers: false)) { tc.Run(this, canInlineContinuationTask: false); } return; } else { TaskScheduler? scheduler = TaskScheduler.InternalCurrent; if (scheduler != null && scheduler != TaskScheduler.Default) { var tc = new TaskSchedulerAwaitTaskContinuation(scheduler, stateMachineBox.MoveNextAction, flowExecutionContext: false); if (!AddTaskContinuation(tc, addBeforeOthers: false)) { tc.Run(this, canInlineContinuationTask: false); } return; } } } ...} +This is part of a method that’s determining what object to store into the Task as a continuation. It’s being passed the stateMachineBox, which, as was alluded to earlier, can be stored directly into the Task‘s continuation list. However, this special logic might wrap that IAsyncStateMachineBox to also incorporate a scheduler if one is present. It checks to see whether there’s currently a non-default SynchronizationContext, and if there is, it creates a SynchronizationContextAwaitTaskContinuation as the actual object that’ll be stored as the continuation; that object in turn wraps the original and the captured SynchronizationContext, and knows how to invoke the former’s MoveNext in a work item queued to the latter. This is how you’re able to await as part of some event handler in a UI application and have the code after the awaits completion continue on the right thread. The next interesting thing to note here is that it’s not just paying attention to a SynchronizationContext: if it couldn’t find a custom SynchronizationContext to use, it also looks to see whether the TaskScheduler type that’s used by Tasks has a custom one in play that needs to be considered. As with SynchronizationContext, if there’s a non-default one of those, it’s then wrapped with the original box in a TaskSchedulerAwaitTaskContinuation that’s used as the continuation object. +But arguably the most interesting thing to notice here is the very first line of the method body: if (continueOnCapturedContext). We only do these checks for SynchronizationContext/TaskScheduler if continueOnCapturedContext is true; if it’s false, the implementation behaves as if both were default and ignores them. What, pray tell, sets continueOnCapturedContext to false? You’ve probably guessed it: using the ever popular ConfigureAwait(false). +I talk about ConfigureAwait at length in [ConfigureAwait FAQ](https://devblogs.microsoft.com/dotnet/configureawait-faq/), so I’d encourage you to read that for more information. Suffice it to say, the _only_ thing ConfigureAwait(false) does as part of an await is feed its argument Boolean into this function (and others like it) as that continueOnCapturedContext value, so as to skip the checks on SynchronizationContext/TaskScheduler and behave as if neither of them existed. In the case of Tasks, this then permits the Task to invoke its continuations wherever it deems fit rather than being forced to queue them to execute on some specific scheduler. +I previously mentioned one other aspect of SynchronizationContext, and I said we’d see it again: OperationStarted/OperationCompleted. Now’s the time. These rear their heads as part of the feature everyone loves to hate: async void. ConfigureAwait-aside, async void is arguably one of the most divisive features added as part of async/await. It was added for one reason and one reason only: event handlers. In a UI application, you want to be able to write code like the following: +button1.Click += async (sender, eventArgs) =>{ button1.Text = await Task.Run(() => ComputeMessage()); }; +but if all async methods had to have a return type like Task, you wouldn’t be able to do this. The Click event has a signature public event EventHandler? Click;, with EventHandler defined as public delegate void EventHandler(object? sender, EventArgs e);, and thus to provide a method that matches that signature, the method needs to be void-returning. +There are a variety of reasons async void is considered bad, why [articles](https://learn.microsoft.com/archive/msdn-magazine/2013/march/async-await-best-practices-in-asynchronous-programming) recommend avoiding it wherever possible, and why [analyzers](https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/VSTHRD101.md) have sprung up to flag use of them. One of the biggest issues is with delegate inference. Consider this program: +using System.Diagnostics;Time(async () =>{ Console.WriteLine("Enter"); await Task.Delay(TimeSpan.FromSeconds(10)); Console.WriteLine("Exit");});static void Time(Action action){ Console.WriteLine("Timing..."); Stopwatch sw = Stopwatch.StartNew(); action(); Console.WriteLine($"...done timing: {sw.Elapsed}");} +One could easily expect this to output an elapsed time of at least 10 seconds, but if you run this you’ll instead find output like this: +Timing...Enter...done timing: 00:00:00.0037550 +Huh? Of course, based on everything we’ve discussed in this post, it should be understood what the problem is. The async lambda is actually an async void method. Async methods return to their caller the moment they hit the first suspension point. If this were an async Task method, that’s when the Task would be returned. But in the case of an async void, nothing is returned. All the Time method knows is that it invoked action(); and the delegate call returned; it has no idea that the async method is actually still “running” and will asynchronously complete later. +That’s where OperationStarted/OperationCompleted come in. Such async void methods are similar in nature to the EAP methods discussed earlier: the initiation of such methods is void, and so you need some other mechanism to be able to track all such operations in flight. The EAP implementations thus call the current SynchronizationContext‘s OperationStarted when the operation is initiated and OperationCompleted when it completes, and async void does the same. The builder associated with async void is AsyncVoidMethodBuilder. Remember in the entry point of an async method how the compiler-generated code invokes the builder’s static Create method to get an appropriate builder instance? AsyncVoidMethodBuilder takes advantage of that in order to hook creation and invoke OperationStarted: +public static AsyncVoidMethodBuilder Create(){ SynchronizationContext? sc = SynchronizationContext.Current; sc?.OperationStarted(); return new AsyncVoidMethodBuilder() { _synchronizationContext = sc };} +Similarly, when the builder is marked for completion via either SetResult or SetException, it invokes the corresponding OperationCompleted method. This is how a unit testing framework like xunit is able to have async void test methods and still employ a maximum degree of concurrency on concurrent test executions, for example in xunit’s [AsyncTestSyncContext](https://github.com/xunit/xunit/blob/4d1f2e5d4ac9260487d0a8f35a2d045388021b33/src/xunit.v3.core/Sdk/AsyncTestSyncContext.cs#L1). +With that knowledge, we can now rewrite our timing sample: +using System.Diagnostics;Time(async () =>{ Console.WriteLine("Enter"); await Task.Delay(TimeSpan.FromSeconds(10)); Console.WriteLine("Exit");});static void Time(Action action){ var oldCtx = SynchronizationContext.Current; try { var newCtx = new CountdownContext(); SynchronizationContext.SetSynchronizationContext(newCtx); Console.WriteLine("Timing..."); Stopwatch sw = Stopwatch.StartNew();  action(); newCtx.SignalAndWait(); Console.WriteLine($"...done timing: {sw.Elapsed}"); } finally { SynchronizationContext.SetSynchronizationContext(oldCtx); }}sealed class CountdownContext : SynchronizationContext{ private readonly ManualResetEventSlim _mres = new ManualResetEventSlim(false); private int _remaining = 1; public override void OperationStarted() => Interlocked.Increment(ref _remaining); public override void OperationCompleted() { if (Interlocked.Decrement(ref _remaining) == 0) { _mres.Set(); } } public void SignalAndWait() { OperationCompleted(); _mres.Wait(); }} +Here, I’ve created a SynchronizationContext that tracks a count for pending operations, and supports blocking waiting for them all to complete. When I run that, I get output like this: +Timing...EnterExit...done timing: 00:00:10.0149074 +Tada! + +### State Machine Fields + +At this point, we’ve seen the generated entry point method and how everything in the MoveNext implementation works. We also glimpsed some of the fields defined on the state machine. Let’s take a closer look at those. +For the CopyStreamToStream method shown earlier: +public async Task CopyStreamToStreamAsync(Stream source, Stream destination){ var buffer = new byte[0x1000]; int numRead; while ((numRead = await source.ReadAsync(buffer, 0, buffer.Length)) != 0) { await destination.WriteAsync(buffer, 0, numRead); }} +here are the fields we ended up with: +private struct d__0 : IAsyncStateMachine{ public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; public Stream source; public Stream destination; private byte[] 5__2; private TaskAwaiter <>u__1; private TaskAwaiter <>u__2; ...} +What are each of these? + +- <>1__state. The is the “state” in “state machine”. It defines the current state the state machine is in, and most importantly what should be done the next time MoveNext is called. If the state is -2, the operation has completed. If the state is -1, either we’re about to call MoveNext for the first time or MoveNext code is currently running on some thread. If you’re debugging an async method’s processing and you see the state as -1, that means there’s some thread somewhere that’s actually executing the code contained in the method. If the state is 0 or greater, the method is suspended, and the value of the state tells you at which await it’s suspended. While this isn’t a hard and fast rule (certain code patterns can confuse the numbering), in general the state assigned corresponds to the 0-based number of the await in top-to-bottom ordering of the source code. So, for example, if the body of an async method were entirely: await A();await B();await C();await D(); + +and you found the state value was 2, that almost certainly means the async method is currently suspended waiting for the task returned from C() to complete. + +- <>t__builder. This is the builder for the state machine, e.g. AsyncTaskMethodBuilder for a Task, AsyncValueTaskMethodBuilder for a ValueTask, AsyncVoidMethodBuilder for an async void method, or whatever builder was declared for use via [AsyncMethodBuilder(...)] on either the async return type or overridden via such an attribute on the async method itself. As previously discussed, the builder is responsible for the lifecycle of the async method, including creating the return task, eventually completing that task, and serving as an intermediary for suspension, with the code in the async method asking the builder to suspend until a specific awaiter completes. +- source/destination. These are the method parameters. You can tell because they’re not name mangled; the compiler has named them exactly as the parameter names were specified. As noted earlier, all parameters that are used by the method body need to be stored onto the state machine so that the MoveNext method has access to them. Note I said “used by”. If the compiler sees that a parameter is unused by the body of the async method, it can optimize away the need to store the field. For example, given the method: public async Task M(int someArgument){ await Task.Yield();} + +the compiler will emit these fields onto the state machine: +private struct d__0 : IAsyncStateMachine{ public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; private YieldAwaitable.YieldAwaiter <>u__1; ...} +Note the distinct lack of something named someArgument. But, if we change the async method to actually use the argument in any way: +public async Task M(int someArgument){ Console.WriteLine(someArgument); await Task.Yield();} +it shows up: +private struct d__0 : IAsyncStateMachine{ public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; public int someArgument; private YieldAwaitable.YieldAwaiter <>u__1; ...} + +- 5__2;. This is the buffer “local” that got lifted to be a field so that it could survive across await points. The compiler tries reasonably hard to keep state from being lifted unnecessarily. Note that there’s another local in the source, numRead, that _doesn’t_ have a corresponding field in the state machine. Why? Because it’s not necessary. That local is set as the result of the ReadAsync call and is then used as the input to the WriteAsync call. There’s no await in between those and across which the numRead value would need to be stored. Just as how in a synchronous method the JIT compiler could choose to store such a value entirely in a register and never actually spill it to the stack, the C# compiler can avoid lifting this local to be a field as it needn’t preserve it’s value across any awaits. In general, the C# compiler can elide lifting locals if it can prove that their value needn’t be preserved across awaits. +- <>u__1 and <>u__2. There are two awaits in the async method: one for a Task returned by ReadAsync, and one for a Task returned by WriteAsync. Task.GetAwaiter() returns a TaskAwaiter, and Task.GetAwaiter() returns a TaskAwaiter, both of which are distinct struct types. Since the compiler needs to get these awaiters prior to the await (IsCompleted, UnsafeOnCompleted) and then needs to access them after the await (GetResult), the awaiters need to be stored . And since they’re distinct struct types, the compiler needs to maintain two separate fields to do so (the alternative would be to box them and have a single object field for awaiters, but that would result in extra allocation costs). The compiler will try to reuse fields whenever possible, though. If I have: public async Task M(){ await Task.FromResult(1); await Task.FromResult(true); await Task.FromResult(2); await Task.FromResult(false); await Task.FromResult(3);} + +there are five awaits, but only two different types of awaiters involved: three are TaskAwaiter and two are TaskAwaiter. As such, there only end up being two awaiter fields on the state machine: +private struct d__0 : IAsyncStateMachine{ public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; private TaskAwaiter <>u__1; private TaskAwaiter <>u__2; ...} +Then if I change my example to instead be: +public async Task M(){ await Task.FromResult(1); await Task.FromResult(true); await Task.FromResult(2).ConfigureAwait(false); await Task.FromResult(false).ConfigureAwait(false); await Task.FromResult(3);} +there are still only Tasks and Tasks involved, but I’m actually using four distinct struct awaiter types, because the awaiter returned from the GetAwaiter() call on the thing returned by ConfigureAwait is a different type than that returned by Task.GetAwaiter()… this is again evident from the awaiter fields created by the compiler: +private struct d__0 : IAsyncStateMachine{ public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; private TaskAwaiter <>u__1; private TaskAwaiter <>u__2; private ConfiguredTaskAwaitable.ConfiguredTaskAwaiter <>u__3; private ConfiguredTaskAwaitable.ConfiguredTaskAwaiter <>u__4; ...} +If you find yourself wanting to optimize the size associated with an async state machine, one thing you can look at is whether you can consolidate the kinds of things being awaited and thereby consolidate these awaiter fields. + +There are other kinds of fields you might see defined on a state machine. Notably, you might see some fields containing the word “wrap”. Consider this silly example: +public async Task M() => await Task.FromResult(42) + DateTime.Now.Second; +This produces a state machine with the following fields: +private struct d__0 : IAsyncStateMachine{ public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; private TaskAwaiter <>u__1; ...} +Nothing special so far. Now flip the order of the expressions being added: +public async Task M() => DateTime.Now.Second + await Task.FromResult(42); +With that, you get these fields: +private struct d__0 : IAsyncStateMachine{ public int <>1__state; public AsyncTaskMethodBuilder <>t__builder; private int <>7__wrap1; private TaskAwaiter <>u__1; ...} +We now have one more: <>7__wrap1. Why? Because we computed the value of DateTime.Now.Second, and only after computing it, we had to await something, and the value of the first expression needs to be preserved in order to add it to the result of the second. The compiler thus needs to ensure that the temporary result from that first expression is available to add to the result of the await, which means it needs to spill the result of the expression into a temporary, which it does with this <>7__wrap1 field. If you ever find yourself hyper-optimizing async method implementations to drive down the amount of memory allocated, you can look for such fields and see if small tweaks to the source could avoid the need for spilling and thus avoid the need for such temporaries. + +## Wrap Up + +I hope this post has helped to illuminate exactly what’s going on under the covers when you use async/await, but thankfully you generally don’t need to know or care. There are many moving pieces here, all coming together to create an efficient solution to writing scalable asynchronous code without having to deal with callback soup. And yet at the end of the day, those pieces are actually relatively simple: a universal representation for any asynchronous operation, a language and compiler capable of rewriting normal control flow into a state machine implementation of coroutines, and patterns that bind them all together. Everything else is optimization gravy. +Happy coding! \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/Paper Moving off the Map.md b/OneNote/Ben's Notebook/Reading/Read Later/Paper Moving off the Map.md new file mode 100644 index 0000000..8d58633 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/Paper Moving off the Map.md @@ -0,0 +1,52 @@ +Clipped from: [https://ferd.ca/notes/paper-moving-off-the-map.html](https://ferd.ca/notes/paper-moving-off-the-map.html) +These are notes I have taken elsewhere that I'm re-posting here as my weekly paper reading because it is quite simply one of my favourite papers ever. +[Moving off the Map: How Knowledge of Organizational Operations Empowers and Alienates](https://sci-hub.se/10.1287/orsc.2018.1277) is a work of ethnography where a researcher embedded herself into 5 organizations including 6 projects aiming at re-structuration—business process redesign (BRP)—and which all had a phase of extensive process mapping. She noticed that at the projects' conclusions, most employees returned to their roles and got raises within the organization, but a subset of them who were centrally located within the organization decided to move to peripheral roles. She decided to investigate this. +What she found was that tracing out the structure of how work is done (and what work is done) and decisions are made was a significant activity behind the split. It happened because people doing this tracing activity had a shock when they realized that the business' structure was not coordinated nor planned, but an emergent mess and consequence of local behaviours in various groups. Their new understanding of work resulted in either Empowerment ("I now know how I can change things") or Alienation ("Nothing I thought mattered does, my work is useless here"), which explained their move to peripheral roles. +Some of these reports are also just plain heart breaking. I have so many highlights for it. +The paper starts by mentioning that centrally-located actors (people at the core of the management structure of an organization) are less likely to initiate change, and more likely to stall it. Additionally, desire for change are likely to come from the periphery, and as people move towards the center, that desire tends to go away. This is a surprise to no one. +However, if central actors are to initiate change, it comes from either a) contradictions, tensions, or inconsistencies are experienced and push them to reflections, and b) being exposed to how other organizations (or even societies) do things, which opens more awareness. These two things are called "disembedding", and can lead to central actors pushing for structural change. +The paper accidentally "discovered" a third approach: taking the time to study how things are done in the organization can cause that dissonance, and encourage central actors to move to the periphery of the organization _in order to effect change_ because they lose trust in the structure of the organization itself and their role in it. +This was found out while the author was doing a study of 5 big corporations with 6 major business restructuration projects with hundreds of workers, and she noticed that while some employees went back to their roles (but with promotions), or towards roles that were more central when it was done, a subset of employees instead left very central roles to go work on the periphery, for sometimes less interesting conditions. So she started asking why and ran a big analysis. +What she noticed is that all the employees who eventually left their roles were assigned different specific tasks from the rest of people in these projects: they had been ask to do process mapping, where essentially they had to make a representation of "what we do here", how the business works, how decisions are made, and how information moves around. People not involved didn't find it significant, but people involved were shocked into leaving their roles, to make it short. +The author makes a point that it's not process mapping causing this, but rather that having a deep engagement in representing and understanding the operations of the organization and how their own role would fit in it would cause this to happen—it was probabilistic. +The tracing was done by employees who would do things like walk the floor, ask people how they do work, sit in meetings with question like "What do we do?" with people in various roles, asked them to list tasks on whiteboards, connecting them with strings, and consolidated into huge maps like the following, which connected local experiences into a broader organizational context: + +![Walls covered in colorful sheet of papers with strings between all elements. This is an implementation of process-mapping out the organization and who covers what](Exported%20image%2020240808113929-0.png) + +This had the effect of surface things that were previously invisible and make it discrete. This likely ties into concepts mentioned here before of "work as done" vs. "work as imagined": +The map allowed them to see how the system operated below the surface, integrating all the pieces to generate a comprehensive view. They commented on the uniqueness of this comprehensive view: “We don’t allow people to see the end-to-end view... to see how things interrelate.” One explained that the experience “ruins [one’s] perspective in a good way.” Another described how it gave her a “whole different way of looking at things.” By revealing the web of roles, relations, and routines that coalesce to make the organization, the map made the organization’s actual operation intelligible. +[...] +Competent members of organizations draw on everyday knowledge [...] as they perform their roles, but this knowledge does not speak to the organization’s broader order. Despite how remarkably capable these employees were at “recognizing, knowing, and ‘doing’ the lived order,” the broader order or structure is often “resistance to analytic recovery” from the inside. Even if they would like to observe and reflect on their organization’s detailed operating process, they rarely have opportunities, such as building process maps, that provide time and access. +So what were the immediate consequences? I'm quoting this directly: +They expected to observe inefficiencies and waste, the targets of redesign, and they did. Tasks that could be done with one or two hand-offs were taking three or four. Data painstakingly collected for decision-making processes were not used. Local repairs to work processes in one unit were causing downstream problems in another. Workarounds, duplication of effort, and poor communication and coordination were all evident on the map. +Beyond these issues, they observed a more fundamental problem. A team member explained, “I’m getting a really clear visual of what the mess is.” Standing back from the wall, he sighed, and said, “The problem is that it was not designed in the first place.” Instead of observing a system designed, adapted, and coordinated to achieve stated goals, he pointed to three examples on the map that demonstrated the exercise of agency in various places and at various levels in the organization. These change efforts lacked broader perspective and direction as well as coordination and integration with other efforts +They mention examples such as a "kingdom builder" where the map revealed some manager who kept accumulating departments for the sake of accumulating power but was invisible to the organization, and essentially just found a lot of "what the fuck, this is just random shit that's leftovers from really old decisions." People see local problems, general approaches, and they try to fix things. This clashes with things the organization tries to do (when it tries), and there is no coherent organization to anything: +Some held out hope that one or two people at the top knew of these design and operation issues; however, they were often disabused of this optimism. For example, a manager walked the CEO through the map, presenting him with a view he had never seen before and illustrating for him the lack of design and the disconnect between strategy and operations. **The CEO, after being walked through the map, sat down, put his head on the table, and said, “This is even more fucked up than I imagined.”** The CEO revealed that not only was the operation of his organization out of his control but that his grasp on it was imaginary. +They learned that what they had previously attributed to the direction and control of centralized, bureaucratic forces was actually the aggregation of the work and decisions of people distributed throughout the organization. Everyone was working on the part of the organization that they were familiar with, assuming that another set of people were attending to the larger picture, coordinating the larger system to achieve goals and keeping the organization operating. They found out that this was not the case. +This may not necessarily be surprising to people, but it may be surprising for people to learn that CEOs and others think they have so much more control than they do! +Anyway, the two reactions in general were either Empowerment or Alienation. +On the front of Empowerment, this is caused because: +Members of the organization carry on as though these distinctions are facts, burdening the organization’s categories, practices, and boundaries with a false sense of durability and purpose. +[...] +The idea that organizations are an ongoing human product was a provocative insight for these employees. This new perspective, as one explained, “made things seem possible.” Once they could see the “what” as a dynamic social creation, they could begin asking better questions about “how.” A team member explained that the logic of organization should not be fixed and how its rules, synthetic creations, are free to deviate +[...] +Their peripheral role choices allowed team members to exploit this new understanding of the organization’s operations. They could work with new assumptions about the mutability and possibility of the organization and create structures and systems to coordinate and direct the web of roles and interactions. Their new role choices also allowed them to remain above and outside of the organization’s daily operations. +So in short, getting how a lot of it isn't fixed, how a lot of it is arbitrary but flexible meant that these people felt they understood how to effect change better, and that by moving away from the center and into the periphery, they could start doing effective change work. +Alienation is so god damn heartbreaking though, and the author warns that before starting this process in an organization, you have to be ready that some people may feel a major shock that the work they thought was valuable and important is in fact useless and worth nothing. In fact the author warns that finding work and jobs that were not meaningful or useful at all was a common theme: +As part of the map-building process, employees were invited to identify their role on the map and to indicate how it was connected to other roles through either inputs or outputs. Team members recounted that it was difficult to observe employees “go through a real emotional struggle when they see that what they are doing is not really adding value or that what they are doing is really disconnected from what they thought they were doing.” In one case, a finance manager noticed that his role was on the wall but that it was not connected to any other role on the wall. He had been producing financial reports and sending them to several departments because he understood them to be crucial for their decision-making process; however, no one had identified his work as an input to theirs. +This realization was, in the end, **devastating for him. He was on the verge of tears... at first, he became very argumentative and was trying to convince people that you go from this Post-it note down here to mine. [Other employees explained] Well no, we don’t do that. It was a two-hour conversation. And he finally sat down, and he said, so why am I doing this? It was devastating.** +The eventual outcome of this “aha” was that the manager was moved to another role in the department after working four years in a position that had served almost no purpose. +After such analyses, team members could not look at particular roles and people in the same way. +A lot of people also found out that they thought they were solving real problems, helping people with real issues, finding real work-arounds, but found that in the overall organizational map, it was meaningless and had no impact: they could be fixing real problems in departments that themselves were not useful. +Others found that they had properly fixed issues by introducing new databases with critical information, but that they had been unable to get any buy-in for that, so analysts and people having spent a lot of time on these just had no impact at all: +Their knowledge of the limits of local, small-scale change and the futility of changing parts of the organization without addressing the system as a whole, discouraged employees from returning to their career in the organization. They did not want to contribute to the mess or reproduce the mess they had observed. +[...] +What they had learned could not be unlearned or ignored. +The author state that whether it is due to alienation or empowerment, both behaviours push people to move to the edges of the system, where they can either find new roles or types of changes that they believe are more useful. The structural knowledge gain essentially let them know of better ways to do useful things and enact change. Specifically, learning that the organization's structure is the result of interactions rather than a context in which they take place is a key learning that sociologists knew already: +This perspective or comprehension affects how we speak and act. We speak about organizations as if they are objects that exist independent of us, and we act as though they constrain and guide our actions. When we objectify social systems (organizations, communities, families, gender roles), we apprehend them as “prearranged patterns” that impose themselves on us, coercing particular roles and rules. We free ourselves to talk about and inhabit them as independent of us: as existing prior to us, standing before us, outliving us, and operating without us. Given this, we are relieved of greater responsibility for them. Our responsibility is to skillfully fulfill our role within these objectified realms. +[...] +Whereas, as some sociologists “know that organizations and institutions exist only in actual people’s doings and that these are necessarily particular, local and ephemeral”, employees may be less likely to know this. When they do, it problematizes their past and future participation. +[...] +The realization that social worlds do not have an independent, stable existence but instead emerge from our collective action is “sometimes arrived at in a moment of heady delight, but often as a horrifying realization”. This realization is considered a “fatal insight” because it destroys assumptions that the current order, roles, rules, and routines are given. Within the system of roles, rules, and routines, there is far more room to maneuver than previously assumed. Rejection of objectivity puts possibility, perhaps even responsibility, squarely in the court of subjectivity. +I think this quote above is real good. +I'm going to conclude with it (, although the author adds a bit of a section about mentioning that given this research means that we can suspect some of the most effective change to be driven by actors who once were at the core of the system and moved to its periphery. This likely is a sign that they know how shit works and have an idea of how to challenge it. Insider knowledge dragged to the edges may be a key for strong means to modifying how things work. I'll let you read the paper if you want the details of that. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/Problem exploration, selection and validation. Irrational Exuberance.md b/OneNote/Ben's Notebook/Reading/Read Later/Problem exploration, selection and validation. Irrational Exuberance.md new file mode 100644 index 0000000..903eaea --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/Problem exploration, selection and validation. Irrational Exuberance.md @@ -0,0 +1,58 @@ +Clipped from: [https://lethain.com/intro-product-management/](https://lethain.com/intro-product-management/) + +![Problem Discovery Problem Selection Problem Discovery Solution Execution Validation Problem Selection Solution Execution Validation Problem Discovery Problem Selection Problem Discoverv Solution Execution Validation Problem Selection Solution Ex Validation ](Exported%20image%2020240808113923-0.png) + +Most engineering organizations separate engineering and product leadership into distinct roles. This is usually ideal, not only because these roles benefit on distinct skills, but also because they thrive from different perspectives and priorities. It’s quite hard to do both well at the same time. +I’ve met many product managers who are excellent operators, but few product managers who can operate at a high degree while also getting deep with their users’ needs. Likewise, I’ve worked with many engineering managers who ground their work in their users needs, but few who can affix their attention on those users when things start getting rocky within their team. +Reality isn’t always accommodating of this ideal setup. Maybe your team’s product manager leaves or a [new team is being formed](https://lethain.com/durably-excellent-teams/), and you, as an engineering leader, need to cover both roles for a few months. This can be exciting, and yes, this can be a time when “exciting” rhymes with “terrifying.” +Product management is a deep profession, and mastery requires years of practice, but I’ve developed a simple framework for product management to use when I’ve found [myself fulfilling product management](https://lethain.com/product-management-infra-engineering/) responsibilities for a team. It’s not perfect, but hopefully it’ll be useful for you as well. +Product management is an iterative elimination tournament, with each round consisting of _problem discovery_, _problem selection_ and _solution validation_. _Problem discovery_ is uncovering possible problems to work on, _problem selection_ is filtering those problems down to a viable subset, and _solution validation_ is ensuring your approach to solving those problems work as cheaply as possible. +If you do a good job at all three phases, you win the luxury of doing it all again; this time with more complexity and scope. If you don’t do well, you end up forfeiting or being asked to leave [the game](https://www.amazon.com/dp/B004W3FM4A/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1). + +## Problem discovery + +The first phase of a planning cycle is exploring the different problems you could pick to solve. It’s surprisingly common to skip this phase, but that unsurprisingly leads to inertia-driven local optimization. Taking the time to evaluate which problem to solve is one of the best predictors I’ve found of a team’s long-term performance. +The themes I’ve found useful for populating the problem space are: + +- **Users’ pain**. What are the problems that your users experience? It’s useful to both go broad via survey mechanisms as well as to go deep by interviewing a smaller set of interesting folks across different user segments. +- **Users’ purpose**. What motivates your users to engage with your systems? How can you better enable them to accomplish their goals? +- **Benchmark**. Look at how your company compares to competitors in the same and similar industries. Are there areas that you are quite weak? Those are areas to _consider_ investment. Sometimes folks keep to a narrow lense when benchmarking, but I’ve found that you learn the most interesting things by considering both fairly similar and rather different companies. +- **Cohorts**. What is hiding behind your clean distributions? Exploring your data for the cohorts hidden behind top-level analysis is an effective way to discover new kinds of users with surprising needs. +- **Competitive advantages.** By understanding the areas you’re exceptionally strong in, you can identify opportunities that you’re better positioned to fulfill than other companies. +- **Competitive moats**. Moats are a more extreme version of a competitive advantage. Moats represent a sustaining competitive advantage, which make it possible for you to pursue offerings that others simply cannot. It’s useful to consider moats in three different ways: + + - What your existing moats enable you to do today? + - What are the potential moats you could build for the future? + - What moats are your competitors luxuriating behind? +- **Compounding leverage**. What are the composable blocks that you could start building today that will compound into major product or [technical leverage](https://lethain.com/building-technical-leverage/) over time? I think of this category of work as finding ways to get the benefit (at least) twice. This are potentially tasks that initially don’t seem important enough to prioritize, but whose compounding value makes it possible. + + - A design example might be introducing a application new navigation scheme that better supports the expanded set of actions and modes you have today, and that will support future proliferation as well. (Bonus points if it manages to prevent future arguments about positioning of new actions relative to existing ones!) + - An infrastructure example might be moving a failing piece of technology to a new standard, this addresses a reliability issue, reduces maintenance costs, and also [reduces the costs of future migrations](https://lethain.com/migrations/). + + +## Problem selection + +Once you’ve identified enough possible problems, the next challenge is to narrow down to a specific problem portfolio. Some of the aspects I’ve found useful to consider during this phase are: + +- **Surviving the round**. Thinking back to the iterative elimination tournament, what do you need to do to survive the current round? This might be the revenue the product will need to generate to avoid getting canceled, adoption, etc. +- **Surviving the next round**. Where do you need to be when the next round starts, to avoid getting eliminated then? There are a number of ways, many of them revolving around quality tradeoffs, to reduce long-term throughput in favor of short term velocity. (Conversely, winning leads to significantly more resources later, so that tradeoff is appropriate sometimes!) +- **Winning rounds**. It’s important to survive every round, but it’s also important to eventually win a round! What work would ensure you’re trending towards winning a round? +- **Consider different time frames.** When folks disagree which problems to work on, I find it’s most frequently rooted in different assumptions about the correct time frame to optimize for. What would you do if your company was going to run out of money in six months? What if there were no external factors forcing you to show results until two years out? Five years out? +- **Industry trends**. Where do you think the industry is moving towards, and what work will position you to take advantage of those friends, or at least avoid having to redo the work in near future? +- **Return on investment**. Personally, I think folks often under prioritize quick, easy wins. If you’re in the uncommon position of understanding both the impact and costs of doing small projects, then take time to try ordering problems by expected return on investment. At this phase you’re unlikely to know the exact solution, so figuring out cost is tricky, but for categories of problems you’ve seen before you can probably make a solid guess (if you don’t personally have relevant experience, ask around). Particular in cases where wins are compounding, these are be surprisingly valuable over the medium and long term. +- **Experiments to learn**. What could you learn now that would make problem selection in the future much easier? + +## Solution validation + +Once you’ve narrowed down the problem you want to solve, it’s easy to jump directly into execution, but that can make it easy to fall in love with a difficult approach. Instead, I’ve found it well worth it to derisk your approach with an explicit solution validation phase. +The elements I’ve found effective for solution validation are: + +- **Write a customer letter.** Write the launch announcement that you would send after finishing the solution. Are you able to write something exciting, useful and real? It’s much more useful to test it against your actual users rather than relying on your intuition. +- **Identify prior art**. How do peers across the industry approach this problem? The fact that others have solved a problem in a certain way doesn’t mean it’s a great way, but it does at least mean it’s possible. A mild caveat that it’s better to rely on folks you have some connection to instead of conference talks and such; there is a surprisingly large amount of misinformation out there. +- **Find reference users**. Can you find users who are willing to be the first users for the solution? If you can’t, you should be skeptical whether what you’re building is worthwhile. +- **Prefer experimentation over analysis**. It’s far more reliable to get good at cheap validation than it is to get great at consistently picking the right solution. Even if you’re brilliant, you are almost always missing essential information when you begin designing. Analysis can often uncover missing information, but it depends on knowing where to look, whereas experimentation allows you to find problems you didn’t anticipate. +- **Find the path more quickly traveled**. The most expensive way to validate a solution is to build it in its entirety. The upside of that approach is that you’ve lost no time if you picked a good solution, the downside is that you’ve sacrificed a huge amount of time if it’s not. Try to find the cheapest way to validate. +- **Justify switching costs**. What will the switching costs be for users who move to your solution? Even if folks want to use it, if the switching costs are too high then they simply won’t be able to. Test with your potential users if they’d be willing to pay the full cost of migrating to your solution instead of their existing planned work. + +As an aside, I’ve found that most aspects of [running a successful technology migration](http://lethain.com/migrations) overlap with good solution validation! This is a very general skill that will repay the time you invest into learning it many times over. +Putting these three elements today–exploration, selection and validation–won’t make you an exceptional product manager overnight, but they will provide a solid starting place to develop those skills and perspective for the next time you find yourself donning the product manager hat. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/Product management in infrastructure eng. Irrational Exuberance.md b/OneNote/Ben's Notebook/Reading/Read Later/Product management in infrastructure eng. Irrational Exuberance.md new file mode 100644 index 0000000..4217c9d --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/Product management in infrastructure eng. Irrational Exuberance.md @@ -0,0 +1,71 @@ +Clipped from: [https://lethain.com/product-management-infra-engineering/](https://lethain.com/product-management-infra-engineering/) + +![Discover Prioritize 000 ](Exported%20image%2020240808113927-0.png) + +Recently a bunch of teams I work with have turned the corner, having paid down technical debt to a long-term sustainable level. The future unfurls with possibility. We can do _anything_. That’s exciting! It can also be pretty disorienting. For me, this is the most inspiring moment of management, and one of the hardest. +When we were completely focused on system reliability or churning tasks, most teams pulled their roadmaps down to a month or two, and we got so focused that we disconnected from our internal users. With less time soaked by maintenance, we’ve scurried to understand our users’ needs and define an optimistic, future-facing roadmap to support them. +In short, we’ve bootstrapped product management. +Many of the infrastructure engineer teams I’ve been a part of have struggled to make the transition from maintenance to innovation, and I wanted to write down some of the ideas that we’re exploring to ease this shift. I’d also love to hear what has worked well for other folks! + +## Foundation to Innovation + +I believe teams tend to have two distinct modes of operation: + +- a foundation mode where the vast majority of tasks are mandatory, driven by non-negotiable needs like compliance, security, reliability and “victim of success” challenges like scaling a very popular product. Kanban is optimized for this mode, and I think [The Phoenix Project](https://www.amazon.com/dp/B00AZRBLHO/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1) is a really helpful resource on executing in this mode. +- an innovation mode where you have a lot of flexibility in which problems to prioritize and how to solve them. This is similar to product development as [described in Inspired](https://www.amazon.com/INSPIRED-Create-Tech-Products-Customers/dp/1119387507/ref=dp_ob_image_bk). + +In practice many teams have one foot in both modes, and most teams cycle between the two over time, but for any given team at any given time, they usually have a primary model. +The foundation mode is a game of execution, focus and limiting work-in-progress, whereas the innovation mode is about listening to users, exploring solution spaces and an eternal focus on validating solutions as early and cheaply as possible. +Most infrastructure teams have a lot of experience in foundation, but have much less in innovation, so I won’t belabor managing through scarcity, and will instead dive into how to manage in times of surplus engineering capacity. + +## Problem discovery + +When you have surplus engineering capacity, folks tend to have a long backlog of stuff they’d like to work on, and many teams immediately jump on those, but I think it’s useful to fight that instinct and to step back and do deliberate discovery. +There are two things that are essential to discovering opportunity: cast a very broad net, and don’t evaluate ideas while discovering them. Try to get as many ideas as possible, and don’t spend a single moment worrying if they’re any good, prioritization is a later step. +I recommend taking a four prong approach, learning about your users’ needs, what peer companies are doing, where industry leaders are going, and brainstorming with your team. +Some of the techniques that I’ve seen work well: + +- **SLAs** - sit down with your users to discuss what SLAs they expect from your system, and then turn those into your dashboards. Even if you can’t hit some of those SLAs today, understanding what users want you to be able to offer is powerful. +- **User surveys** - it’s surprisingly hard to write a great survey, and easy to create survey fatigue, but a good survey is an awesome way to get many folks to share input. A good survey is a short, quantifies when possible, and gets proofread by folk with opposing perspectives before it’s sent out! They’re especially good as a first step to identify who to follow up with in detail. +- **Coffee chats** - meet with your users periodically and learn about what they’re doing. Do remember to ask if there is stuff you can improve, but I think it’s most valuable to understand what they’re doing, which is great fodder for thinking about how you can help. A cheaper version of this is a short email with a quick compliment and asking if you could help with anything. +- **Discussion groups** - bringing together a small group of two to four folks and hearing their ideas is a good way to get input. I find these work best when you can bring a specific proposal, or set of proposals, for folks to react against. As a variant, we’ve also experimented with recurring customer advisory groups. +- **Peer-company chats** - in addition to chatting with your users, I’ve found it equally valuable to chat with a wide variety of folks working on similar problems at other companies to understand how they’re thinking about things. I’ve heard some extremely valid concerns around this leads directly to cargo-culting and groupthink, which is why I think it’s so important to decouple discovery from prioritization: listen to what other folks are doing, don’t automatically decide to adopt them. +- **Academic and industry research** - look for papers coming out of the big tech companies (Google, Microsoft, Facebook, etc) and also for academic research on a given area. I did a basic example of this [when I surveyed load generation research](https://lethain.com/braindump-on-load-generation/), and it was helpful to expand my thinking beyond the obvious. +- **Open source** - [along the lines of my exploration of the open source data ecosystem](https://lethain.com/from-lambda-to-kappa-dataflow-paradigms/), I find it useful to spend some time understanding the state of open source for a given area. This gives you an easy sense of trends and how other folks see the space evolving. +- **Cloud vendors** - with [cloud offerings rapidly expanding](https://lethain.com/physics-of-cloud-expansion/), it’s useful to take a look at what new related offerings have popped up on AWS, Azure, GCP and such. + +The goal of each of these is to collect a tremendous amount of information. My mental model of this phase is to load as much state into your head as possible, to give you a broad perspective as you move into prioritization. + +## Prioritization + +Brimming with research and user needs, I try to create three artifacts: + +- A **charter** that identifies the unique value your team tries to provide, your competitive advantages and the strategy that you’ll employ. +- An **optimistic three-year vision** of the best possible system you’d like to be providing. Constrain the vision by what is possible, but don’t constraint it by what is reasonable. My rule of thumb is “where could we be if everything went perfectly for three years?” +- A **prioritized list of user pain** that captures your users’ active needs, and in particular buckets the concerns together into things that you might be able to address, eliminate or empower with a single solution. + +Your aim is to relieve as much user pain as possible while also making forward progress towards your optimistic vision. I think doing this well is the artistry of product management, and I believe each project can usually make significant progress towards both. +Changing priorities late in a project is expensive, so we try to align on priorities as early as possible, and allow users as much input as possible early to weigh in on which parts will be useful to them, and in particular which parts can be used independently. A great list of priorities allows us to deliver incremental value to our users at each phase, not waiting until the last step to deliver a big bang of utility. +Sometimes current needs don’t align well with the future, or the future is a long ways away, and in that case my rule of thumb is to invest 70% of your effort on solving immediate user needs, and 30% on advancing towards the future. I advocate 70% towards immediate user needs, because I think folks tend to over index on the future, and this helps avoid falling into that trap. [In areas where cloud vendors are rapidly expanding](https://lethain.com/physics-of-cloud-expansion/), sometimes it may be reasonable to devote 100% of your efforts to immediate user pain, on the assumption that cloud offerings will be available in the next 2-3 years to absorb the operational load and technical debt of the existing solution. Some areas are not likely to get cloud investment in the near term, but increasingly we should be looking at areas we can strategically underinvest today on the assumption that the clouds will provide an easy solution soon. + +## Solution validation + +Once you’ve decided what to focus on solving, a many teams immediately go “full waterfall”, designing a twelve month roadmap. Long-term planning is hard to resist, because pretty much every user and every planning process demands it of you, so you’ll probably end up writing an artifact of this nature, but I beg you not to pretend it means something. +This isn’t because estimating is hard–although estimating is hard–but because it assumes that our solutions are actually good solutions. It’s my opinion that most solutions are, in fact, pretty bad. The secret is not to “get brilliant” and pick better solutions, but rather to get skeptical and to design your approach to validate the value and practicality of solutions as cheaply as possible. +I often assume that internal users have a great sense of existing capabilities, but that sometimes isn’t the case. Part of “getting skeptical” is evangelizing your existing solutions and seeing if there is already a reasonable way to solve the problem under discussion that maybe you haven’t documented well or requires some architectural familiarity between both the users and the providers to realize a solution is already available. +It’s a common pattern to do the hardest migration first, and I’m a big fan of that approach, but even then you’ve spent the majority of the time required to build a system by the time you’re validating it. Do experiments, gather data to prove the approach won’t work, validate the approach has worked for others. Try as hard as possible to prove your solution cannot work. +Once you’ve validated a solution, you also want to keep in mind similar needs from other users. The pattern might look like doing one hard integration first, and then doing a staccato burst of easy integrations to smooth the edges and check for broad applicability. +We’ve been experimenting with the pattern of embedding the team building a solution into the team they’re building the solution for, and that feels like a good strategy for quick iteration and avoiding falling in love with awesome things that are not necessarily useful things. + +## Closing + +There are many infrastructure engineering teams which don’t make the transition from maintenance to innovation, and some which intentionally decide against doing so. It’s an uncomfortable transition, but I’ve found it remarkably rewarding: more direct contribution to your coworkers’ success, more excitement from other leaders within the company, and shrugging off the mantle of cost center to become an acknowledged source of innovation. +While I’m really excited at how this approach has helped us focus on directly supporting our users, it’s still an early approach. Three questions in particular continue to bounce around in my head: + +1. User discovery takes up a bunch of time from other teams. How can we be more effective with their time? +2. How do we avoid falling in love with solutions, particularly for those that are difficult to validate early? +3. How do other folks do this!? + +If you’re doing something different, or even if you’re doing something similar, I’d love to hear from you! +Thanks to [Amy](https://twitter.com/amyngyn), [Peter](https://twitter.com/peterseibel) and [Ranbir](https://twitter.com/TheRanbirChawla) for shaping this post. +Published on February 6, 2018. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/Real World Recommendation System – Part 1.md b/OneNote/Ben's Notebook/Reading/Read Later/Real World Recommendation System – Part 1.md new file mode 100644 index 0000000..7f3aa70 --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/Real World Recommendation System – Part 1.md @@ -0,0 +1,91 @@ +Clipped from: [https://fennel.ai/blog/real-world-recommendation-system/](https://fennel.ai/blog/real-world-recommendation-system/) +Training a collaborative filtering based recommendation system on a toy dataset is a sophomore-year project in colleges these days. But where the rubber meets the road is building such a system at scale, deploying in production, and serving live requests within a few hundred milliseconds while the user is waiting for the page to load. To build a system like this, engineers have to make decisions spanning multiple moving layers like: + +- High-level paradigms (like collaborative filtering, content based recommendations, vector search, model based recommendations) +- ML algorithms (e.g., GBDTs, SVD, Multi tower neural networks, etc.) +- Modeling libraries (e.g., PyTorch, Tensorflow, XGBoost) +- Data management (e.g., choice of DB, caching strategy, reuse primary database or copy all the data in another system optimized for recommendation workload, etc.) [[1]](https://fennel.ai/blog/real-world-recommendation-system/#fn1) +- Feature management (e.g., offline vs online, precompute vs serve live) +- Serving systems (performance, query latency, distribution model, fault tolerance, etc.) +- Deployment system (e.g., how does new code get updated, build steps, keeping caches working after processes restart, etc.) +- Hardware (e.g., GPUs, SSDs) + +No wonder architecting a system like this is a daunting task. Thankfully though, after years of trial and error, FAANG and other top tech companies have independently converged on a common architecture for building/deploying production-grade recommendation systems. Further, this architecture is domain/vertical agnostic and can power all sorts of applications under the sun — from e-commerce and feeds to search, notifications, email marketing, etc. +The goal of this publication is to start from the basics, explain nuances of all the moving layers, and describe this universal recommendation system architecture. +We will start with a post to explain the serving side of this architecture at a high level, quickly followed by a post about the training side — these two posts will mostly outline the structure and identify the key scaling problems in serving and training, respectively. (Edit, we ended up writing two follow-ups to this post — part 2 about [training data generation here](https://fennel.ai/blog/real-world-recommendation-systems/) and [part 3 about modeling here](https://fennel.ai/blog/real-world-recommendation-systems-21e/)). Future posts will go through these scaling issues one by one and describe how they are typically solved, along with the best practices developed over years of learning. So let’s get started: +Modern recommendation systems are composed of eight (somewhat overlapping) logical stages: + +1. Retrieval +2. Filtering +3. Feature Extraction +4. Scoring +5. Ranking +6. Feature Logging +7. Training Data Generation +8. Model Training + +The first five of these are related to serving, and the last three are related to training. + +![https://www.fennel.ai/blog/content/images/2022/10/1cacae00-cc59-46b1-bac2-71eeb72828ac_960x720-1.jpeg](Exported%20image%2020240808113928-0.jpeg) + +Let’s go through all the serving layers one by one: + +## **1. Retrieval** + +Products like Facebook have millions of things to show in any recommendation unit - so many that it’s physically impossible to score all of them using any ML model while the user is waiting for their feed to load. So instead of scoring each item in the inventory, a more manageable subset of the inventory is first obtained via a process called Retrieval or “Candidate Generation” (since it generates candidates for ranking). +Retrieval is not just a FAANG scale problem — since the user is waiting for the “page” to load, most recommendation requests have a budget of only 500ms or so, and it is only possible to score a few hundred items in a request. As a result, whenever the inventory is a couple thousand items or more (which covers a large % of all real-world systems), a retrieval phase is needed. +How does Retrieval work? Retrieval is done by writing a few heuristics, also called as “candidate generators” or simply “generators”, each of which selects, say a dozen or so distinct candidates. Some common examples of generators are: + +- Content that is trending in a user’s geography in the last x hours +- Recent content from authors/topics that the user explicitly “follows” +- Find 5 contents that user “liked” in the past, and for each such content, find 5 more “related” items +- Find the most relevant topics for a user and find the freshest content from each of the topics. + +Retrieval can be powered by ML (e.g., trained embeddings), but more often than not, a larger % of generators are mere heuristics that encode some “product thinking” about what content is likely to create a good recommendation experience. And by writing a few of these and taking a union of all their candidates, we ensure that the system is able to at least consider all sorts of interesting inventory. Retrieval has only two jobs — 1) get all the interesting things (or at least as many as possible) [[2]](https://fennel.ai/blog/real-world-recommendation-system/#fn2) and 2) get as few total things as possible so that we can score/examine each candidate using the power of ML. + +## 2. Filtering + +After retrieving a few hundred candidates, recommendation systems typically filter out “invalid inventory”. For instance, if you’re building a social network, you might want to filter out things that are likely to be spammy. Or if you are building a video OTT platform, you may have to do some geo-licensing-based filtering. Or if you’re building an e-commerce product, you may have to filter things that are out of stock. Filters can also be extremely personalized, some examples: + +1. Some products try to filter out content that the user has already seen before +2. Some products expose some controls to the users to hide away topics or authors or other sources of content + +In short, most real-world recommendation systems develop a long list of filters over time, which once again encode some product thinking about what creates a good experience. [[3]](https://fennel.ai/blog/real-world-recommendation-system/#fn3) +Filtering and retrieval have a very interesting relationship. Some filters are pushed down to the generators themselves — for instance, if you’re building a dating product, filters for location and sexual preferences may be a part of each generator itself. But more often than not, it is physically impossible to have each generator respect each filter at the source, and so a whole layer of filtering is needed. + +## 3. Feature Extraction + +After filtering, we have a slightly smaller list of candidates — but it’s still going to be a couple hundred candidates long. We somehow need to choose the top ten items to show to the user. As you can imagine, this is going to involve some sort of scoring — for instance, in a job portal, we may want to compute how close is the job’s salary range to the user’s desired salary range. +But before any scoring can even begin, we need to obtain a bunch of data about each item that is going to be scored. In the job portal example, we will need the salary range of each candidate's job. Such signals about candidates are called “features”. Features are not just about the candidates but also include data about the user (e.g., user’s desired salary range). In fact, some of the most important features in literally every single recommendation system are those that capture users’ interaction behavior with potential candidates - this is so important and so nuanced that we will dedicate a whole post on this topic in this blog soon. Either way, we have a few hundred candidates, and we extract a bunch of features (which are basically just pieces of data) about the candidates and the user. Usually, we get anywhere between a few dozen to hundreds of features per candidate. +It is worth pausing here and letting the scale sink in for a minute - we have a few hundred candidates, say 1000, and we get a few dozen features about each candidate, say 100 — we need to fetch 1000x100 or 100K pieces of data from some database in only 500ms (the latency budget of a recommendation request). And note that you don’t even have to be at FAANG scale to run into this problem - even if you have a small inventory (say a few thousand items) and a few dozen features, you’d still run into this problem. And fetching and computing so much data is an incredibly hard infra problem to solve and as a result, creates huge limitations on how “expressive” the features can actually be. + +## 4. Scoring + +So far, we have narrowed down the full inventory to a few hundred candidates and extracted a few dozen features about each. Now comes the bit where we use all the extracted features to assign a score to each candidate. In the simplest systems, the scoring phase is pretty rudimentary, often just a handcrafted formula that mixes a bunch of features of interest (e.g “let’s divide the number of likes by the number of impressions and give a boost by doubling the score if the user follows the content author”). But very soon, these handcrafted formulae and rules start hitting “corner cases” and creating bad experiences. That is where ML kicks in - a machine learning model is trained that takes in all these dozens of features and spits out a score (details on how such a model is trained to be covered in the next post). +There are two key ideas that are very successful and present in the scoring of most real-world recommendation systems (and we’d write dedicated posts about both in the future — stay tuned): + +1. Multi-stage scoring — not all ML models are equal, and some are lot “heavier” than others. And it is usually not possible to run the heaviest ML models on hundreds of candidates. So instead, scoring itself is broken down in two substages — 1st stage scoring (which uses a relatively lighter ML model like GBDTs on all 500 candidates and emits out, say, top 100 candidates) and the 2nd stage scoring, which runs the heavy model (say deep neural network) on just the top 100 candidates. +2. Combining many models — ML models can only learn whatever we teach them to learn. And typically, they are taught to predict the probability of user engaging in a single action, say like. Sorting all content by what gets clicked is a good start but has lots of issues — for instance, it might only distribute clickbaity content. To make the recommendations more balanced, usually, multiple models are trained - say, one for predicting clicks, one for predicting comments, one for user reporting the content, etc. And the final score of a candidate is a weighted average of all these models. While this makes the recommendations better, this can also increase the amount of computation that needs to be done. [[4]](https://fennel.ai/blog/real-world-recommendation-system/#fn4) + +## 5. Ranking + +Once scores have been computed for every candidate, the system moves on to the very last step — ranking. In the simplest systems, this stage is as simple as sorting all the candidates on their scores and just taking the top K. But in more complicated systems, the scores themselves are perturbed using non-ML business rules. For instance, it is a common requirement across many products to diversify the results a bit — for instance, not show content from the same publisher/author one after another. There are many algorithms for such diversification, but most of them operate in a similar fashion by adjusting the scores to respect the diversity (e.g., demote scores if successive items are not diverse enough). +In addition to score perturbation, it is a common practice to run all the items against all the filters once again at this stage to avoid any embarrassing failures. For instance, maybe some of the candidate generators are a bit stale and don’t know that an item has gone out of stock — it’s better to filter it out here instead of sending an item to the user that they can’t even purchase. +Finally, once top K items are chosen, they are handed to some sort of “delivery” system which is responsible for things like pagination, caching, etc. + +## Conclusion + +That’s it! These are the five serving stages of real-world recommendation systems. As you can see, even if a recommendation system is trained, deploying that in production is incredibly hard. In the next post, we will look at the training side of the recommendation system. And in the subsequent posts, we will go through all the infra/scaling issues outlined here and share how they are typically solved — stay tuned! + +1. Managing data is surprisingly hard for real-world recommendation systems because of extreme needs on all three of write throughput, read throughput, and read latencies. As a result, primary databases (e.g., MySQL, MongoDB, etc.) almost never work out of the box (unless you put in a lot of work to scale them in a clever way) [↩︎](https://fennel.ai/blog/real-world-recommendation-system/#fnref1) +2. Often bloom filters are used to filter out content already “seen” by the users [↩︎](https://fennel.ai/blog/real-world-recommendation-system/#fnref2) +3. This is actually fairly true across all the stages — 80% of decisions & iterations in building a recommendation system are all about product-specific needs & business rules, not machine learning. [↩︎](https://fennel.ai/blog/real-world-recommendation-system/#fnref3) +4. This technique is called “value modeling” - value model is an expression (typically weighted linear sum) of ML models with each term describing a specific kind of value to the user. [↩︎](https://fennel.ai/blog/real-world-recommendation-system/#fnref4) + +### We publish high-quality technical content on all things machine learning. + +_Subscribe to our blog to get updates delivered right to your inbox._ + +Please wait... +Please check your inbox and click the link +Please enter a valid email address! \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/StackExchange.RedisThreadTheft.md at main · StackExchangeStackExchange.Redis · GitHub.md b/OneNote/Ben's Notebook/Reading/Read Later/StackExchange.RedisThreadTheft.md at main · StackExchangeStackExchange.Redis · GitHub.md new file mode 100644 index 0000000..329e96a --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/StackExchange.RedisThreadTheft.md at main · StackExchangeStackExchange.Redis · GitHub.md @@ -0,0 +1,14 @@ +Clipped from: [https://github.com/StackExchange/StackExchange.Redis/blob/main/docs/ThreadTheft.md](https://github.com/StackExchange/StackExchange.Redis/blob/main/docs/ThreadTheft.md) +If you're here because you followed a link in an exception and you just want your code to work, the short version is: try adding the following _early on_ in your application startup: +ConnectionMultiplexer.SetFeatureFlag("preventthreadtheft", true); +and see if that fixes things. If you want more context as to what this is about - keep reading! +Behind the scenes, for each connection to redis, StackExchange.Redis keeps a queue of the commands that we've sent to redis that are awaiting a reply. As each reply comes in we look at the next pending command (order is preserved, which keeps things simple), and we trigger the "here's your result" API for that reply. For async/await code, this then leads to your "continuation" becoming reactivated, which is how your code comes back to life when an await-ed task gets completed. That's the simple version, but reality is a bit more nuanced. +By _default_, when you trigger TrySetResult (etc) on a Task, the continuations are invoked _synchronously_, i.e. the thread that is setting the result now goes on immediately to run whatever it is that your continuation wanted. In our case, that would be very bad as that would mean that the dedicated reader loop (that is meant to be processing results from redis) is now running your application logic instead; this is **thread theft**, and would exhibit as lots of timeouts with rs: CompletePendingMessage in the information (rs is the **r**eader **s**tate; you shouldn't often observe it in the CompletePendingMessage* step, because it is meant to be very fast; if you are seeing it often it probably means that the reader is being hijacked when trying to set results). +To _avoid_ this, we use the TaskCreationOptions.RunContinuationsAsynchronously flag. What _this_ does depends a little on whether you have a SynchronizationContext. If you _don't_ (common for console applications, services, etc), then the TPL uses the standard thread-pool mechanisms to schedule the continuation. If you _do_ have a SynchronizationContext (common in UI applications and web-servers), then its Post method is used instead; the Post method is _meant_ to be an asynchronous dispatch API. But... not all implementations are equal. Some SynchronizationContext implementations treat Post as a synchronous invoke. This is true in particular of LegacyAspNetSynchronizationContext, which is what you get if you configure ASP.NET with: + +or if you do _not_ have a of at least 4.5 (which causes the above to default true) like this: + +([citation](https://devblogs.microsoft.com/aspnet/all-about-httpruntime-targetframework)) +In these scenarios, we would once again end up with the reader being stolen and used for processing your application logic. This can doom any further awaits to timeouts, either temporarily (until the application logic chooses to release the thread), or permanently (essentially deadlocking yourself). +To avoid this, the library includes an additional layer of mistrust; specifically, if the preventthreadtheft feature flag is enabled, we will _pre-emptively_ queue the completions on the thread-pool. This is a little less efficient in the _default_ case, but _if and only if_ you have a misbehaving SynchronizationContext, this is both appropriate and necessary, and does not represent additional overhead. +The library will attempt to detect LegacyAspNetSynchronizationContext in particular, but this is not always reliable. The flag is also available for manual use with other similar scenarios. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/What is Scrumban Definition, Overview, and Examples.md b/OneNote/Ben's Notebook/Reading/Read Later/What is Scrumban Definition, Overview, and Examples.md new file mode 100644 index 0000000..cda2d1d --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/What is Scrumban Definition, Overview, and Examples.md @@ -0,0 +1,66 @@ +Clipped from: [https://www.productplan.com/glossary/scrumban/](https://www.productplan.com/glossary/scrumban/) + +## What Is Scrumban? + +Scrumban is a project management framework that combines important features of two popular agile methodologies: Scrum and Kanban. The Scrumban framework merges the structure and predictable routines of Scrum with Kanban’s flexibility to make teams more agile, efficient, and productive. +For companies that implement Scrumban, the approach can help their teams focus on the correct strategic tasks while at the same time improving their processes. + +## How Does Scrumban Combine Scrum and Kanban? + +To understand how Scrumban merges Scrum and Kanban, we first need to understand each of these frameworks. + +## The Basics of Scrum + +![The Basics of Scrum](Exported%20image%2020240808113924-0.png) + +A scrum is an [agile](https://www.productplan.com/agile-product-management/) approach used in software development. With Scrum, a team organizes itself into specific roles, including a Scrum master, product owner, and the rest of the Scrum team. The team breaks its workload into short timeframes called [sprints](https://www.productplan.com/glossary/sprint/). Each sprint lasts two weeks or one month. +During a sprint, the developers work only on the tasks the team agreed to during the [sprint meeting](https://www.productplan.com/glossary/sprint-planning/). Before the next sprint, the team holds another sprint meeting and decides which items to work on next. Scrum teams also meet each morning for short [standups](https://www.productplan.com/glossary/standup/) to discuss the day’s tasks. + +## The Basics of Kanban + +Kanban is a visual approach to managing a team’s workload. With this methodology, a team creates a Kanban board to visually display its workflow in columns—such as “Ready to Start,” “In Progress,” “Under Review,” and Completed.” +As developers begin working on an item, they move a card (or sticky note) with the item’s name from the Ready-to-Start column to In-Progress. If an item needs to move backward, from Under Review back to In-Progress—the team can move that card back to the In-Progress column. The Kanban board makes it easy for everyone to view and update the status of each project quickly. + +## The Basics of Scrumban + +Scrumban merges the structure and predictability of Scrum with Kanban’s flexibility and continuous workflow. When implemented correctly, Scrumban can help a team benefit from both the prescriptive nature of Scrum and the freedom of Kanban to improve their processes. + +## How Does Scrumban Work? (A Step-by-Step Guide) + +![How Does Scrumban Work | ProductPlan](Exported%20image%2020240808113924-1.png) + +Scrumban involves applying Kanban principles—visualization of workflow, and flexible processes—to a team’s Scrum framework. But, Scrumban removed some of the more rigid aspects of Scrum and left each team to create a custom approach to development. +Here is a step-by-step guide to developing a Scrumban framework for your team. + +### Step 1: Develop a Scrumban board + +A Scrumban board is similar to a Kanban board. Because you will be using it as your primary workflow tool, add as many columns to your Scrumban board as your team needs to mark each discrete phase of progress. But be careful not to create so many columns that the board becomes cluttered and difficult to view. + +### Step 2: Set your work-in-progress limits + +Remember, Scrum sets both time and task limits for every sprint. Kanban, by contrast, focuses on continuous workflow. You will need to establish a limit on how much work your team can take on at any one point. For Scrumban, that limit will be the number of total cards on the board at any time. Set a realistic limit to keep your team from becoming overwhelmed and frustrated. + +### Step 3: Order the team’s priorities on the board + +This step illustrates another major difference between Scrum and Kanban (and Scrumban). With Scrum, you’ll assign tasks to specific individuals within your dev group for each sprint. Under Scrumban, on the other hand, your focus will be establishing the priority order of all projects on the board. Your team will decide which person will tackle which tasks. + +### Step 4: Throw out your planning-poker cards + +Because each sprint has a strict time limit, and the team can work on only a pre-defined set of projects during any one sprint, a Scrum team needs to estimate how long each development task will take. So they’ve devised methods such as [planning poker](https://www.productplan.com/glossary/planning-poker/) to estimate the number of [story points](https://www.productplan.com/glossary/story-point/) (indicating time and difficulty) for each task. With Scrumban, work is continuous and not time-limited, so your team won’t estimate story points. You’ll focus only on [prioritizing](https://www.productplan.com/product-management-frameworks/) the most important projects. + +### Step 5: Set your daily meetings + +Although you won’t have most of the meetings typical of the Scrum framework—sprint planning, sprint review, retrospective—Scrumban meetings can include short standups for the team to discuss their plans and challenges for the upcoming day. These short meetings are also a good way to encourage team bonding and cohesion because your developers will spend a lot of time working individually on their tasks and might not have much time for interaction otherwise. + +### [Get Strategic Project Alignment ➜](https://go.productplan.com/cs/c/?cta_guid=5e81c0e5-ef7c-4934-9a09-1ffdb75ef256&signature=AAH58kEKHQbQJW6629FIXlrtbkdl61qPTg&placement_guid=bfb5032e-5746-4c05-9f2a-54b36ba0e871&click=50d2ee6d-3f9f-4e1f-9706-42febdab50e8&hsutk=&canon=https%3A%2F%2Fwww.productplan.com%2Fglossary%2Fscrumban%2F&portal_id=3434168&redirect_url=APefjpH62_akcPKt5r-wAyIGTPz-MzD-4jlmpUTA08t06kdMM_hG7YDHiJQk--6f3mPj8oHX8vTPELynngVJ9O9d_7KIARUO-JocvlEzt2M9qjELNmVc2lpJJElNxTAKuqZh8mlczCZJFlgGsHThwFBq0XDen52xBw) + +## When Should a Team Use Scrumban? + +A team can benefit from the Scrumban approach under several circumstances. For example: +**1.** **For maintenance of ongoing projects.** +These could include projects in which, unlike a new product launch, there is no definitive completion date for the work. +**2. For a team having trouble with Scrum.** +It can happen for several reasons. For example, the company doesn’t have enough resources to support a Scrum environment, or the team finds Scrum’s requirements too rigid. +**3. When a company wants to give its team more flexibility in how it works.** +With Scrum, the team often assigns specific tasks to individuals for each sprint. But Scrumban only sets a broad list of projects and lets the team itself determine how best to leverage its resources. It enhances teamwork and enables individuals in the company to find the projects best suited to their skills and interests. +**Related Terms:** [Scrum agile framework](https://www.productplan.com/glossary/scrum-agile-framework/) / [Kanban board](https://www.productplan.com/glossary/kanban-board/) / [Kanban roadmap](https://www.productplan.com/glossary/kanban-roadmap/) / [Scrum master](https://www.productplan.com/glossary/scrum-master/) / [LeSS (Large Scale Scrum)](https://www.productplan.com/glossary/less-large-scale-scrum/) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md b/OneNote/Ben's Notebook/Reading/Read Later/httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md new file mode 100644 index 0000000..cf94ace --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md @@ -0,0 +1 @@ +![[Attachment.pdf]] \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Reading/Read Later/httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md b/OneNote/Ben's Notebook/Reading/Read Later/httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md new file mode 100644 index 0000000..cf94ace --- /dev/null +++ b/OneNote/Ben's Notebook/Reading/Read Later/httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md @@ -0,0 +1 @@ +![[Attachment.pdf]] \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Recipes/Are You Game Smoked Goose Breasts Ducks Unlimited.md b/OneNote/Ben's Notebook/Recipes/Are You Game Smoked Goose Breasts Ducks Unlimited.md new file mode 100644 index 0000000..68e554f --- /dev/null +++ b/OneNote/Ben's Notebook/Recipes/Are You Game Smoked Goose Breasts Ducks Unlimited.md @@ -0,0 +1,44 @@ +Clipped from: [https://www.ducks.org/hunting/waterfowl-recipes-wild-game-cooking/are-you-game-smoked-goose-breasts](https://www.ducks.org/hunting/waterfowl-recipes-wild-game-cooking/are-you-game-smoked-goose-breasts) +Dare to be game with our mouthwatering recipe for smoked goose breasts. Elevate your culinary experience and savor the rich flavors of wild game. + +Enjoy this recipe from DU's 45th president, Doug Schoenrock, and his wife Linda as they dive into their freezer and share some of their favorite wild game recipes. + +## **Smoked Goose or Duck Breasts** + +![areyougame-smokedgoosebreasts](Exported%20image%2020240808113834-0.jpeg) + +## Brine Ingredients + +- One quart apple cider (Juice is OK too) +- 1/4 cup of kosher salt or 3 tbs. of canning salt +- 2 bay leaves - crushed +- 1 clove of garlic - crushed +- 1/2 teaspoon Peppercorns - cracked or 1 tbsp ground black pepper + +## Goose or Duck + +1 to 1.5 lb of duck or goose breasts - skinless + +## Container + +Glass is best, plastic (Tupperware) is OK too + +## Process + +- Mix all ingredients - making sure the salt dissolves. +- Soak duck or goose for at least 2 hours, but 12 hours is best. +- After brining, rinse duck or goose and pat dry with paper towels. +- Place in 210 - 215 degree smoker - I prefer pecan or alder wood, but hickory or oak work fine as well (they're just a little stronger). +- Smoke for 4.5 - 5 hours. Allow to cool a bit, and put into the refrigerator. + +## Eat + +- Eat it cold. +- Slice thin for Charcuterie with a game sauce like Bronco Bob's Raspberry Chipotle Sauce! +- Slice thin for sandwiches with cheese, mustard and mayo. +- Lasts a week or so. + +[View and download this recipe](https://duckscdn.blob.core.windows.net/imagescontainer/landing-pages/recipes/smoked-goose-breasts.pdf) in PDF format. +Pair these recipes with various wines from the [Grieve Family Winery](https://store.doubleeaglewine.com/wine-wine-for-the-ducks-c4.aspx) or [Tuck Beckstoffer Estate](https://www.tuckbeckstoffer.com/thoughtful-tradition/tuck-beckstoffer-estate-ducks-unlimited)! DU supporter and WAT trustee David Grieve along with fellow DU supporter Tuck Beckstoffer have joined forces, donating a percentage of their wine sales back to DU. + +![winer-grievefamily](Exported%20image%2020240808113834-1.jpeg) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Recipes/Marinated Smoked Goose Breast Recipe.md b/OneNote/Ben's Notebook/Recipes/Marinated Smoked Goose Breast Recipe.md new file mode 100644 index 0000000..2b44b6f --- /dev/null +++ b/OneNote/Ben's Notebook/Recipes/Marinated Smoked Goose Breast Recipe.md @@ -0,0 +1,38 @@ +Clipped from: [https://www.barbecue-smoker-recipes.com/smoked-goose-breast.html](https://www.barbecue-smoker-recipes.com/smoked-goose-breast.html) +This marinated smoked goose breast recipe, rich in soy sauce and sweet molasses is an absolute delight and with supremely lean meat, goose is a healthy option too. +Before the successful intense lobbying by the National Turkey Growers Association to make Turkey our Christmas meal, the traditional bird was goose but hey, why wait for Xmas? + + +![How succulent is this smoked goose breast?](Exported%20image%2020240808113833-0.jpeg) + +You can no doubt see from the picture above that goose meat is nothing like that of either chicken or turkey. It is a much darker meat and more akin to beef in texture and like beef can be served medium rare. +The main season for fresh goose is September to December although a limited amount may be available at other times of the year such as Easter. +“Don’t like goose – it’s dry and tough” I hear folks complain. Well you’ve never had it cooked this way then. +The marinade below succeeds in adding bucket loads of flavour together with a little chili kick and at the same time serves to keep the results beautifully succulent. In addition and as an extra insurance policy, smoke it on a pre-soaked cooking plank over a water bath. +**Preparation Time:-** 5 mins +**Marinade Time:-** overnight +**Cooking Time:-** 90 mins **Total Time:-** 1 day + +_Allergens:_ + +Soy sauce is brewed from soya beans and also contains gluten. + +### Ingredients:- + +- 2 goose breasts + +- 1 cup soy sauce +- 2 tablespoons molasses +- 2 tablespoons brown sugar +- 2 teaspoons dried chili flakes + +### Method:- + +Mix the soy sauce and molasses in your marinade bowl and stir in the brown sugar. Spoon in the chili flakes and ensure that everything is fully mixed and the sugar dissolved. If you warm the marinade to help dissolve the sugar then make sure that you have refrigerated and cooled the marinade before adding the goose breast. Marinate the goose breasts overnight making sure that the meat is fully immersed in the marinade. Refrigerate throughout the marinading process. +When you are ready to cook, remove the goose breasts from the marinade, rinse them and allow them to hang dry for about 30 minutes. +Set your smoker up for [indirect cooking](https://www.barbecue-smoker-recipes.com/beginners-guide-to-barbecue.html#indirect) at 110°C or 225°F and insert a water bath using hot water from a kettle underneath the cooking grid. Place the goose breasts on a pre-soaked cooking plank and smoke them for approximately 90 minutes. +You can serve goose breast safely at 60°C (140°F), it'll still be pink inside and it will be lovely and juicy. When cooked allow the smoked goose breast to rest for 15 minutes and then slice generously on the diagonal and plate up. + +### See Also:- + + [![Solo Build It!](Exported%20image%2020240808113833-1.jpeg)](https://www.sitesell.com/win-in-business.html)[![COPYRIGHTDEPOT.COM COPYRIGHT ](Exported%20image%2020240808113833-2.png)](https://www.copyrightdepot.com/showCopyright.php?lang=EN&id=2772) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Recipes/Pancakes.md b/OneNote/Ben's Notebook/Recipes/Pancakes.md new file mode 100644 index 0000000..3e75d16 --- /dev/null +++ b/OneNote/Ben's Notebook/Recipes/Pancakes.md @@ -0,0 +1,16 @@ +Mix + - 4 cups all purpose flour +- 1/2 cup granulated sugar +- 8 tsp baking powder +- 1/2 tsp baking soda +- 1 tsp iodized salt + +Pancakes + - 2 cups [pancake mix](https://thesupermomlife.com/homemade-pancake-mix/) +- 2 large eggs +- 1 3/4 cups milk +- 2 tsp vanilla extract +- 2 tbsp melted butter - Preheat your griddle or pan over medium-high heat. You should use oil, butter or spray to grease it lightly if it’s not a non-stick pan. +- Combine all ingredients in a bowl and whisk until smooth. +- Using a ladle or measuring cup, pour approximately 1/3 cup batter onto your griddle or pan. When bubbles start to pop on the top, flip and let sit for 4-5 minutes (or until golden brown). If you find they are starting to burn, turn the heat down a bit. +- Serve warm and top with syrup, powdered sugar, fresh fruit or whipped cream. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Leaving a church/How To Leave a Church BiblicalEldership.com.md b/OneNote/Ben's Notebook/Topical studies/Leaving a church/How To Leave a Church BiblicalEldership.com.md new file mode 100644 index 0000000..302bc2e --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Leaving a church/How To Leave a Church BiblicalEldership.com.md @@ -0,0 +1,43 @@ +| +| +==Tags: #leaving a church== + +# How To Leave a Church + +[Home](http://biblicaleldership.com/) +**Author/Speaker:**  +Chuck Gianotti +. +From time to time, Christians leave one church to go to another, or at least think about it—and often without any guidance or godly counsel. Odd as it may seem, elders can prepare people in their own fellowships for this kind of thing. In fact, the thought about leaving, if consider rightly, can be a good thing and become a catalyst for growth in either the believer’s life or in the assembly’s life—or both. Read what one church has published in pamphlet form. +One of the most excruciating decisions you will make as a Christian is to leave your home church. By this, I mean leaving a church you have been part of for a number of years. There are many different reasons for leaving: job relocation, God is calling you out to a different church or ministry, disagreement with leadership, differing vision, unresolved conflict, change of doctrine, lack of pastoral ministry, personal needs not being met, few people at the same stage of life, etc. Some of these are valid concerns, while others may be symptomatic of underlying issues. Whatever the reason, considering a change in your church family is not an easy task or one to be undertaken lightly. +How can you know for sure that leaving is the right thing to do? If it is, how can you leave in an amicable, God-honoring way? Here are some thoughts that may help you think through your options. + +### Eight Things To Consider + +1. If you have been committed to your current church for some time, they are your spiritual family. The church is not an organization like a social club or a corporation. So your actions will have a significant impact on you and the church. +2. Can you clearly state your reasons for thinking about leaving? Have you asked yourself, “Are these reasons enough to break fellowship with my church family, the people I have shared so much with over the years?” +3. Have you sought the advice of godly counselors, people mature in their faith walk? Their gentle input will be invaluable in helping you think through your concerns and the pros and cons of leaving. Those from whom you seek counsel need not be part of the church you attend, but they should be godly, mature individuals. +4. Are you leaving because of unresolved conflict with someone? **Matthew 18:15** **(NASB) says that a Christian is to “go and show him his fault in private; if he listens to you, you have won your brother.” If conflicts are left unresolved, you run the danger of repeating the problem in any new church that you join. Conflicts, though, can be a great tool for helping us mature in the Lord, provided we don’t run away from them. They help us develop grace and mercy. So before picking up root, wouldn’t it be better to seek resolution rather than avoidance? If you need help in doing this, seek wise, godly counsel.** +5. If your reason for leaving has to do with what you see as inadequate ministry or wrong doctrine, your best bet is to talk with the elders or leadership of your church. You may have some valuable feedback they need to hear. Plus, it is not good to leave without giving them a chance to respond to your concerns. +One way to know if God is in your decision to move on is whether a) you have found or trained others as your replacement in ministries you have been involved in and b) you have made it clear there is no desire to draw away others with you. +6. Is your concern a matter of “worship style?” For some, the music makes the difference. It is true that the singing can be an indicator of the joy in the life of the church, but this is a very subjective thing and so must be considered carefully. A church can have a professional quality Sunday morning presentation, but be lacking significantly in spiritual depth. On the other hand, if not much effort is put into the music ministry, this could be an indicator of lazy leadership or restrictive spiritual life. +7. Has “church hopping” become your style, in the sense that you have been part of numerous churches and find problems with every one? This is not healthy. To be sure, every church is imperfect, for they are all made up of imperfect people. Leaders are flawed as well. The church is made up of sinners saved by grace, that continue to have the odor of sin as well as the fragrance of God’s grace. It will be that way until the Lord returns. Could it be the Lord wants to develop in you the character of grace and forgiveness towards others’ imperfectness or sin? Maybe it would be a good idea to discuss this with your current leadership before leaving for another church. +8. Have you earnestly prayed about your decision? Honestly, God knows your heart and wants to help you make a wise decision. The impact of this decision is significant for you and your family, as well as for the church you are leaving and the one you will join—so it is essential that you walk in step with the Spirit of God when considering leaving. + +### What Now? + +OK, what if after all this you feel God is leading you to leave? First, meet with one or more of the elders to discuss your concerns. Be open to their response, listening for their burdens, struggles and thinking. There may be a misunderstanding or clear disagreement—but there needs to be clarity! If they disagree with your assessment of things, that doesn’t mean they are being defensive. Remember, this is a two-way communication. +If personal interaction with an elder or elders does not bring resolution and you still feel leaving is the right thing to do, then write a letter (not an e-mail which can seem too impersonal) to the elders of the church and include the following: +1. A brief acknowledgement of what God has done in your life through your fellowship at the church (it is always good to begin with “good news” before you bring on the “bad news”). Don’t forget to thank them for the role they have played in your spiritual formation. Even if you are leaving with some significant concerns, surely God has used the church in your life for some blessings, hasn’t He? +2. Explain what you have done about your concerns (for example, talked with one or more of the elders or leaders, tried to make changes, etc.). +3. If you have negative reasons for leaving then describe your concerns clearly, without going into too much detail—just enough so they know why you feel leaving is the best option for you. Don’t lay blame, simply state your case. You don’t want to burn any bridges, but to lay the foundation for continued fellowship and friendship with them after you leave. You may want to return some day! +4. Share with the elders what your plans are for the next stage of your spiritual journey. They will be concerned that you do not drift out into the world, but find a good fellowship where you can grow. +5. Do all you can to minimize the impact of your leaving. This would include providing time for replacements for any ministry in which you have been involved. +6. Commit yourself to not tearing down the church you are leaving by gossiping or spreading discontent. Remember, Christ loved the church and gave Himself for it, so be careful about what you say regarding His Body. In all your conversations with other members of the church, let your words be seasoned with grace. Assure the leadership that your intention is to leave quietly and with as little adverse impact on the church as possible. +7. If a public statement is advised, suggest that the elders work with you on a carefully worded announcement that conveys the matter clearly and graciously to the rest of the church. This will ensure that everyone is hearing the same thing. Show respect for the body in the way you leave—keep silent if that is what they want, write a letter to the church or make a public statement. Whatever you do, do it in consultation with the leadership, as much as possible. Do not give Satan a foothold or opportunity for disunity. +8. If the elders or leadership of your church are unresponsive to your overtures or react in a fleshly way, you should rather take the high road of grace. There may be many factors involved in their reaction so it is not safe to guess what they are thinking. Therefore, grace along with meekness is the better response. Commit to pray genuinely for the church, its leadership and its people. +**See related resources on:**  +**Leading** +. +. +. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Leaving a church/Scriptural Reasons for Leaving a Church.md b/OneNote/Ben's Notebook/Topical studies/Leaving a church/Scriptural Reasons for Leaving a Church.md new file mode 100644 index 0000000..3dd6f6d --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Leaving a church/Scriptural Reasons for Leaving a Church.md @@ -0,0 +1,32 @@ +| +| +==Tags: #leaving a church== + +| +| +==The Barnabas Ministry == + **Scriptural Reasons for Leaving a Church****** Leaving a local congregation can be a tremendously difficult thing to do for many people. Many people are members of unhealthy congregations and have a desire to help those congregations be healthier. But unhealthy congregations often get that way because the leadership and membership wants them that way, and desires for improving the health of such congregations usually result in disappointment. A question I've heard leaders in unhealthy congregations ask is, "Give me a Scriptural reason for leaving this congregation." Such a challenge suggests that the burden of proof is upon the member. Is that really true? Is a member obligated to come up with a "good enough reason" to leave a local congregation?  This question merits some serious discussion. Reasons There are plenty of examples in the New Testament of Christians legitimately and faithfully leaving a particular congregation or even a family of congregations to move to another congregation or family of congregations. +_Matter of Personal Choice_ ___It seems almost silly to have to mention this reason, but in the face of control-based leadership that often denies individual Christians' their choices, this must be mentioned. Christians are free to associate with other believers-- whoever they like, wherever they like, whenever they like._ +The New Testament is loaded with examples of Christians who came and went at their pleasure, on their own initiative and choosing. There is no evidence of "permission" necessary from any other person. For example, Aquila moved from Rome to Corinth (Acts 18:1-2), then went to Ephesus with Paul (Acts 18:18). Later he is found in Rome again (Romans 16:3) and Ephesus (1 Corinthians 16:19, 2 Timothy 4:19).  Apollos was asked to go to Corinth from Ephesus, and clearly was free to decide if and when he would make such a move (1 Corinthians 16:12). Even Paul wanted to visit Rome simply because he ran out of places to preach in his immediate area and wanted to visit Rome (Romans 15:23). +_Desire To Be with Friends in the Faith_  ___Christians today may wish to be in a congregation with their friends in the faith. There is nothing wrong with this, and there is Scriptural precedent for it. As Aquila had traveled with Paul to Ephesus (see above), the desire to be with certain brothers in the faith was a reason why early Christians chose to leave a congregation at various times.Paul once visited Troas to further the gospel, and yet chose to depart because he was wanting to be with Titus who was not there at the time (2 Corinthians 2:13). Barnabas had earlier introduced Paul to the apostles (Acts 9:27) and later sought him out to be together in Antioch (Acts 11:25)._ _____Going Home or Returning to Family_  ___Quite often, we see early Christians going to their ancestral or native lands. Already, we have seen Aquila returning to Rome (Acts 18:2, Romans 16:3). We have seen John Mark return to Jerusalem (Acts 13:13)._ +A particularly noteworthy example of this is Barnabas returning to Cyprus, his native land (Acts 4:36). After many years of service in Jerusalem, Antioch, and the mission fields of Eastern Europe, he returned with his relative John Mark to Cyprus (Acts 15:39). +Similarly, the apostle Paul returned to Tarsus for many years after his initial ministry in Damascus (Acts 9:30, 11:25).  +_Business___ In James 4:13, James makes reference to Christians who might plan to go to this or that city for business. James does not oppose the idea of traveling to another city for business. He takes issue with the boasting and leaving God's will out of the picture, a passage that gives all of us pause about planning for the future as though we know what it holds. Clearly, James has no problem with anybody making plans or traveling to another place for business purposes--provided it is the will of God and the people consider God in their choice. +_Healing from Difficult or Overwhelming Situations_ ___Sometimes first-century Christians went to congregations where they were able to heal from hardships. For example, John Mark went on a mission journey and decided to return to Jerusalem (Acts 13:13). Later on we learn that John Mark was considered a "deserter" (Acts 15:38). The fact remains, he was still faithful in the Lord throughout all of this and that he decided to leave a mission trip on his own. While this may have cast questions upon his suitability for future work of that sort (Paul and Barnabas were divided on the matter, and clearly there was legitimate basis for each position), it had no effect on his faithfulness in the Lord. Later on in life, Paul had kind words for Mark (2 Timothy 4:11), as did Peter (1 Peter 5:13). The same apostles who abandoned Jesus in the Garden knew that sometimes, everybody needs a break or a second chance.___ +_Getting Away from Unhealthy Circumstances or Leaders___ We must recognize that our picture of the early church may be idealized to the point where we might think that these early congregations had no problems. The fact is, every congregation of the church in the first century had its problems. The letters to the flawed congregations in Revelation (Revelation 2-3) show us that even in unhealthy situations, individual faithful Christians can shine (e.g. Revelation 3:4). Yet, Jesus clearly gave instructions about staying out of bad situations spiritually. For example, he urged his followers not to follow the "blind" Pharisees  (Luke 6:39, Matthew 15:1-14). It is clear that Jesus commanded his followers to watch out against any and all forms of Phariseeism (ref. Matthew 16:12). At least, this certainly relates to circumstances where the words of men supplant or distort the words of the Lord (ref. Matthew 15:3), where a hypocritical, powerful caste of leaders oppresses the followers and uses them for their own benefit, and where appearances count for more than substance (e.g. Matthew 23). Sadly, such traits in spiritual leadership were not destroyed along with the temple in 70 AD; they have continued to live on in churches throughout the ages. Hence, Jesus' warnings need to be heeded today as well. The scriptures command Christians to watch out for themselves. Proverbs 3:5 speaks of guarding one's heart, 1 Timothy 4:16 tells us to watch our lives closely. Christians need to watch out for what is helping or hurting them and sometimes take action in the interest of preserving their own faith as part of their call heavenward (Philippians 3:12-16). +Paul also addressed this preference for appearance over substance ("a form of godliness but denying its power") and commanded Timothy to not have anything to do with it (2 Timothy 3:1-5). Paul gave a similar command to the Ephesians to have nothing to do with deeds of darkness, but rather to expose them (Ephesians 5:11). Paul told Titus to have nothing to do with divisive individuals who persist in false teachings or advancing foolish controversies after attempts to bring about a correction (Titus 3:9-10). +Even Paul himself chose to avoid an unhealthy situation in refusing to make "another painful visit" to Corinth (2 Corinthians 1:23-2:4). When unhealthy situations develop, there should at least be attempts to rectify these things. But sometimes the wiser and more appropriate move is to step back from painful and unhealthy circumstances, rather than feeling compelled to insist that such situations be "resolved" immediately.  Time and space can bring about quite a bit of perspective and healing; they can also minimize the amount of damage these situations cause. Sometimes the person who sees the problem, or the person at the core of the problem, isn't the one to "fix" it.  +Certainly no leadership or church is flawless today. Our collective sinfulness should show us that grace is a necessary component of any fellowship. Yet, there are some instances where congregations or leadership have such serious spiritual problems that leaving for a healthier situation is indeed authorized by the Scriptures.  +_Irreconcilable Differences___ _The early church had some "sharp disagreements" of their own. In the conflict between Paul and Barnabas in Acts 15, both brothers had legitimate positions on an issue and yet clearly the positions were mutually exclusive. It was not possible to remain "together" and show respect for each legitimate position. In this case, a parting was necessary and served to benefit all involved. Two mission teams went out instead of one; in the end more people were impacted as a result.___ +_Fleeing Persecution_ ___Christians often left areas as persecution scattered the church. The most prominent example of this is discussed in Acts 8:1. This appears to be in direct response to the command of Jesus: "But whenever they persecute you in this city, flee to the next; for truly I say to you, you shall not finish going through the cities of Israel, until the Son of Man comes" (Matthew 10:23)._ +Is it possible for a Christian to be persecuted in his own congregation? My Webster's dictionary defines persecute as: "1. to harass in a manner designed to injure, grieve or afflict 2: to annoy with persistent or urgent approaches (as attacks, pleas, or importunities): PESTER." Sadly, yes-- Christians can be persecuted in their own congregations. Paul certainly endured a good bit of this and discussed it in his letters to the Corinthians. Fleeing or distancing one's self from such persecution is a legitimate Scriptural option. (It is astonishing that Christians persecute other Christians and then criticize them for leaving.) +The sad history of the Christian church over the last 2000 years shows numerous examples of Christians persecuting other Christians. Often, it is the larger, more established church opposing remnants that seek to bring change or revival to the church. It is utterly hypocritical that any Protestant group, whose very existence has been created by separating from another group and promoting revival, would then turn around and persecute a group of its own seeking to do the very same thing. It is the worst advertisement for Christianity in the world today. +_"The Triumphal Procession"___ _One might consider that Christians often left places to go on "mission trips." This is part of the Great Commission and more or less goes without saying. Interestingly, when Christians leave a congregation for whatever reason, they basically embark on another "mission trip." The world is a big place, and every place is a place to do God's will._ __ +Even in the examples cited throughout this article, there are many ways to look at these situations. For example, did Paul go to Antioch to be with a friend (Barnabas), or to help strengthen the ministry in Antioch? Did he go to deliberately prepare for future missionary journeys? Was he leaving a situation in Tarsus that had perhaps become unhealthy or stagnant? Or did God work through the situation so that his will might be accomplished in numerous ways? Only God knows the answer for certain. But no wonder Paul could later say, "But thanks be to God, who always leads us in triumphal procession in Christ and through us spreads everywhere the fragrance of the knowledge of him (2 Corinthians 2:14)." +_A Double Standard Between Leaders and Members?___ Often, congregations relocate ministers to congregations in other cities for many of the reasons I've discussed here, to provide a "new start" or a sense of healing after difficult circumstances. Yet, this is not a practical solution for most members-- especially those with families and secular jobs. Someone in a large metropolitan area shouldn't have to leave town in order to "move" to a healthier situation. It is a double-standard to allow leaders to move for many of these reasons discussed in this article (and to even pay them to do it!), but to deny members that same benefit, freedom and opportunity. +That fact that certain leaders today might challenge the freedom of Christians to move for numerous reasons does not speak well for them. Such leaders may feel that people leaving their congregation says something about their congregation that they don't like, or with which they don't agree. This indicates a greater concern for how they appear or for their power base than for the advancement of the gospel or the benefit of the sheep who have legitimate, Scriptural reasons to leave. It is an illustration of the unhealthy, Pharisaical leadership that Jesus spoke against. Such leadership also seems to forget that God has been known to use things beyond human control, intentions or understanding-- even evil things-- for his future plans (e.g. Genesis 50:20).  Does the leadership really know better than God? Isn't it absurd to even pose the question? Instead, shouldn't leaders simply "send them on their way in a manner worthy of God (3 Jn 1:6)?" And if their parting illustrates areas where a congregation needs to improve and change, why not work towards those changes instead of deflecting attention from those issues by accusing those who leave of "slander," "quitting" or "falling away?" Sadly, sometimes these sort of actions confirm that those who leave to get out of an unhealthy situation made the right choice. +We have seen numerous Scriptural reasons why Christians moved from one congregation to another in the first century church. Certainly there should be no more questioning about whether there are ever Scriptural reasons to leave a congregation and join another. + +| | +|---| +|Copyright © 2005 John Engler. All rights reserved. [Comment via email](http://www.barnabasministry.com/l3email2.html?sub=Scriptural%20Reasons%20for%20Leaving%20a%20Local%20Congregation)
    [Visit the Barnabas Ministry](http://www.barnabasministry.com/index.htm)| \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Leaving a church/When is it right to leave a church.md b/OneNote/Ben's Notebook/Topical studies/Leaving a church/When is it right to leave a church.md new file mode 100644 index 0000000..14ba422 --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Leaving a church/When is it right to leave a church.md @@ -0,0 +1,11 @@ +| +| +==Tags: #leaving a church #division #purpose of church== + +# When is it right to leave a church? + +Subscribe to our Question of the Week: + [![Exported image](Exported%20image%2020240808113933-0.gif)](http://www.gotquestions.org/audio/church-leave.mp3)[![leave church](Exported%20image%2020240808113933-1.gif)](http://www.gotquestions.net/Printer/church-leave-PF.html) + +**Question: "When is it right to leave a church?"********** **Answer:** Perhaps the best way to discern whether one has grounds to leave a church is to go back to the basics. What, after all, is the purpose of the church in the first place? The Bible is clear in its teaching that the church is to be the “pillar and ground (foundation) of the truth” (1 Timothy 3:15). Everything in the church structure, teaching, worship, programs and activities is to be centered upon this fact. In addition, the church should recognize Jesus Christ as its one and only head (Ephesians 1:22, 4:15; Colossians 1:18), and submit to Him in all things. Clearly these things can only be done when the church clings tightly to the Bible as its standard and authority. It’s hard to see how one would want to leave a church such as described above, but sadly, few churches today fit this description. Believers who feel a desire to leave a church should be clear on their reasons. If the church does not proclaim truth, cling to the Bible and revere Christ as its head, and there is another church in the area that does, then there are grounds to leave. A case can be made, however, for staying and working to bring about changes for the better. We are exhorted to “contend earnestly for the faith which was once for all delivered to the saints” (Jude 3). If one is strongly convicted of the need to move the church in a more Bible-based, Christ-honoring direction, and feels he/she can do that in a loving and non-divisive manner, then that would seem to be the better course of action. The Bible does not outline a procedure on how to leave a church. In the early day of the church, a believer would have to move to another town to find a different church. Sadly, in our world today with a church on seemingly every corner, many believers leave one church for another instead of working through whatever problem there was. Forgiveness, love, and unity are to be the marks of believers (John 13:34-35; Colossians 3:13; John 17:21-23), not bitterness and division (Ephesians 4:31-32). The most crucial thing for a believer to do should he/she feel led to leave a church is to do so in such a way that does not cause division or unnecessary controversy in the church (Proverbs 6:19; 1 Corinthians 1:10). As described above, an important question to answer is why would any person want to leave the church? If the answer to this question is because of the lack of biblical teaching, then the course is clear. However, many people are dissatisfied with their church because they are not involved in any way in the church’s ministries. It is far easier to be spiritually fed by the church when one is an active part of “feeding” others in the church. The purpose of the church is clearly outlined in Ephesians 4:11-14. Allow this passage to be the guide in choosing and finding a church. **Recommended Resources:** The Master's Plan for the Church by John MacArthur and Logos Bible Software. **** +**Related Topics:********** **What does the Bible say about church-hopping?********** **How can I overcome ministry burnout?********** **Why is church attendance important?********** **What should I be looking for in a church?********** **Why are there so many Christian denominations?********** ******Return to:********** **Questions about the Church****** ******Return to:****** ******GotQuestions.org Home************** **When is it right to leave a church?** \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Vaccinations/Autism and Vaccines Research, Funding, Support Autism Science Foundation.md b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Autism and Vaccines Research, Funding, Support Autism Science Foundation.md new file mode 100644 index 0000000..12e8aa3 --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Autism and Vaccines Research, Funding, Support Autism Science Foundation.md @@ -0,0 +1,79 @@ +| +| +==Tags: #pro-vaccination #autism #thimerosal #research-list== + +# Autism and Vaccines + +On a previous version of this page, the allegations contained in a lawsuit brought by Andrew Wakefield were inadvertently mischaracterized as conclusions of the court.  We regret this error.  + +### **Beyond the Autism/Vaccine Hypothesis: What Parents Need to Know about Autism Research** + +A decade ago most researchers agreed that we needed to study vaccines in relation to autism. We had to reconcile the fact that the number of vaccines children were receiving was increasing, and at the same time, the number of children who were being diagnosed with autism also was on the rise. Fortunately  [this was a question that could be studied – and answered – by science](http://www.health.state.ny.us/prevention/immunization/vaccine_safety/misperceptions.htm). We looked at children who received vaccines and those who didn’t, or who received them on a different, slower schedule. There was no difference in their neurological outcomes.  Multiple studies have been completed which investigated the measles, mumps and rubella vaccination in relation to autism. Researchers have also studied thimerosal, a mercury-based preservative, to see if it had any relation to autism. The results of studies are very clear; the data show no relationship between vaccines and autism.  Read the studies themselves below and browse our [recommended reading](http://www.autismsciencefoundation.org/autism-science/recommended-reading) list. + +## **Read the Science** + +### **Literature Reviews: Autism and Vaccines** + +**On-time Vaccine Receipt in the First Year Does Not Adversely Affect Neuropsychological Outcomes****** [http://pediatrics.aappublications.org/cgi/content/abstract/125/6/1134](http://pediatrics.aappublications.org/cgi/content/abstract/125/6/1134) _Pediatrics___ _Smith, M and Woods, C___ _June 2010_ +**Vaccines and Autism: A Tale of Shifting Hypotheses****** [http://www.journals.uchicago.edu/doi/full/10.1086/596476](http://www.journals.uchicago.edu/doi/full/10.1086/596476) _Clinical Infectious Diseases___ _Offit, Paul and Gerber, Jeffrey S.___ _Feb. 2009_ +**"Immunization Safety Review: Vaccines and Autism"****** [http://www.iom.edu/CMS/3793/4705/20155.aspx](http://www.iom.edu/CMS/3793/4705/20155.aspx) **Institute of Medicine****** **May 2004** + +### **Too Many Too Soon?** + +**Addressing Parents' Concerns: Do Multiple Vaccines Overwhelm or Weaken the Infant's Immune System?****** [http://pediatrics.aappublications.org/cgi/content/full/109/1/124](http://pediatrics.aappublications.org/cgi/content/full/109/1/124) _Pediatrics___ _Offit, Paul A., Quarles, Jessica, et al.___ _2002_ +**Immunization Safety Review: Multiple Immunizations and Immune Dysfunction****** [http://www.iom.edu/CMS/3793/4705/4432.aspx](http://www.iom.edu/CMS/3793/4705/4432.aspx) _Institute of Medicine___ _February 2002_ +**Cellular Immune Responses in Neonates****** [http://www.informaworld.com/smpp/content~content=a790107447~db=all~order=page](http://www.informaworld.com/smpp/content~content=a790107447~db=all~order=page) _International Reviews of Immunology___ _Fadel S, Sarazotti M.___ _2000_ +**Neonatal and Early Life Vaccinology****** [http://www.ncbi.nlm.nih.gov/pubmed/11348697](http://www.ncbi.nlm.nih.gov/pubmed/11348697) _Vaccine___ _Siegrist CA.___ _2001_ +**The Problem with Dr. Bob's Alternative Vaccine Schedule****** [http://pediatrics.aappublications.org/cgi/content/full/123/1/e164?maxtoshow=&HITS=10&hits=10&RESULTFORMAT=&fulltext=offit&searchid=1&FIRSTINDEX=0&sortspec=date&resourcetype=HWCIT](http://pediatrics.aappublications.org/cgi/content/full/123/1/e164?maxtoshow=&HITS=10&hits=10&RESULTFORMAT=&fulltext=offit&searchid=1&FIRSTINDEX=0&sortspec=date&resourcetype=HWCIT) _Pediatrics___ _Offit, Paul A. and Moser, Charlotte A.___ _January 2009_ + +### **Thimerosal and Autism Studies** + +**Neuropsychological performance 10 years after immunization in infancy with thimerosal-containing vaccines.****** [http://pediatrics.aappublications.org/cgi/content/abstract/123/2/475?maxtoshow=&HITS=10&hits=10&RESULTFORMAT=&fulltext=neuropsychological+performance&searchid=1&FIRSTINDEX=0&sortspec=relevance&resourcetype=HWCIT](http://pediatrics.aappublications.org/cgi/content/abstract/123/2/475?maxtoshow=&HITS=10&hits=10&RESULTFORMAT=&fulltext=neuropsychological+performance&searchid=1&FIRSTINDEX=0&sortspec=relevance&resourcetype=HWCIT) _Pediatrics___ _Tozzi AE, Bisiacchi P, Tarantino V, De Mei B, D'Elia L, Chariotti F, Salmaso S.___ _January 2009_ +**Continuing Increases in Autism Reported to California's Developmental Services System****** [http://archpsyc.ama-assn.org/cgi/content/full/65/1/19](http://archpsyc.ama-assn.org/cgi/content/full/65/1/19) _Archives of General Psychiatry___ _Robert Schechter, MD, MSc and Judith K. Grether, PhD___ _January 2008_ +**Early Thimerosal Exposure and Neuropsychological Outcomes at 7 to 10 Years****** [http://content.nejm.org/cgi/content/full/357/13/1281](http://content.nejm.org/cgi/content/full/357/13/1281) _New England Journal of Medicine___ _Thompson WW, Price C, Goodson B, et al.___ _September 2007_ +**Lack of Association Between Rh Status, Rh Immune Globulin in Pregnancy and Autism****** [http://www3.interscience.wiley.com/cgi-bin/abstract/114264055/ABSTRACT](http://www3.interscience.wiley.com/cgi-bin/abstract/114264055/ABSTRACT) _American Journal of Medical Genetics___ _Judith H. Miles and T. Nicole Takahashi___ _May 2007_ +**Comparison of Blood and Brain Mercury Levels in Infant Monkeys Exposed to Methylmercury or Vaccines Containing Thimerosal****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=16079072&query_hl=1) _Environmental Health Perspectives___ _Thomas M. Burbacher, PhD___ _April 2005_ +**Thimerosal Exposure in Infants and Developmental Disorders: A Prospective Cohort Study in the United Kingdom Does Not Support a Causal Association****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=15342824&query_hl=5) _Pediatrics___ _John Heron and Nick Andrews, PhD and Jean Golding, DSc___ _September 2004_ +**Neurotoxic Effects of Postnatal Thimerosal Are Mouse Strain Dependent****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=15184908&query_hl=10) _Molecular Psychiatry___ _M Hornig, M___ _June 2004_ +**Safety of Thimerosal-Containing Vaccines: A Two-Phased Study of Computerized Health Maintenance Organization Database****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=14595043&query_hl=59) _Pediatrics___ _Thomas Verstraeten, MD___ _November 2003_ +**Association Between Thimerosal-Containing Vaccine and Autism****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=14519711&query_hl=16) _Journal of the American Medical Association___ _Anders Hviid, MSc___ _October 2003_ +**Thimerosal and the Occurrence of Autism: Negative Ecological Evidence from Danish Population-Based Data****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=15496004&query_hl=19) _Pediatrics___ _Kreesten M. Madsen, MD___ _September 2003_ +**"Autism and Thimerosal-Containing Vaccines: Lack of Consistent Evidence for an Association"****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=12880876&query_hl=21) _American Journal of Preventive Medicine___ _Paul Stehr-Green, DrPh, MPH___ _August 2003_ +**Thimerosal and Autism?****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=12612255&query_hl=22) _Pediatrics___ _Karen Nelson, MD___ _March 2003_ +**Mercury concentrations and metabolism in infants receiving vaccines containing thiomersal: A descriptive study****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=12480426&query_hl=30) _The Lancet___ _Michael Pichichero, MD___ _November 2002_ + +### **Measles-Mumps-Rubella (MMR) Vaccine and Autism Studies** + +**Remembering How to Fight Measles** **** [http://www.nytimes.com/2014/03/28/opinion/remembering-how-to-fight-measl...](http://www.nytimes.com/2014/03/28/opinion/remembering-how-to-fight-measles.html?emc=eta1&_r=0) _New York Times___ _Paul A. Offit, MD___ _March 2014_ +**How to Think About the Risk of Autism****** [http://www.nytimes.com/2014/03/30/opinion/sunday/how-to-think-about-the-...](http://www.nytimes.com/2014/03/30/opinion/sunday/how-to-think-about-the-risk-of-autism.html) _New York Times___ _Sam Wang, Ph.D.___ _March 2014_ +**Lack of Association Between Measles Virus Vaccine and Autism with Enteropathy: A Case-Control Study****** [http://www.plosone.org/article/info%3Adoi/10.1371/journal.pone.0003140](http://www.plosone.org/article/info%3Adoi/10.1371/journal.pone.0003140) _PLoS One___ _Hornig M, Briese T, Buie T, Bauman ML, Lauwers G, et al.___ _September 2008_ +**Measles Vaccination and Antibody Response in Autism Spectrum Disorders****** [http://adc.bmj.com/cgi/content/abstract/adc.2007.122937v1?maxtoshow=&HIT...](http://adc.bmj.com/cgi/content/abstract/adc.2007.122937v1?maxtoshow=&HITS=10&hits=10&RESULTFORMAT=&author1=baird&andorexactfulltext=and&searchid=1&FIRSTINDEX=0&sortspec=relevance&resourcetype=HWCIT) _Archives of Disease in Childhood___ _Gillian Baird, F.R.C.Paed.___ _February 2008_ +**Pervasive Developmental Disorders in Montreal, Quebec, Canada: Prevalence and Links With Immunizations****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pubmed&cmd=Retrieve&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pubmed&cmd=Retrieve&dopt=AbstractPlus&list_uids=16818529&query_hl=2&itool=pubmed_docsum) _Pediatrics___ _Eric Fombonne, MD___ _July 2006_ +**MMR Vaccination and Pervasive Developmental Disorders: A Case-Control Study****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=15364187&query_hl=38) _The Lancet___ _Liam Smeeth, MRCGP___ _September 11, 2004_ +**Association of Autistic Spectrum Disorder and the Measles, Mumps, and Rubella Vaccine****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=12860782&query_hl=40) _Archives of Pediatrics & Adolescent Medicine___ _Kumanan Wilson, MD, MSc, FRCP___ _July 2003_ +**Neurologic Disorders After Measles-Mumps-Rubella Vaccination****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=12415036&query_hl=64) _Pediatrics___ _Annamari Makela, MD___ _November 2002_ +**No Evidence for a New Variant of Measles-Mumps-Rubella-Induced Autism****** [http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dop...](http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=11581466&query_hl=66) _Pediatrics___ _Eric Fombonne, FRCPsych___ _October 2001_ + +### **Autism and Vaccines in the Media** + +On January 21st, 2011, Dr. Paul Offit was on The Colbert Report speaking about his new book, "Deadly Choices: How The Anti-Vaccine Movement Threatens Us All." [Click Here to Watch the Interview](http://www.colbertnation.com/the-colbert-report-videos/372812/january-31-2011/paul-offit). +  + +### **What's Next?** + +If we ask the same questions we’ll get the same answers. We’ve asked the autism vaccine question over two dozen times and each time we get the same response; no relationship.  We need to move on; We need to invest in studying genetics, the brain structures of children with autism, and environmental factors that may be playing a role.  +  + +### **Downloadable Materials** + +Below are three fact-sheets prepared by physicians at the Children's Hospital of Philadelphia. They are excellent resources to distribute at events. + +- [Vaccines and Autism: What You Should Know](http://www.autismsciencefoundation.org/sites/default/files/CHOP1.pdf) +- [The Facts about Childhood Vaccines](http://www.autismsciencefoundation.org/sites/default/files/CHOP2.pdf) +- [Vaccine Ingredients: What You Should Know](http://www.autismsciencefoundation.org/sites/default/files/CHOP3.pdf) + +  +Below are two tables prepared by the initiative Every Child By Two. These tables summarize the major procedures and conclusions of the most recent studies regarding autism and Thimerosal, as well as autism and the MMR vaccine.  + +- [Thimerosal and Autism Research Summary](http://www.autismsciencefoundation.org/sites/default/files/Thimerosal%20and%20Autism.pdf) +- [MMR and Autism Research Summary](http://www.autismsciencefoundation.org/sites/default/files/MMR%20and%20Autism.pdf) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Vaccinations/Common Vaccine Misperceptions and Concerns Explained.md b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Common Vaccine Misperceptions and Concerns Explained.md new file mode 100644 index 0000000..32ba002 --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Common Vaccine Misperceptions and Concerns Explained.md @@ -0,0 +1,23 @@ +| +| +==Tags: #pro-vaccination #autism #thimerosal #flu-vaccine== + +You are Here: Home Page **>** Vaccine Safety and the Importance of Vaccines **>** Common Vaccine Misperceptions and Concerns Explained   + +# **Common Vaccine Misperceptions and Concerns Explained** + +There are misperceptions about risks and side effects of vaccination, and because there are so many false reports in the media, this section aims to clear up any confusion. +Common [vaccine side effects (cdc.gov)](http://www.cdc.gov/vaccines/vac-gen/6mishome.htm) include mild reactions like fever, or swelling or soreness at the injection site. These reactions indicate that the vaccine is working. Very rarely, you might have a serious side effect, such as an allergic reaction. Only one in 1 million children vaccinated experience this side effect. There is absolutely no sound evidence suggesting that vaccines cause or trigger autism. Decades of research around the world prove vaccinations are safe and effective. Meanwhile, the effects of an infectious disease can be severe and long-lasting, including brain damage or even death. Bottom line: The bigger risk is in delaying a vaccination, because [the longer you wait to vaccinate your child, the longer he or she is risking exposure](http://www.health.ny.gov/prevention/immunization/vaccine_safety/harm.htm) to a serious and potentially life-altering disease. +Some parents worry about overloading a child's [immune system](http://www.cdc.gov/vaccines/spec-grps/hcp/downloads/vacsafe-understand-bw-office.pdf). But parents don't need to be concerned about this. The American Academy of Pediatrics says that [babies' immune systems can handle the number of recommended vaccines (aap.org)](http://www.aap.org/immunization/families/toomany.html) according to the vaccination schedule because they are exposed to multiple germs on a daily basis. A healthy baby's immune system can accommodate multiple vaccinations. In fact, babies' immune systems can respond to approximately 100,000 organisms at once. The antigens in vaccines use only a small fraction of a babies immune system response. Childhood immunizations are recommended to children at a susceptible young age after immunity from their mother wears off. Again, there is more harm in not vaccinating your baby. See:_The Harm of Delaying or Skipping._ +Another misperception is that vaccinations are unsafe because they contain **thimerosal****, an** [organic form of mercury (also called ethylmercury)](http://www.cdc.gov/vaccines/spec-grps/hcp/downloads/vacsafe-thimerosal-bw-office.pdf) that prevents vaccines from being contaminated. This form of mercury is completely different from methylmercury, which can damage the nervous system. Although thimerosal has been shown to be safe, now all routine childhood vaccines are available in thimerosal-free forms, including the seasonal flu vaccine. +Also, vaccines do not make a child sick with the disease, and they do not weaken the immune system. Vaccines introduce a killed/disabled **antigen** **into the body so the immune system can produce antibodies against it and create immunity to the disease. That said, it's not uncommon for a child to develop a mild runny nose and/or cough after receiving the flu vaccine. This does not mean, however that your child "got the flu." Also, because it takes about two weeks for the flu vaccine to become effective, and because flu symptoms do not immediately appear, a person could unknowingly already be infected with the flu when receiving a vaccination. Someone in this situation might assume that the flu vaccine gave them the flu, but this is not possible or true.** +Finally, the most common and most concerning misperception is that vaccines cause autism. But there is absolutely no sound proof of this. To read more, visit [The Truth About Autism.](http://www.health.ny.gov/prevention/immunization/vaccine_safety/truth_about_autism.htm) +Vaccines are developed with the highest safety standards in mind. [The Food and Drug Administration](http://www.fda.gov/), along with the [Centers for Disease Control and Prevention](http://www.cdc.gov/vaccines/), developed the [Vaccine Adverse Events Reporting System (vaers.hhs.gov)](http://www.vaers.hhs.gov/index) to maintain these high standards. + +## **Other helpful resources:** + +- ["Clear Answers & Smart Advice About Your Baby's Shots" (immunize.org)](http://www.immunize.org/catg.d/p2068.pdf), Ari Brown, MD, FAAP, acquired from Immunization Action Coalition +- ["Six Common Misperceptions About Vaccination" (cdc.gov)](http://www.cdc.gov/vaccines/vac-gen/6mishome.htm), Centers for Disease Control and Prevention +- ["Get the Picture: Childhood Immunizations" (cdc.gov)](http://www.cdc.gov/CDCTV/GetThePicture/index.html), Centers for Disease Control and Prevention video, running time 6:27 +- ["Vaccine Safety Concerns" (cdc.gov)](http://www.cdc.gov/vaccinesafety/concerns/), Centers for Disease Control and Prevention, National Center for Immunization and Respiratory Diseases +- ["Immunization Issues: Vaccine Misinformation" (immunizationinfo.org)](http://www.immunizationinfo.org/issues/general/vaccine-misinformation), National Network for Immunization Information \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Vaccinations/JAMA Network JAMA Time Trends in Autism and in MMR Immunization Coverage in California.md b/OneNote/Ben's Notebook/Topical studies/Vaccinations/JAMA Network JAMA Time Trends in Autism and in MMR Immunization Coverage in California.md new file mode 100644 index 0000000..94100c5 --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Vaccinations/JAMA Network JAMA Time Trends in Autism and in MMR Immunization Coverage in California.md @@ -0,0 +1,30 @@ +| +| +==Tags: #autism #study #mmr-vaccine== + +Study compared observed rise in reported autism incidences in California verses increase in MMR coverage from 1980-1994. However, the numbers representing the increase in autism cases may not truly represent a rise in cases as the system reporting these numbers was expanding, definitions of autism were changing, etc. See conclusion of the report. +**< Previous Article** **Next Article >** +. +Brief Report | March 7, 2001 + +# **Time Trends in Autism and in MMR Immunization Coverage in California** **FREE** + +Loring Dales, MD; Sandra Jo Hammer, RN, PHN; Natalie J. Smith, MD, MPH +[[](http://jama.jamanetwork.com/article.aspx?articleid=193604#)+] Author Affiliations +_JAMA._ 2001;285(9):1183-1185. doi:10.1001/jama.285.9.1183. +Text Size: **A** [A](http://jama.jamanetwork.com/article.aspx?articleid=193604#) [A](http://jama.jamanetwork.com/article.aspx?articleid=193604#) +. +[Article](http://jama.jamanetwork.com/article.aspx?articleid=193604#tab1) +[Figures](http://jama.jamanetwork.com/article.aspx?articleid=193604#tab3) +[References](http://jama.jamanetwork.com/article.aspx?articleid=193604#tab6) +. + +## **Figures****.** + +_Figure. Percentage of Children Receiving Measles-Mumps-Rubella (MMR) Immunization in Second Year of Life and Caseload of Children With Autism, by Year of Birth, California, 1980-1994_ + +The upper 2 curves indicate the percentages of children receiving MMR immunization by 17 and 24 months of age, respectively. The lower curve indicates the number of cases of children with autism[2](http://jama.jamanetwork.com/article.aspx?articleid=193604#REF-JBR00284-2) (and California Department of Development Services, unpublished data, 2000). The vertical dotted line at birth year 1988 is provided as a temporal reference point in comparing the shapes of these curves. + +![Image not available.](Exported%20image%2020240808113939-0.png) + +View Large  |  Save Figure  |  [Download Slide (.ppt)](http://jama.jamanetwork.com/DownloadImage.aspx?image=/data/Journals/JAMA/4774/jbr00284f1.gif&sec=24946033&ar=193604&imagename=)  |  [View in Article Context](http://jama.jamanetwork.com/article.aspx?articleid=193604#Jbr00284f1) \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Vaccinations/Recommended Reading Research, Funding, Support Autism Science Foundation.md b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Recommended Reading Research, Funding, Support Autism Science Foundation.md new file mode 100644 index 0000000..6566676 --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Recommended Reading Research, Funding, Support Autism Science Foundation.md @@ -0,0 +1,63 @@ +| +| +==Tags: #pro-vaccination #autism #book-list== + +# Recommended Reading + +**Each Day I Like It Better: Autism, ECT, and the Treatment of Our Most Impaired Children** +Author: Amy S. F. Lutz + +![AMY S. F. LUTZ gam dang W 6ene» AUTISM, ECT, AND THE TREATMENT OF OUR MOST IMPAIRED CHILDREN FOREWORD BY DIRK DHOSSCHE, MD, AND CHARLES KELLNER, MD ](Exported%20image%2020240808113940-0.jpeg) + +  In _Each Day I Like It Bette_r, author Amy Lutz dispels her experience with Jonah, her 10 year old son who has Autism Spectrum Disorder. For many years, Jonah's autism manifested as severe violence, to the point where behavior modification trials, medications, and almost a year of hospitalization could not control his rage. Searching earnestly for a cure to control these violent outburts, Amy and her husband turned to the controversial electroconvulsive therapy (ECT). Since then, Jonah's rage has significantly diminished, and now, at age 14, he will move to a less restricted school. _Each Day I Like It Better_ documents the journeys of seven children and their families as they search for successful treatments for autism. Ultimately, they find that electroconvulsive therapy (ECT) can lead to positive outcomes in individuals with autism. +  +  +**Autism Spectrum Disorders: What Every Parent Needs to Know** +Author: American Academy of Pediatrics, Alan I. Rosenblatt (Editor), Paul S. Carbone (Editor) + +![vvslxav ](Exported%20image%2020240808113940-1.jpeg) + +From autism and Asperger's syndrome through pervasive developmental disorders, this authoritative reference from the leading publisher in pediatric health care examines how autism spectrum disorders (ASDs) are defined and diagnosed and reviews the most current behavioral and developmental therapy treatments available. Through this evidence-based guide, which reflects the new diagnostic thinking from the American Psychiatric Association, parents and caregivers will learn about the symptoms and the incidence of ASDs, screening tools, the roles of complementary and alternative medicine, and what to expect as these children grow into adolescence and beyond. +**Thinking Person's Guide to Autism** +Author: Shannon Des Roches Rosa, Jennifer Byde Myers, Liz Ditz, Emily Willingham, & Carol Greenburg + +![THINKING GUIDE PERSON'S TOAUTISM What you really need to know about autism: from autistics, parents, and professionals Edited by Shannon Des Roches Rosa, Jennifer Byde Myers, Liz Ditz, Emily Willingham, & Carol Greenburg ](Exported%20image%2020240808113940-2.jpeg) + +_The Thinking Person's Guide to Autism_ is a one-stop resource for parents when autism first becomes a part of their lives. The book is a compilation of essays from the popular blog "Thinking Person's Guide to Autism," and it provides evidence-based information from autism parents, autistics, and autism professionals. Steve Silberman, senior writer for Wired magazine and autism/neurodiversity blogger for the Public Library of Science declared, "Refreshingly free of dogma, disinformation, and heavy-handed agendas, The Thinking Person's Guide to Autism is an oasis of sanity, compassion, and hope for people on the spectrum and those who love them." **Proceeds from the sale of** **Thinking Person's Guide to Autism** **support the Autism Science Foundation.** +  +**Deadly Choices: How the Anti-Vaccine Movement Threatens Us All** +Author: Paul Offit M.D. + +![DEADLY CHOICES HOW THE ANTI-VACCINE MOVEMENT THREATENS US ALL PAUL A. OFFIT, M.D. ](Exported%20image%2020240808113940-3.jpeg) + +How did we get to a place where vaccines are viewed with horror rather than as life-saving medicine? The answer is rooted in one of the most powerful and disturbing citizen activist movements in our nation’s history—a movement that, despite recent epidemics and deaths, continues to grow. Deadly Choices is the story of anti-vaccine activity in America—its origins, leaders, influences, and impact—and is a powerful defense of science in the face of fear. **Proceeds from the sale "Deadly Choices" will support the Autism Science Foundation.** +  +  +**The Panic Virus: A True Story of Medicine, Science, and Fear** +Author: Seth Mnookin + +!["A nonfiction Story worthy Of Michael Crichton—an absorbing, disturbing, and scrupulously researched account Ofa contagion Of human unreason run wild." JONATHAN MAHLER, author of Challenge and Ladies and Gentlemen, the Bronx Is Burning Seth Mnooki THE PANI VIR A True Story of Medicine, Science, and Fear ](Exported%20image%2020240808113940-4.jpeg) + +Despite the lack of corroborating evidence, the myth that vaccines somehow cause developmental disorders lives. It has been popularized by media personalities such as Oprah Winfrey and Jenny McCarthy and legitimized by journalists who claim that they are just being fair to “both sides” of an issue about which there is little debate. Meanwhile millions of dollars have been diverted from potential breakthroughs in autism research, families have spent their savings on ineffective “miracle cures,” and declining vaccination rates have led to outbreaks of deadly illnesses like Hib, measles, and whooping cough. Most tragic of all is the increasing number of children dying from vaccine-preventable diseases. +In _The Panic Virus_ Seth Mnookin draws on interviews with parents, public-health advocates, scientists, and anti-vaccine activists to tackle a fundamental question: How do we decide what the truth is? The fascinating answer helps explain everything from the persistence of conspiracy theories about 9/11 to the appeal of talk-show hosts who demand that President Obama “prove” he was born in America. +**Autism's False Prophets: Bad Science, Risky Medicine, and the Search for a Cure** +Author: Paul Offit, MD + +![AUTISM'S ROPHETS ](Exported%20image%2020240808113940-5.png) + +Paul Offit, a national expert on vaccines, challenges the modern day false prophets who have so egregiously misled the public with untested and potentially harmful "treatments" for autism. Instead of helping, these therapies can hurt those who are most vulnerable.  Offit also exposes the opportunism of the lawyers, journalists, celebrities and politicians who perpetuate this exploitation. This book is a must read for anyone who cares about a child with autism. +**Proceeds from the sale "Autism's False Prophets" support the Autism Science Foundation.** +  +**A Practical Guide to Autism** +Author: Dr. Fred Volkmar and Dr. Lisa Wiener + +![FRED R. VOLKMAR LISA A. WIESNER Practical Guide to Autism What Every Parent, Family Member, and Teacher Needs to Know ](Exported%20image%2020240808113940-6.jpeg) + +Published in August 2009, this new book is a tremendous asset for families and practitioners who want to keep up with the latest developments in autism research, treatment and education. The book is full of great practical ideas about how research can be translated into clinical practice. The issues are presented in all of their complexity but translated into language that is clear, direct, and easy to follow. The format also lends itself to understanding the complex issues and their implications through excellent charts, question and answer sections, and chapters that vary from describing diagnostic issues to stating very specifically how to expand and evaluate the services a family is receiving. There are also very comprehensive reference and resource lists. +  +**Boy Alone** +Author: Karl Taro Greenfeld + +![GREENFEl.D ](Exported%20image%2020240808113940-7.jpeg) + +An unsparing memoir of the author's life growing up with his severely autistic brother. Greenfeld writes beautifully about living in his brother's shadow, revealing the complex mix of rage, confusion and love that defined his childhood. Haunting, tragic and unforgettable, this chronicle of autism from the sixties to the present day is wholly original and completely memorable. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Vaccinations/The Diseases Vaccines Prevent and How.md b/OneNote/Ben's Notebook/Topical studies/Vaccinations/The Diseases Vaccines Prevent and How.md new file mode 100644 index 0000000..5f12666 --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Vaccinations/The Diseases Vaccines Prevent and How.md @@ -0,0 +1,37 @@ +| +| +==Tags: #pro-vaccination #diseases #how-it-works== + +You are Here: Home Page **>** Immunization **>** The Diseases Vaccines Prevent and How   + +# **The Diseases Vaccines Prevent and How** + +## **What Diseases Do Vaccines Prevent?** + +Vaccines are the safest way to protect you, your children and your community from a long list of serious and potentially life-threatening illnesses. You can read about many of the diseases vaccines are used to prevent below: + +- [Chickenpox](http://www.health.ny.gov/diseases/communicable/chickenpox/fact_sheet.htm) +- [Diphtheria](http://www.health.ny.gov/diseases/communicable/diphtheria/fact_sheet.htm) +- [Haemophilus Influenza Type B](http://www.health.ny.gov/diseases/communicable/haemophilus_influenzae/fact_sheet.htm) +- [Hepatitis A](http://www.health.ny.gov/publications/1859/index.htm) +- [Hepatitis B](http://www.health.ny.gov/diseases/communicable/hepatitis/hepatitis_b/fact_sheet.htm) +- [Human Papillomavirus (HPV, genital or venereal warts)](http://www.health.ny.gov/diseases/communicable/human_papillomavirus/fact_sheet.htm) +- [Influenza](http://www.health.ny.gov/diseases/communicable/influenza/fact_sheet.htm) +- [Measles](http://www.health.ny.gov/diseases/communicable/measles/fact_sheet.htm) +- [Meningococcal Disease](http://www.health.ny.gov/diseases/communicable/meningococcal/fact_sheet.htm) +- [Mumps](http://www.health.ny.gov/diseases/communicable/mumps/fact_sheet.htm) +- [Pertussis (Whooping cough)](http://www.health.ny.gov/diseases/communicable/pertussis/fact_sheet.htm) +- [Pneumococcal Disease](http://www.health.ny.gov/diseases/communicable/pneumococcal/fact_sheet.htm) +- [Poliomyelitis](http://www.health.ny.gov/diseases/communicable/poliomyelitis/fact_sheet.htm) +- [Rubella](http://www.health.ny.gov/diseases/communicable/rubella/fact_sheet.htm) +- [Shingles](http://www.health.ny.gov/diseases/communicable/shingles/fact_sheet.htm) +- [Tetanus](http://www.health.ny.gov/diseases/communicable/tetanus/fact_sheet.htm) + +For a full list of all the diseases vaccines prevent, visit the [CDC website](http://www.cdc.gov/vaccines/vac-gen/howvpd.htm). + +## **How Do Vaccines Prevent Disease?** + +Vaccines protect you by preparing your immune system to recognize and fight serious, and sometimes deadly, diseases. +A vaccine contains a specific part of a germ (bacteria or virus), called an **antigen****. The antigen is killed or disabled before it's used to make the vaccine, so it can't make you sick. Vaccines, and the antigens they contain, stimulate your immune system's B cells to develop protective substances called antibodies. These antibodies are responsible for killing germs that enter your body. Once activated, B cells can stay in your body for a lifetime and allow your body to remember the germ that stimulated their creation. Throughout your life, these cells will recognize and fight the actual disease caused by the germ when and if you come into contact with it.** +If you're interested in reading about this topic further, visit [the CDC website](http://www.cdc.gov/vaccines/vac-gen/howvpd.htm). +Vaccines help prevent infectious diseases and save many lives. Because of vaccines, diseases including polio and measles, that once took devastating tolls on families and whole communities, are now almost extinct. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Vaccinations/The Fraud Behind the MMR Scare - News Coverage from IAC.md b/OneNote/Ben's Notebook/Topical studies/Vaccinations/The Fraud Behind the MMR Scare - News Coverage from IAC.md new file mode 100644 index 0000000..c316985 --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Vaccinations/The Fraud Behind the MMR Scare - News Coverage from IAC.md @@ -0,0 +1,9 @@ +| +| +==Tags: #autism #andrew-wakefield #article-list== + +| +| +==| | +|---| +|\| \|
    \|---\|
    \|\\| \\|
    \\|---\\|
    \\|\\\| \\\| \\\| \\\| \\\| \\\| \\\| \\\|
    \\\|---\\\|---\\\|---\\\|---\\\|---\\\|---\\\|---\\\|
    \\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|The Fraud Behind the MMR Scare\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|\\\\\\| \\\\\\|
    \\\\\\|---\\\\\\|
    \\\\\\|\\\\\\\| \\\\\\\|
    \\\\\\\|---\\\\\\\|
    \\\\\\\|BMJ Calls Wakefield's Study Linking MMR Vaccine to Autism 'Fraudulent'\\\\\\\|
    \\\\\\|
    \\\\\\|\\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\|
    \\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|
    \\\\\\\|![Brian Deer](Exported%20image%2020240808113939-0.jpeg)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|In a special [series of articles](http://www.bmj.com/content/342/bmj.d22.full) published by BMJ, Brian Deer exposes the data behind claims that launched a worldwide scare over the measles, mumps, and rubella vaccine, and reveals how the appearance of a link with autism was manufactured at a London medical school. In an [accompanying editorial](http://www.bmj.com/cgi/doi/10.1136/bmj.c7452), Fiona Godlee and colleagues say that Andrew Wakefield's article linking MMR vaccine and autism was based not on bad science but on a deliberate fraud. In addition, Brian Deer analyses the similarities between the MMR scare and the case of "Piltdown Man” in this [blog post](http://blogs.bmj.com/bmj/2011/01/06/brian-deer-piltdown-medicine-the-missing-link-between-mmr-and-autism/).\\\\\\\|
    \\\\\\|
    \\\\\\|BMJ Series of Articles\\\\\\|
    \\\\\\|
    \\\\\\|
    \\\\\\|
    \\\\\\|\\\\\\\| \\\\\\\|
    \\\\\\\|---\\\\\\\|
    \\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|PART 1:\\\\\\\\|
    \\\\\\\\|
    \\\\\\\\|[Secrets of the MMR Scare: How the case against the MMR vaccine was fixed](http://www.bmj.com/content/342/bmj.c5347.full)\\\\\\\\|
    \\\\\\\\|Published January 5, 2011\\\\\\\\|
    \\\\\\\\|By Brian Deer\\\\\\\\|
    \\\\\\\\|
    \\\\\\\\|In the first part of a special BMJ series, Brian Deer exposes the data behind claims that launched a worldwide scare over the measles, mumps, and rubella vaccine, and reveals how the appearance of a link with autism was manufactured at a London medical school.\\\\\\\\|
    \\\\\\\\|
    \\\\\\\\|Additional Information: [Tables contrasting the Wakefield et al paper with NHS records of patient diagnoses and histories](http://www.bmj.com/content/342/bmj.c5347/suppl/DC1)\\\\\\\\|
    \\\\\\|
    \\\\\\|\\\\\\\| \\\\\\\|
    \\\\\\\|---\\\\\\\|
    \\\\\\\|
    \\\\\\|
    \\\\\\|\\\\\\\| \\\\\\\|
    \\\\\\\|---\\\\\\\|
    \\\\\\\|PART 2:\\\\\\\|
    \\\\\\\|
    \\\\\\\|[Secrets of the MMR Scare: How the vaccine crisis was meant to make money](http://www.bmj.com/content/342/bmj.c5258.full)\\\\\\\|
    \\\\\\\|Published January 11, 2011\\\\\\\|
    \\\\\\\|By Brian Deer\\\\\\\|
    \\\\\\\|
    \\\\\\\|'MMR doctor' planned scheme to make millions from his health scare Andrew Wakefield, the disgraced doctor who claimed a link between MMR and autism, planned secret businesses intended to make huge sums of money, in Britain and America, from his now-discredited allegations. The Wakefield scheme is exposed today in the second part of a BMJ series of special reports, "Secrets of the MMR scare," by investigative journalist Brian Deer. Last week we revealed the scientific fraud behind the appearance of a link between the vaccine and autism. Now Deer follows the money.\\\\\\\|
    \\\\\\|
    \\\\\\|\\\\\\\| \\\\\\\|
    \\\\\\\|---\\\\\\\|
    \\\\\\\|
    \\\\\\|
    \\\\\\|\\\\\\\| \\\\\\\|
    \\\\\\\|---\\\\\\\|
    \\\\\\\|PART 3:\\\\\\\|
    \\\\\\\|
    \\\\\\\|[Secrets of the MMR Scare: The Lancet's 2 days to bury bad news](http://www.bmj.com/content/342/bmj.c7001.full)\\\\\\\|
    \\\\\\\|Published January 18, 2011\\\\\\\|
    \\\\\\\|By Brian Deer\\\\\\\|
    \\\\\\\|
    \\\\\\\|A series of denials and a failure to formally investigate allegations of misconduct in Andrew Wakefield's MMR research meant the public was misled about the credibility of the paper for six years. In the third and final part of a special BMJ series, "Secrets of the MMR scare", investigative journalist Brian Deer reveals how the medical establishment closed ranks to protect Wakefield after he raised concerns with the Lancet in 2004. Deer thought the editor, Richard Horton, would say that an investigation was needed. Instead he reports that "within 48 hours, and working with the paper's three senior authors, the journal was to publish 5000 words of denials, in statements, unretracted to this day."\\\\\\\|
    \\\\\\|
    \\\\\\|Accompanying BMJ Editorials\\\\\\|
    \\\\\\|
    \\\\\\|
    \\\\\\|
    \\\\\\|\\\\\\\| \\\\\\\|
    \\\\\\\|---\\\\\\\|
    \\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[Institutional and Editorial Misconduct in the MMR Scare](http://www.bmj.com/content/342/bmj.d378.full)\\\\\\\\|
    \\\\\\\\|Published January 19, 2011\\\\\\\\|
    \\\\\\\\|
    \\\\\\\\|[Assuring Research Integrity in the Wake of Wakefield](http://www.bmj.com/content/342/bmj.d2.full)\\\\\\\\|
    \\\\\\\\|Published January 18, 2011\\\\\\\\|
    \\\\\\\\|
    \\\\\\\\|[The Fraud Behind the MMR Scare](http://www.bmj.com/content/342/bmj.d22.full)\\\\\\\\|
    \\\\\\\\|Published January 6, 2011\\\\\\\\|
    \\\\\\\\|
    \\\\\\\\|[Wakefield’s Article Linking MMR Vaccine and Autism Was Fraudulent](http://www.bmj.com/content/342/bmj.c7452.full)\\\\\\\\|
    \\\\\\\\|Published January 5, 2011\\\\\\\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|IAC Related Resources\\\\|
    \\\\|
    \\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-1.gif)\\\\|Handouts: Talking with Parents about Vaccines\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-2.gif)\\\\|Vaccine Concerns: Autism\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-3.gif)\\\\|Vaccine Concerns: MMR\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-4.gif)\\\\|Communicating About Vaccines: Safety\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|Related News Coverage & Commentaries\\\\|
    \\\\|
    \\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-5.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[The Crash and Burn of an Autism Guru](http://www.nytimes.com/2011/04/24/magazine/mag-24Autism-t.html)\\\\\|
    \\\\\|Published April 20, 2011\\\\\|
    \\\\\|New York Times\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-6.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Autism Fears, Measles Spike among Minn. Somalis](http://minnesota.publicradio.org/display/web/2011/04/02/somali-autism-vaccines/)\\\\\|
    \\\\\|Published April 2, 2011\\\\\|
    \\\\\|Minnesota Public Radio\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-7.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[A Mother's Vaccine Journey](http://www.startribune.com/lifestyle/wellness/118686794.html?source=error)\\\\\|
    \\\\\|Published March 25, 2011\\\\\|
    \\\\\|StarTribune\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-8.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[News and Views: BMJ and Brian Deer Document MMR Scare](http://www.chop.edu/professionals/vaccine-healthcare-providers/news-views)\\\\\|
    \\\\\|Published February 2011\\\\\|
    \\\\\|Vaccine Education Center at The Children's Hospital of Philadelphia\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-9.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Issue Brief: MMR, Autism, and Wakefield – Responding to Vaccine-Hesitant Parents](http://www.kingcounty.gov/healthservices/health/communicable/providers/~/media/health/publichealth/documents/communicable/VaccineHesitantParentsIssueBrief.ashx)\\\\\|
    \\\\\|Published February 1, 2011\\\\\|
    \\\\\|Public Health – Seattle & King County\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-10.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Regaining Trust after Vaccine Threat Debunked](http://www.ama-assn.org/amednews/2011/01/24/prl20124.htm)\\\\\|
    \\\\\|Published January 24, 2011\\\\\|
    \\\\\|amednews\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-11.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Slightly More Than Half of Americans Say Vaccines Don't Cause Autism: Poll](http://health.usnews.com/health-news/family-health/brain-and-behavior/articles/2011/01/20/slightly-more-than-half-of-americans-say-vaccines-dont-cause-autism-poll_print.html)\\\\\|
    \\\\\|Published January 20, 2011\\\\\|
    \\\\\|HealthDay\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-12.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[UK Officials Failed to Probe Autism Scandal](http://www.msnbc.msn.com/id/41136409/ns/health-mental_health/)\\\\\|
    \\\\\|Published January 18, 2011\\\\\|
    \\\\\|MSNBC\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-13.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Why Salon's Autism Retraction Matters](http://blogs.forbes.com/matthewherper/2011/01/18/why-salons-autism-retraction-matters/)\\\\\|
    \\\\\|Published January 18, 2011\\\\\|
    \\\\\|Forbes: The Medicine Show\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-14.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Editorial: Autism Fraud](http://www.nytimes.com/2011/01/13/opinion/13thu2.html)\\\\\|
    \\\\\|Published January 12, 2011\\\\\|
    \\\\\|New York Times\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-15.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Report Alleges Money Motivated Doctor Behind Autism-Vaccine Scare](http://www.businessweek.com/lifestyle/content/healthday/648755.html)\\\\\|
    \\\\\|Published January 11, 2011\\\\\|
    \\\\\|HealthDay News\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-16.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Opinion by Dr. Paul A. Offit: Junk Science Isn't a Victimless Crime](http://online.wsj.com/article/SB10001424052748703779704576073744290909186.html)\\\\\|
    \\\\\|Published January 11, 2011\\\\\|
    \\\\\|Wall Street Journal\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-17.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[As The Facts Win Out, Vaccinations May Too](http://www.npr.org/2011/01/09/132735944/as-the-facts-win-out-vaccinations-may-too)\\\\\|
    \\\\\|Published January 9, 2011\\\\\|
    \\\\\|NPR\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-18.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Autism, Vaccines and Fraud: Q&A With Author Seth Mnookin](http://healthland.time.com/2011/01/10/autism-vaccines-and-fraud-qa-with-author-seth-mnookin/#ixzz1AjbHEiDC)\\\\\|
    \\\\\|Published January 9, 2011\\\\\|
    \\\\\|Time\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-19.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Review & Outlook: The Autism Vaccine Hoax](http://online.wsj.com/article/SB10001424052748704739504576067801877449500.html?mod=googlenews_wsj)\\\\\|
    \\\\\|Published January 8, 2011\\\\\|
    \\\\\|Wall Street Journal\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-20.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Report Linking Vaccine to Autism an Elaborate Fraud](http://www.usatoday.com/yourlife/health/medical/autism/2011-01-06-autism06_ST_N.htm?csp=ylf)\\\\\|
    \\\\\|Published January 6, 2011\\\\\|
    \\\\\|USA Today\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-21.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Medical Journal Says Autism Study Was a 'Fraud'](http://online.wsj.com/article/SB10001424052748704405704576064590742569026.html?mod=googlenews_wsj)\\\\\|
    \\\\\|Published January 5, 2011\\\\\|
    \\\\\|Wall Street Journal\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|
    \\\\|![Exported image](Exported%20image%2020240808113939-22.gif)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[Autism Researcher Faked Info in Study that Linked Vaccines and Autism, New Report Finds](http://www.nydailynews.com/news/national/2011/01/05/2011-01-05_bogus_info_in_study_on_autism_link.html)\\\\\|
    \\\\\|Published January 5, 2011\\\\\|
    \\\\\|New York Daily News\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|Related Videos\\\\|
    \\\\|
    \\\\|
    \\\\|

    \\\\| \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|---\\\\|
    \\\\|[![VIDEO: Paul Offit on the dangers of the anti-vaccine movement](Exported%20image%2020240808113939-23.jpeg)](http://www.medscape.com/viewarticle/741343)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[VIDEO:](http://www.medscape.com/viewarticle/741343) Paul Offit on the dangers of the anti-vaccine movement\\\\\|
    \\\\\|April 27, 2011\\\\\|
    \\\\\|Medscape (Log-in required)\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|---\\\\|
    \\\\|[![VIDEO: Interview with Bill Gates, he calls vaccine-autism link 'an absolute lie'](Exported%20image%2020240808113939-24.jpeg)](http://edition.cnn.com/2011/HEALTH/02/03/gupta.gates.vaccines.world.health/)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[VIDEO:](http://edition.cnn.com/2011/HEALTH/02/03/gupta.gates.vaccines.world.health/) Interview with Bill Gates, he calls vaccine-autism link 'an absolute lie'\\\\\|
    \\\\\|February 4, 2011\\\\\|
    \\\\\|CNN\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|---\\\\|
    \\\\|[![VIDEO: Paul A. Offit, MD, discusses autism and the MMR vaccine, revisited](Exported%20image%2020240808113939-25.jpeg)](http://www.medscape.com/viewarticle/735439)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[VIDEO:](http://www.medscape.com/viewarticle/735439) Paul A. Offit, MD, discusses autism and the MMR vaccine, revisited\\\\\|
    \\\\\|January 7, 2011\\\\\|
    \\\\\|Medscape (Log-in required)\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|---\\\\|
    \\\\|[![VIDEO: Dr. Bradley Peterson and Alison Singer explain why the false autism report has impacted health in a significant way](Exported%20image%2020240808113939-26.gif)](http://www.cnn.com/video/#/video/bestoftv/2011/01/07/exp.am.intv.chetry.autism.cnn)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[VIDEO:](http://www.cnn.com/video/#/video/bestoftv/2011/01/07/exp.am.intv.chetry.autism.cnn) Dr. Bradley Peterson and Alison Singer explain why the false autism report has impacted health in a significant way\\\\\|
    \\\\\|January 7, 2011\\\\\|
    \\\\\|CNN\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|---\\\\|
    \\\\|[![VIDEO: Cooper interviews Wakefield](Exported%20image%2020240808113939-27.jpeg)](http://ac360.blogs.cnn.com/2011/01/05/retracted-autism-study-an-elaborate-fraud-british-journal-finds/)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[VIDEO:](http://ac360.blogs.cnn.com/2011/01/05/retracted-autism-study-an-elaborate-fraud-british-journal-finds/) Anderson Cooper 360: Interview with Andrew Wakefield\\\\\|
    \\\\\|January 5, 2011\\\\\|
    \\\\\|CNN\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|---\\\\|
    \\\\|[![VIDEO: Retracted autism study an ‘elaborate fraud,’ British Journal finds](Exported%20image%2020240808113939-28.jpeg)](http://edition.cnn.com/2011/HEALTH/01/05/autism.vaccines/index.html)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[VIDEO:](http://edition.cnn.com/2011/HEALTH/01/05/autism.vaccines/index.html) Retracted autism study an 'elaborate fraud,' British Journal finds\\\\\|
    \\\\\|January 5, 2011\\\\\|
    \\\\\|CNN\\\\\|

    \\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|
    \\\\|

    \\\\| \\\\| \\\\| \\\\|
    \\\\|---\\\\|---\\\\|---\\\\|
    \\\\|[![VIDEO: Vaccines for Children Proven Not to Cause Autism](Exported%20image%2020240808113939-29.jpeg)](http://abcnews.go.com/WNT/video/vaccines-children-proven-autism-debunked-fraud-children-parents-health-12550329)\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|[VIDEO:](http://abcnews.go.com/WNT/video/vaccines-children-proven-autism-debunked-fraud-children-parents-health-12550329) Vaccines for Children Proven Not to Cause Autism\\\\\|
    \\\\\|January 5, 2011\\\\\|
    \\\\\|ABC News\\\\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|

    \\\| \\\| \\\| \\\|
    \\\|---\\\|---\\\|---\\\|
    \\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|This page was reviewed on April 25, 2011\\\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|

    \\\| \\\|
    \\\|---\\\|
    \\\|\\\\| \\\\|
    \\\\|---\\\\|
    \\\\|
    \\\\|
    \\\\|\\\\\| \\\\\|
    \\\\\|---\\\\\|
    \\\\\|\\\\\\| \\\\\\|
    \\\\\\|---\\\\\\|
    \\\\\\|
    \\\\\\|\\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\|
    \\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|
    \\\\\\\|[About IAC](http://www.immunize.org/aboutus)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|•\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[Contact Us](http://www.immunize.org/aboutus/contactus.asp)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|•\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[Press Room](http://www.immunize.org/press)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|•\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[Cite IAC](http://www.immunize.org/citeiac)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|•\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[Link to IAC](http://www.immunize.org/linkiac)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|•\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[A-Z Index](http://www.immunize.org/a-z)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|•\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[Site Map](http://www.immunize.org/sitemap)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|•\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[Disclaimer](http://www.immunize.org/iacadmin/disclaimer.asp)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|•\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[Privacy](http://www.immunize.org/iacadmin/privacy.asp)\\\\\\\|
    \\\\\\|
    \\\\\\|Immunization Action Coalition  •  Saint Paul, MN\\\\\\|
    \\\\\\|
    \\\\\\|tel 651-647-9009  •  fax 651-647-9131\\\\\\|
    \\\\\\|
    \\\\\\|email [admin@immunize.org](http://www.immunize.org/bmj-deer-mmr-wakefield/mailto:admin@immunize.org)\\\\\\|
    \\\\\\|
    \\\\\\|\\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\| \\\\\\\|
    \\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|---\\\\\\\|
    \\\\\\\|[![Exported image](Exported%20image%2020240808113939-30.jpeg)](http://www.facebook.com/VaccineInformation)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|•\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[![Exported image](Exported%20image%2020240808113939-31.jpeg)](https://twitter.com/intent/follow?original_referer=http%3A%2F%2Fplatform.twitter.com%2Fwidgets%2Ffollow_button.1379634856.html&partner=undefined®ion=follow_link&screen_name=ImmunizeAction&tw_p=followbutton&variant=2.0)\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|•\\\\\\\|\\\\\\\\| \\\\\\\\|
    \\\\\\\\|---\\\\\\\\|
    \\\\\\\\|[![Exported image](Exported%20image%2020240808113939-32.jpeg)](http://www.youtube.com/user/ImmunizationAction/)\\\\\\\|
    \\\\\\|
    \\\\|\\\\\| \\\\\| \\\\\| \\\\\|
    \\\\\|---\\\\\|---\\\\\|---\\\\\|
    \\\\\|\\\\\\| \\\\\\|
    \\\\\\|---\\\\\\|
    \\\\\\|This website is supported in part by a cooperative agreement from the National Center for Immunization and Respiratory Diseases (Grant No. 5U38IP000290) at the Centers for Disease Control and Prevention (CDC) in Atlanta, GA. The website content is the sole responsibility of IAC and does not necessarily represent the official views of CDC.\\\\\|\\\\\\| \\\\\\|
    \\\\\\|---\\\\\\|
    \\\\\\|
    \\\\|
    \\\\||== \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Vaccinations/The Harm of Skipping Vaccinations or Delaying.md b/OneNote/Ben's Notebook/Topical studies/Vaccinations/The Harm of Skipping Vaccinations or Delaying.md new file mode 100644 index 0000000..c723d0a --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Vaccinations/The Harm of Skipping Vaccinations or Delaying.md @@ -0,0 +1,23 @@ +| +| +==Tags: #pro-vaccination #autism #flu-vaccine #social-implications== + +# **The Harm of Skipping Vaccinations or Delaying** + +There are many reasons parents give for delaying a vaccination, from "My baby cries when she gets the shot," to "My child is too young to get so many vaccines." More important than all of these excuses is one simple fact: A child's immune system is more vulnerable without vaccinations. And if it weren't for vaccinations, many children would become crippled or die from the severity of diseases such as measles, pertussis and **Hib****. See** ["The Diseases Vaccines Prevent and How"](http://www.health.ny.gov/prevention/immunization/vaccine_preventable_diseases.htm) for more information. +We live in an increasingly global world, with increased risks around every corner. Travelers entering into New York create an even greater risk of exposure. On a regular basis there is a new report regarding a disease outbreak somewhere in the world - including in the United States and New York State. The Centers for Disease Control and Prevention [reports outbreaks around the world and provides health information for travel to more than 200 international destinations. (cdc.gov)](http://wwwnc.cdc.gov/travel/) From mumps, to pertussis to the measles, diseases once thought to be eradicated are coming back because people are not being vaccinated as they once were. If you think tears from a needle are hard to watch, imagine the suffering your child will experience if he or she contracts a serious disease that could have been prevented. +While misinformation in the media has led many parents to delay vaccinations as a result of either Dr. Andrew Wakefield's false claims about autism or [Dr. Bob's Alternative Schedule (aap.org)](http://practice.aap.org/content.aspx?aid=2680), many diseases have begun to reemerge among children around the world. Don't let your child become a statistic -- make sure they get all the recommended vaccinations. And if you're worried about autism, visit ["The Truth About Autism."](http://www.health.ny.gov/prevention/immunization/vaccine_safety/truth_about_autism.htm) + +## **Medical Implications of Not Getting Vaccinated** + +The threat of death by disease isn't the only medical consequence of skipping vaccinations. An unvaccinated child faces lifelong differences that could potentially put him or her at risk. Every time you call 911, ride in an ambulance, go to the doctor or visit the hospital emergency room, you must alert medical personnel of your child's vaccination status so he or she receives distinctive treatment. Because unvaccinated children can require treatment that is out of the ordinary, medical staff may be less familiar, and less experienced, with the procedures required to appropriately treat your child. +Women who are pregnant but not vaccinated can be vulnerable to diseases that may complicate their pregnancy. A pregnant woman who contracts rubella in the first trimester may have a baby with congenital rubella syndrome (CRS), which can cause heart defects, developmental delays and deafness. +People who choose not to vaccinate their children also put others at risk if their child isn't vaccinated and becomes ill. Special groups of people cannot be vaccinated, including those with compromised immune systems (e.g. those with leukemia or other cancers). These people rely on the general public being vaccinated so their risk of exposure is reduced. + +## **Social Implications of Not Getting Vaccinated** + +There are also social implications of not vaccinating your child -- from exclusion to quarantine. If sick or exposed to disease, your child may need to be isolated from others, including family. If there is an outbreak in your community, you may be asked to take your child out of school and other organized activities, causing your child to miss school and special events. Your child's illness or inability to go about their daily activities also may impact your work and household income. For more information on vaccination requirements for schools in the state of New York, see [New York State Immunization Requirements for School Entrance/Attendance](http://www.health.ny.gov/publications/2370.pdf) (PDF, 71KB, 2pg.). + +## **Importance of Receiving An Annual Flu Vaccine** + +Everyone 6 months and older should get a seasonal flu vaccine every year. It's important to reiterate that every year the flu remains a threat, and every year children still die as a result of having the flu. One of those children was [Joseph Marotta](http://www.health.ny.gov/prevention/immunization/vaccine_safety/). At 5 years old, Joseph contracted the flu. Less than 10 days after contracting the flu, Joseph died. His parents, along with other members of [Families Fighting Flu (familiesfightingflu.org)](http://www.familiesfightingflu.org/member-families/the-marotta-family/), are strong advocates for annual flu vaccines and encourage all families to get vaccinated. It's important that everyone 6 months and older receives an annual flu vaccine. Every year a flu vaccine is skipped, your child is at risk. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Vaccinations/Topics to research further.md b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Topics to research further.md new file mode 100644 index 0000000..6f5b480 --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Topics to research further.md @@ -0,0 +1,6 @@ +- Differences in symptoms between regular mercury poisoning and autism or other supposed vaccine-related side effects +- Capacity of baby’s immune system +- Are the following sources reliable? +- + - JAMA + - Immunize.org / Immunization Action Coalition \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Vaccinations/Untitled note 1.md b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Untitled note 1.md new file mode 100644 index 0000000..b3b7406 --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Untitled note 1.md @@ -0,0 +1,5 @@ +| +| +==Tags: #pro-vaccination #autism #thimerosal #research-summary #research-list #andrew-wakefield== + +![[p4028.pdf]] \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Topical studies/Vaccinations/Untitled note.md b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Untitled note.md new file mode 100644 index 0000000..b1fe4fe --- /dev/null +++ b/OneNote/Ben's Notebook/Topical studies/Vaccinations/Untitled note.md @@ -0,0 +1,5 @@ +| +| +==Tags: #pro-vaccination #autism #thimerosal #mmr== + +![[p2068.pdf]] \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Day One Review.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Day One Review.md new file mode 100644 index 0000000..a205b43 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Day One Review.md @@ -0,0 +1,11 @@ +**Review of yesterday** +As developers, we have promoted a view of the world that is really tech-centric.  This has caused recruiters to look for tech-centric skills _only_ and ignore developers that have spent 20 years in insurance, but know the business perfectly. **Exercise** +How to convince for change back at work + +- No appeals to authority (Udi said do this!).  Usually ends up with other appealing to other authorities and you don't get anywhere. +- No attacks on particular technologies (web api sucks!).  This just ends with hurt feelings (the guy who just finished a web api project). +- There is a LOT of business reason to stay with the way things are!  It's hard to convince a business stakeholder to up-end current practices and fix problems with new technologies when fixes can just as well be put into place with known technologies and by expanding what we're already doing. +- Keep in mind: to convince, we need to prove we've thought through the pros and cons of the messaging pattern approach and thought about the impacts on reliability, scalability, performance, etc and still need to go this route. +- Udi doesn't recommend using messaging on a brand new product, out of the gate. +- When making significant change to how a system works (implement messaging as a small replacement to a piece of the system), leave the old way in place and have a configurable value that switches between the two.  This is a safety net for the stakeholder/decision maker to go back to the old way if anything goes wrong. + EasyNetQ ( [https://github.com/EasyNetQ/EasyNetQ](https://github.com/EasyNetQ/EasyNetQ)) - nice little library for basic messaging on top of RabbitMQ. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Day Three Review.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Day Three Review.md new file mode 100644 index 0000000..ea57491 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Day Three Review.md @@ -0,0 +1 @@ +How to communicate back to the organization?  This is especially when the organization is already using SOA terms (like service) for other things (like REST or WCF services).  You can slowly introduce SOA by using new terms (bounded context, business capability, etc) that are basically the same things that SOA talks about but are different to the organization and help get everyone thinking in a different way. If I have two things that I'm not sure about splitting up or combining together, will I be better off combining them or splitting them?  When we come across a situation like this, it's often an indicator that we are slicing up the boundaries incorrectly.  We need to think of everything in 3D terms, looking for the right angle to slice the pieces where the boundaries make most sense.  When trying to find the boundaries, it's usually the case that we are totally confused as we look at how to split everything up (find the boundaries) until we find the right angle and then everything has a certain obviousness to it.  Every industry has it's own angle of attack to decompose the elements of the business into service.  If we figure it out in one industry, that same angle won't necessarily work in another industry. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Homework 1 Overview.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Homework 1 Overview.md new file mode 100644 index 0000000..02ac7c1 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Homework 1 Overview.md @@ -0,0 +1,5 @@ +System = unit of deployment +Service = logical unit Mistake we've made as an industry: team, project, code base are all one. Services can be reused across systems.  In the room availability service for a hotel, components could be reused in the website, guest kiosks and front desk rich clients.  But, the component that searches the room availability in each system is all in the same service. _Branding Service_ +This service can have view models that collect the service components into a view to display in the chosen UI technology. Anything that's communicating the look and feel of a UI is part of the branding service. _IT/Ops Integration Service_ +Responsible for integration with third parties (credit card providers, etc).  It is a technocratic component.  It should do the integration, but not be responsible for "now the credit card should be charged".  There is the act of charging the card and the act of deciding now is the time to charge it. This is the ONLY type of service that is allowed to ask other services for information. This type of integration service deals with the how and not the why or when. Lots of events passing data back and forth between services can be an indication that your service boundaries are wrong--especially if they are passing data that goes beyond identifiers. Finding service boundaries is all about identifying the volatility of the domain.  Encapsulate things that will change into service boundaries. **IT/Ops Integration** +Integration needs calling out to third-party systems or when third-party systems are going to be calling us.  Purpose is to collect data from various services to surface that up as a query to a third-party. Recommend doing such integration without remote calls.  We take DLLs from the various services and deploy them in together in the IT/Ops integration thing. IT/Ops integration is for integration with something you _don't_ control. IT/Ops integration also owns authentication, authorization, etc. Rarely does pub/sub with other services.  It _could_ subscribe to something like an HR service that hires/fires employees so that it would know to add or remove a user's access. The place to make remote calls within a service boundary and NOT between service boundaries. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Homework 2.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Homework 2.md new file mode 100644 index 0000000..faa07b6 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Homework 2.md @@ -0,0 +1,19 @@ +**Solutions Notes** + +- The saga IS the domain model, so we can't make request-response calls from it of any kind (can't go get data) +- You start the saga at account creation +- The saga "never" ends (unless account is deleted, etc) +- The sage completes when it receives events that end the account +- The click messages come into the saga with a click sequence number.  If the message currently being processed is not the next message (last click sequence is stored in the saga data) then we throw an exception and that message is retried later (eventually, hopefully, after the actual next message is processed). +- Everything after that is easy +- We have a 1 week timeout and a 2 week timeout for each purchase item command to know to decrement the 1 week running balance and 2 week running balance by the purchase amount to keep our week-based balances always up-to-date. + + +**Buy item (in-app purchase)** +Don't worry about mobile bit. Idea is to reward people to buy more quickly to encourage them to buy more quickly. Concern is that users are clicking really quickly.  We've scaled out the handling over several machines.   We used to do it with a traditional domain model.  We did a select for orders over the last two weeks, then calculated the discount.  Now we multi-thread it and two clicks might miss each other and a discount isn't applied.   We need a model that will give users discounts that they deserve, but not give them discounts they don't deserve! Hint: saga!   + +- Multiple sagas? +- What starts the sagas? +- What happens when user runs out of funds? +- What ends the saga? +- What are the timeouts? \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 1 - Distributed Systems Theory.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 1 - Distributed Systems Theory.md new file mode 100644 index 0000000..4c4a708 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 1 - Distributed Systems Theory.md @@ -0,0 +1,86 @@ +Naming things: important! +Application - older term, a single executable running on single machine.  Single source of input (user), doesn't talk to anything else. +System - made up of multiple executable elements, running on one or more machines.  Connectivity is inherit to their structure.   Distributed systems come in when there are multiple machines.  Multiple sources of information.  Multiple users. Each executable element of a system can't be thought of as an application.  Because: has to know element of connectivity.  Lots of modern development aims to make connected executables look like a single application. ORMs make DB connections look like in-memory operations, for example.  Truth is, we can never get away from the reality of connected components. Web apps are systems.  Client talking to server.  Server talking to database.  So on. 8 fallacies of distributed computing + +1. The network is reliable +2. Latency isn't a problem +3. Bandwidth isn't a problem +4. The network is secure +5. The topology won't change +6. The administrator will know what to do +7. Transport cost isn't a problem +8. The network is homogeneous + +Additional: + +1. The system is atomic/monolithic +2. The system is finished +3. Business logic can and should be centralized + Historically: applications, to applications sharing files, to applications sharing databases, to growing distributed executables. **#1 The network is reliable** +We _know_ the network is reliable.  But we still code that way.      var svc = new MyService(); +     var result = svc.Process(data); You get an HttpTimeoutException--how do you know what happened? Did the server get the data and the result timed out?  Did the request time out?  Can we ask a query API?  What if it's cached and the cache doesn't know about the saved data yet? The network is unreliable.  Therefore, when we write code like this, our code is fundamentally unreliable. Many times, we just log the error and move on.  As if to say, it's not our responsibility to fix the problem.  We are still in the mindset of application (rather than system) programming. Solutions + +- Retry & ack, store & forward, transactions (don't roll your own, too many edge cases!) +- Reliable messaging infrastructure (MSMQ, SQL server service broker) + Message queuing: no request/response synchronous model.  No concept of "invoke method and get response immediately". Message queuing forces the question: do we really need a remote call here?  It forces the systems programming thinking to get us out of the application programming mud. Message queuing _does_ make our code more complex because of the removal of the request/response model.  But leads to the forcing of making the above thinking paradigm shift. **#2 Latency isn't a problem** + = time to cross the network is one direction Scaled latency from one CPU cycle to memory to disk access to a network request is 1 second compared to 19 years! We've been spoiled by Moore's Law (just wait until next year and we'll have twice as fast machines) which is no longer holding. Lazy-loading: the comeback of the bad old days of remote OO where every property was a remote call.  Read the old books!  Bad ideas seem to keep coming around with each new generation of programmers. Solutions + +- Don't cross the network if you don't have to +- Inter-object chit-chat shouldn't cross the network +- If you have to cross the network, take all the data you might need with you + **#3 Bandwidth isn't a problem** += width of the pipe Bandwidth keeps growing, but the size of data is growing faster.  It hasn't followed Moore's Law.  Often seen in ORMs eagerly fetching too much data.  Bandwidth is usually poorly understood by developers. Gigabit ethernet = 128 Megabytes/s +TCP = 40% utilization +... => get to just 25 MB/s at the application layer Solution + +- Move time-critical data to separate networks +- Can't eagerly fetch everything/can't lazy load everything +- Might need to have more than one domain model to resolve forces of bandwidth and latency +- Separate query APIs (not time sensitive, but bandwidth heavy) from command APIs (time sensitive but not bandwidth heavy) so that we can separate the networks and allocate bandwidth appropriately + **#4 The network is secure** +Unless you're on a separate network that will never, ever be connection to anything else...  End users are biggest sources of viruses, trojans, etc.  You can't be 100% safe from everything. Solution + +- Perform threat model analysis +- Balance costs against risks +- Most importantly, talk about it.  Include PR and legal. + **#5 The topology won't change** +Unless a server goes down and is replaced, OR is moved to a different subnet, OR clients wirelessly connect and disconnect. What will happen to the system when those hard coded/config-file values change? Solution + +- Don't hard-code addresses +- Consider using resilient protocols (multicast) +- Discovery mechanisms are cool, but hard to get right (what happens if you turn on the system and pieces can't find each other??) +- Will your system be able to maintain response-time requirements when this happens? + **#6 The admin will know what to do** +Possible in small networks.  Until...they get promoted.  Their replacement probably won't know what to do.  If there are multiple admins, rolling out various upgrades and patches, will everything grind to a halt? Conway's Law = software structure of a system will come to mirror the people structure (organizational) of the ones writing the system. Solutions + +- Consider how to pinpoint problems in production (logging can helpful, too much can be harmful) +- Build systems to allow running multiple versions in parallel +- Enable admins to take pieces of the system down without affecting the rest of the system (queuing helps a lot) + **#7 Transport cost isn't a problem** +Serialization and deserialization can be an implicit cost to crossing a network, for example.  Cloud environments are helpful because they actually associate a hard cost (bill at the end of the month) to your bad design decisions.  On-premise installations are much harder to see these things on.  Recommend cloud implementations for clients to help surface this kind of thing. Solutions + +- Don't cross network if you don't have to +- Don't wait until you're two weeks before going live to find this out! + **#8 The network is homogeneous** +It used to be easier: .NET/Java integrations were pretty good.  Now we have python, ruby, PHP, node.js, etc that are tougher to get together.  Networks are more heterogeneous today than in recent times (10 years ago). Semantic interoperability will always be hard, budget for it. You're probably going to get business interoperability boundaries wrong!  When real users start getting into the system, you'll need to make changes.   _Budget for it._ No real solutions for this one! **#9 The system is atomic** +atomic = single, indivisible unit.  No one sets out to make a big ball of mud.  But, give most any system 5-6 years and it will turn into one.  These aren't compiler problems--it's integration problems between pieces of the system. Reasons this happens + +- Coupling through the database (gets worse with XML in db).  Someone is going to change the schema and because no one knows you're depending on the schema, it will break everything. +- System wasn't designed to scale out to multiple machines + Think of a web application writing to a database and a reporting system reading from it.  These two systems are tightly coupled through the database. Solutions + +- Internal loose coupling +- Modularize +- Design for scaling out in advance + **#10 The system is finished** +The date when a system goes live is usually not when it is actually finished.  Over time, organizations spend more and more on maintaining a system until they get to the point where a rewrite decision is made.  The process just starts all over again.  The cycle has to be broken to actually design the new system correctly from the beginning. Solution +Software is not meant to be "finished".  Unlike a building that gets done and then is maintained, software building and maintaining isn't any different.  The maintenance can be just as much change as a new feature before the software is "done".  Nothing rots!  Maintenance is a misnomer in that sense.  You never have to rebuild a wall because it's worn out.  You never have to repair pipes because they rust. In software maintenance mode, the amount of code that can break only increases.  The users using the system have valuable data that you have to keep.  Maintenance is the harder part of code development. The myth of the rewrite: if _we_ could go back and make all the _right_ decisions, everything would be better. The division in thought of creation and maintenance is based on the myth of the system being finished.  A system is only truly finished when no one needs the system anymore.  The project metaphor is bad.  A project is not meant to be complete. Think of it as a product instead of a project.  A product is meant to be improved, released again with improvements, etc.  The expectation is that the product will evolve and improve. Rewrites are not healthy.  They essentially say, the last 5 years of development are going to be thrown away.  Scope creep is a big problem with a rewrite project.  "We'll do everything the old system did and now I want everything else I've been waiting for!" **#11 Business logic can and should be centralized** +"First name should be less than 40 chars" - enforce in UI? BL? DB? Everywhere? +What if the business logic changes?? +Wouldn't it be great to put it in one place and be done with it?! What is the real likelihood that a business rule with change?  We see somewhat of a bell-curve of the probability that a business rule with change.  The longer the system is live, the less likely it is that a rule will change. _The probability of change is different for different business rules._ + +Solution +Logic will be physically distributed.  We can still centralize in the development view (more reading: 4+1 views of software architecture). Tag source control for feature implemented.  When changing a business rule, we can look at the tag and know exactly what code is related to that requirement by looking at source control. Requires us to be much more deliberate and disciplined with using source control and using it as not just a tool, but part of our architecture. The point is more that we can solve some issues like this in a different dimension (source control) than we would normally think (reorganize the code to have centralized business rule code). **Summary** +Best practices have not caught up with best thinking. +Technology cannot solve all problems. +Adding hardware doesn't necessarily help. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 10 - CommandQuery Responsibility Segregation.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 10 - CommandQuery Responsibility Segregation.md new file mode 100644 index 0000000..5e8b546 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 10 - CommandQuery Responsibility Segregation.md @@ -0,0 +1,57 @@ +CQRS does NOT change service boundaries or any other implementation or approach.  You will be doing CQRS inside of a service boundary. If you have a business component, CQRS will happen entirely within a BC. **History** +Why did it come about?  Multi-user collaborative systems.  Users end up seeing stale data.  The problem comes when the users start using their stale data to make decisions about how to change data.  In a collaborative environment, we might end up overwriting each other's changes. Collaboration is one situation that traditional architectures didn't handle really well.  The assumption was optimistic concurrency. A big focus of CQRS is the data itself and it's accuracy, along with performance.  How quickly can we keep the users up-to-date? **Collaborative Data** +How much data in an average system is collaborative?  Not usually too much.  On an Amazon page for a book you might have: + +- Inventory (multiple users update stock numbers by buying books, shipments increasing stock) +- Ratings (multiple users submitting ratings) + In a traditional layered system, you might cache data to query against and let updates/adds/deletes go all the way through to the DB.  This is kinda of CQRS.  But, in the end, you don't solve the contention at the database when two updates come at once or very close proximity. + +- For a lot of data, it just fits much better to think of a single updater.  Think of the price for a book, or it's title.  You most likely will have one product manager updating those kinds of data one at a time. + Whatever the simple thing is to do, do that! **CQRS Theory** +Be up-front about data staleness +It's important to be up-front about the staleness of your data.  A bank might say "your balance is accurate as of 10 minutes ago".  Many systems are not up-front like that with how stale data is. Keep queries simple +UI -> persistent view model, query only between them. +For each view in the UI, have a view/table in the DB (select * from my table where id = @id) +  +KEEP IT SIMPLE Be careful of data duplication.  Another signal of service boundaries being off. +Duplication => logical structure that has a great deal of overlap with another logical structure +Replication => moving data from one physical place to another physical place.  Moving data, same data in two different places, but part of the same logical structure. +Data duplication _can_ be ok, but only with super, super stable business concepts.  If you find one, you should be suspect of it. Deployment and Security + +- Deploy persistent view model DB to the web tier (only SELECT is permitted) +- + - Don't have to go through firewall - faster + - Don't use the term DB, use the word cache + - Document DB is a good choice because you usually don't need any relationships + - If you find yourself adding a cache on top of persistent view model, you're probably making it too complex +- Role based security +- + - Roles probably map to service boundaries, so the data for a particular role probably comes from a different table + - This will simplify role-based security +- Just as secure as in-memory caches, if not more so + + Use for preliminary validation + +- When submitting commands, we need to perform validation +- Because the persistent view model is close, it's fast for validation +- Uniqueness: we can do a quick check in the PVM to check if a username is already taken.  This wouldn't work in the rare case of a race condition: different users signing up at the same time with the same username. +- Related entity existence: address validation, existence of street name +- -> results in few commands being rejected + As engineers we are often looking for the single solution that will solve all of our problems.  That never happens.  In solving scalability issues, we can usually follow the 80-20 rule: a solution that solves 80% of the problem.   **Commands** +Validation and business rules are often used interchangeably.  What we mean with validation is:  + +- is the input potentially good? +- structured correctly? +- ranges, lengths, etc? + Business rules: + +- should we do this? +- based on current system state + When you have if statements in your business logic that is operating on data in your database, you can still end up with data that is invalid.  For example, if someone adds a book to their shopping cart and then 2 minutes later that product is marked to no longer be sold, then the item is still in the shopping cart.  Even though the business rule said we can't add products we don't sell anymore to shopping carts, the shopping cart addition action passed before the flag was set. Business rules are foiled by race conditions. **Should we do what the user asked?** +We need the system to remain consistent, so we need to define transaction boundaries.   Sometimes these transaction boundaries are hard to find.   For a grid of orders that allows in-place editing, do we have a transaction for each field edited, for each row edited or for the entire edited data set as a whole? We are not capturing user-intent very well.  In a traditional UI, the checkbox doesn't capture what the user wants to do.  When a user checks three boxes to pick three seats next to each other at a movie theater, we are not capturing the fact that all the user wants is three seats next to each other, maybe in a certain general section.   Solution: look at user intent you want to capture and model that directly.  Instead of allowing a user to select the exact seats in the exact section, we gather the intent of the user to have 3 seats in a certain section and we let the system pick the best fit for the request.  This then also allows the request to be asynchronous.  We can tell the user the seats they got and allow them to cancel if they don't like the choice. CQRS is more of an analysis tool that can reveal this type of thing instead of just a magic tool that will solve problems. There is no longer a need to show an actual status of seating.  So, the query model is simply a static image of the stadium and it's sections.  The command model is then the revised version of capturing user intent, letting the system find the seats and then notifying the user about it. Do we need to preserve this idea of first-come, first serve?  When it comes to collaborative systems online, the great thing is that no one knows who was first in line. **What is a good command?** +You want to be able to structure your commands to be able to do something like: + +- "Thank you.  Your confirmation email is on its way." +- Just fake it in the UI (amazon shopping cart example) + You need to think about how to design away the technical contention. When you're in a collaborative environment, you will see more command-centric types of concepts that capture user intent.  When not in a collaborative setting, you will see more "update entity x in such a way" level and you know you're doing CRUD.  When in that situation, stick with synchronous, UI to DB setups and scale out the DB. **How to use CQRS** +CQRS is too much complexity to apply to an ENTIRE system.  It should be applied to only the components that NEED it. CRUD operations outside of a collaborative environment simply don't need the complexity that CQRS requires and, in fact, that complexity will harm the system. In a collaborative domain, you expect high contention.  This might change your data model and persistence model. The types of systems were are creating today do not play well with abstractions.  So, even though we are so good at abstracting as we're designing code these days, it fails when we come to try to apply it to enterprise software.  We need, rather, to find the simplist solution that solves the actual problem.  We shouldn't try, for example, to build a document database on top of a relational database.  We shouldn't try to build a relational database in a document DB, etc. Start with data-level modeling!!  CQRS is a set of questions you ask that drive the design rather than be a set of answers itself.  It's an analysis methodology more than a tool to find a solution. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 11 - Scalability and Flexibility, Monitoring and Management.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 11 - Scalability and Flexibility, Monitoring and Management.md new file mode 100644 index 0000000..fe2c542 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 11 - Scalability and Flexibility, Monitoring and Management.md @@ -0,0 +1,28 @@ +**Naming** +Naming is challenging.  When you have web1, web2 and web3 and db1, then everything's pretty easy to keep track of.  When you get to bigger systems, naming becomes more important. Usually naming follows the service name.  When you pull out an Autonomous Component, naming is even more important.  Commonly, you use a dot notation of Service.BusinessComponent.AutonomousComponent.  But how do you name the AC?  Using the main message that is processes is helpful.   It is also helpful to prepend the name of the company too.  So, the name becomes Company.Service.BC.AC. **Monitoring Queue-Based Systems** +Error queue notifications go to admin to signal problems. Identify bottlenecks: well-named queues tell you where the bottlenecks are.  Important are: + +- number of messages +- throughput +- These two numbers above give you the wait time of each message. NServiceBus calls this the CriticalTime of and endpoint. +- The context of the critical time is essential.  If we're generating PDFs, then 2 seconds is awesome.  If you're running a high-frequency trading system, then 2 second wait times will run you out of business. + **Scalability** +Traditional competing consumer: + +- one queue +- more than one AC feeding off of queue + You don't scale out an entire system, but individual ACs.  You know to scale out when you see the AC continually violating or close to violating SLA. **Virtualization - Part 1** +Almost all production environments are virtualized.  We can connect our monitoring environment and our scaling processes.  We can connect to our SLA--as it's reaching its limit, we can scale out an AC. **Fault Tolerance - high level** +- Any number of active backups +- Automatic load balancing +- By hosting in a virtual environment, our data (database, queue storage, etc) is all stored on a SAN.  The SAN has snapshots and is backed up.  We have a high degree of fault tolerance **Versioning** +Make updates backwards compatible. +Test them. +Start at the back of the system and gradually move forward.  Update the database, then the server, then the messages, then the client. You can script rollouts. + +- CI server builds new version +- CI installs v2 next to v1 +- CI checks for error message in the queue +- CI finds some and rolls back v2 and notifies developer + +This gives developers very safe exposure to the prod environment for their new code. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 12 - Long Running Processes.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 12 - Long Running Processes.md new file mode 100644 index 0000000..ac3f3d5 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 12 - Long Running Processes.md @@ -0,0 +1 @@ +What is a process? A set of activities in sequence triggered by internal and external triggers.  Long-running processes are multi-trigger processes.  They have state to keep. The fact that it's a "long-running process" does not mean it has to take 5 minutes or an hours or five days.  The issue is more the multi-trigger effect and the need for keeping state between the two triggers.  We don't know when the second trigger (or any subsequent) will come. The early work for long-running processes was done in the 80s and 90s for long-lived transactions.  The answer to solving this issue was to break up the transaction into several small, short-lived transactions. The best, most reliable way to resolve race conditions is through retries. Orchestration is not a service by itself. Unit testing sagas is important. Sagas don't have to end!  When a saga is not "running" it's just sitting in the database.  So what?! A saga that "runs forever" is just a record in the database.  Moore's Law is in our favor in the case of storage--it's increasing by leaps and bounds and getting cheaper all the time. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 13 - Domain Models.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 13 - Domain Models.md new file mode 100644 index 0000000..32c38d5 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 13 - Domain Models.md @@ -0,0 +1,4 @@ +What domain models are not! +What problem were domain models there to solve?  Back in the day, we had layered architecture with a business layer.  The business rules (first name shouldn't be longer than 10 characters) were spread all over the place. Patterns of Enterprise Application Architecture was written and everyone got excited about the Domain Model pattern.  Domain Model pattern was contrasted against Active Record, Transaction Script, etc.  Domain Model _sounded_ so great.  Who wouldn't want a domain model in their system?  Just like agile.  Who would _not_ want to be agile?? A domain model follows the rule of component driven development.  They expose properties, methods and events.  There are clear boundaries to a component. Context of domain model was to be "if you have complicated and ever-changing business rules".  Meaning...this pattern was not meant to be used for everything!!!  Not meant to manage all of data access. Domain model is supposed to be independent of all other concerns.  For example, UI concerns should not enter in.  DB concerns also.  Communications also!  They are only simple, stand-alone components.  No direct or indirect coupling.  They are to made up of POCOs. Domain Models are NOT entity relationships!  Domain model is supposed to handle complex and ever-changing rule.  Products always have names.  Orders always have products.  Customers always names and phone numbers, etc.  If we have those types of objects we don't have a domain model!  This was its problem, the name.  It made people think that just about any collection of objects is a domain model.  These types of classes ended up getting all sorts of reasons to change, violating the single-responsibility principle. Unit tests became  overly-familiar with the internals of the domain model and kept breaking. **When you are following the domain model appropriately...** +You could deploy it anywhere. +You can have more than one domain model!  Nowhere does the definition say you have to have a single model that covers _everything_ in your domain! Logic in the DB can fit a specific set of problem.  Specifically when you need to do operations on huge amounts of data.  The DB handles that best.  Why are we moving 20GB of data to a server to process 20KB of logic and then just put the 20GB back into the database? You CAN mix patterns.  You may need a domain model pattern here, a transaction script pattern there and the active record pattern somewhere else. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 14 - Concurrency Models.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 14 - Concurrency Models.md new file mode 100644 index 0000000..da72317 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 14 - Concurrency Models.md @@ -0,0 +1,22 @@ +Optimistic (first or last one wins) +Pessimistic (first person locks it) +Realistic - what we want is something that is able to lock things for the right amount of granularity. One difficulty: multi-table spanning transactions.  Databases support MVCC (multi version concurrency control).  If you turn this on, expect to see exceptions in your logs.  This is a clue that you have some collaboration going on!  You might be able to redesign your business logic to solve your collaboration issues. Therefore, traditional entity-relationship models are dangerous (you'll be operating on more than one entity at a time). How to get to realistic concurrency? +As part of transactions, you get one single domain object.  You call methods to update its state.  If successful, it updates its own state.  This applies to entities that can be operated on outside of a single transaction. This is a simple rule, but very difficult to follow.  However, it is much easier to follow if you have split things up into good service boundaries. Some changes can be concurrent, others can't (?). Good: you change the customer's address, I update the customers credit history. +Bad: You cancel an order, I ship an order.  We have a race condition.  You're in a collaborative domain.  The rules of CQRS applies.  Commands are almost never supposed to fail.  This leads us to deeper business analysis. Fundamentally: race conditions don't actually exist in the business domain! Use cases and business processes are always expressed by business domain experts in sequential form. Most of the time, we find a race condition, it is the result of a work around.  We need to dig deeper and find out what the race condition was originally trying to solve. Example, we don't want allow them to ship canceled orders and they can't cancel shipped orders.  Any time it's not immediately apparent how the company is going to make money or save money, you don't understand the business model completely. Try business analysis: 5 whys.  You're supposed to listen!  Ask for the business process to be explained to us as if we were a five year old. + +1. Cannot cancel shipped orders + + 1. Why? because shipping costs money + 2. So? that money would be lost if the customer canceled + 3. Why? we refund orders immediately + 4. Analyze: + + 1. when an order is canceled, does the refund need to be given immediately? => no + 2. can we give a partial refund? => yes + 5. Result: now we can get rid of the one if-statement to check if the order is shipped before we cancel + 6. Other analysis + + 1. Most orders are canceled quickly after being made => it's not equally likely that an order will be canceled at any time after the order was made + 2. So...wait until the high-probability period is past to actually begin the shipping process +2. Cannot ship canceled orders + One conclusion!  Domain Models are SAGAS!  Business people like to talk about business policies.  Refund policies, insurance policies.  Sags are a really good way to implement policies.  They have that time component to it that allows us to model domain concepts well.  "In two weeks you will qualify for this".  "You can cancel for free within the first day of your order". \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 15 - Engines.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 15 - Engines.md new file mode 100644 index 0000000..d8d5341 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 15 - Engines.md @@ -0,0 +1,2 @@ +If you see yourself pushed events back and forth between service boundaries, creating a kind of data synchronization process, then you need to re-evaluate your service boundaries! **Engines** +Engines were kind of a big deal at one time.  Think of search engines or rules engines.  Now we say search service or rules service. The important aspect of an engine is that there is lower-level framework-type part that is the engine itself.  Then, there are bits and pieces that we plug into the engine.  These bits and pieces are not necessarily coupled to each other.  The engine doesn't encourage dependencies that are plugging into it. Sometimes when you have complex and ever-changing rules you actually need an engine instead of a domain model.  For example, a pricing domain model might be influenced by data from many services.  A domain model would then break all of your service boundaries. Pricing, risk, search are common examples of the engine pattern.  Litmus test: take the name of the problem, append the word "engine" and then google it.  If you can't find anything about it, it might not be a good idea.  If you do find stuff, you might be able to use an engine to solve the problem. Engine code lives in IT/Ops. Engines can listen to events across service boundaries and make decisions based on the aggregation of the data of those events. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 16 - Transitioning an Organization.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 16 - Transitioning an Organization.md new file mode 100644 index 0000000..9a30396 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 16 - Transitioning an Organization.md @@ -0,0 +1,33 @@ +Jumping straight into SOA often does not work.  This is related to Conway's Law that the people architecture at a company affects the code writing architecture. To get to SOA, you need to refactor the people architecture of your company as well, over time.  The boundaries of progress moving toward an SOA business are note always clearly defined. Phase 0 is: big ball of mud, everything overlapping, etc.  This mess has taken people at the organization a long time to create and lots of it works.  Trying to replace the whole thing will probably fail.  Conversation, however, about rewrites are healthy.  It implies that "we need to do something different".   Slowly improve things that still have business value and allow a "tax" on top of each feature to improve the structure of the system overall. **Phase 1** +Don't go apply this to the next mission-critical system.  Try something small to get your feet wet.  Get the first queue in production. +Ops: new stuff, but not very much of it (one queue) +Dev: very low, one message handler, refactor a small system +Org: mostly dev organization, getting them used to SOA principles.  You can do lunch and learns, workshops, etc. Get developers to care, wanting good quality code, care about their craft. Once you get there, they start saying things like "it would be easier and faster to rewrite this!". + +| | | | | +|---|---|---|---| +|Ops|Dev|Org|Duration| +|Medium|Low|Lunch & Learns, Workshops, etc|6 months (small, young companies) to 12 months (bigger companies)| + **Phase 2** +Starting to see belief that things can actually change--there's hope!  Choose to deliver functionality to the business over making unnoticeable changes--you have to keep the value apparent and the budget there.  You may start risking breaking stuff here.  You start at the end of each use case, to publish events.  You're creating hooks, even if you don't know what they'll do yet.  Doesn't HAVE to be a bus message.  Could be something as ugly as writing to tables that others are looking at.  You're just trying to get the concept of events a common practice. If you come across functionality that could be improved and done easier with subscribers (let's say also using signalr to update a user in their interface that gives extra business value).  You're not worrying about service boundaries or data duplications...etc.  You're trying to show the business that things are starting to pay off.  Using the "new way" is making things faster and better.  You need to keep the feeling of momentum. Most of the work is still being done in the big ball of mud to maintain it and keep it going. You want to have a good, small core of people on board with the changes to start planning things out and looking ahead.  We want to do SOA!  The work by this group is quiet and off to the side.  A couple of hours here and there from a real domain expert.  You're asking the domain expert for a few hours every-so-often to ask questions, verify your vision--starting to find the service boundaries.  You're not yet sharing this with the larger organization.  You're trying to get a general direction for your services--not having to know exactly what they look like yet, but being pretty sure it's in "this" direction. + +| | | | | +|---|---|---|---| +|Ops|Dev|Org|Duration| +|Med|Med|Learning and practice UI composition techniques, pub/sub patterns, decoupling.  Much more explicit training efforts.  You are starting to want to know what you're creating.|6 months - 18 months
    If you don't feel you have the right momentum built up, wait--take your time.| + **Phase 3** +You're trying to get to the point of the business being willing to wait longer for new features.  You start hacksawing the big ball of mud.  You carve out a piece and add it to the subscriber where it makes the most sense.  You have to be very careful with the data model.  Some of this is changing things to composite UI stuff. It's difficult to be restabilizing the big ball of mud all the time--that's one of the hardest parts of this phase.  The issue in the first place with the big ball of mud is that you don't know what changing any individual piece of the ball will effect. The SOA work from phase 2 is important because you need to know (at least basically) where you will be putting rewritten code. The small meetings about SOA are opening up to more executives.  Your concept of the correct SOA is crystalizing.   You're meeting with more domain experts and have the approval of executives to pull them into (probably) weekly meetings.   You need to have good answers for all of the edge cases that business people care about (and need).  That's what the big ball of mud is--the answer to a thousand edge cases identified over time. A large organization can end up stuck in phase 3.  Right when you're getting to a good spot, they buy another company and now you need to integrate an entire new set of legacy systems.  You can do this!  You get it done in 12 months and...the CEO buys another company and you start all over again.  Sometimes tech leadership leaves when they get frustrated that the vision will never happen.  Momentum is important (almost at any cost) to break through to phase 4. + +| | | | | +|---|---|---|---| +|Ops|Dev|Org|Duration| +|Low|High|SOA design is being clearer and clearer. You're training on what it means to work in an SOA environment.  Don't be talking about things that are too far ahead.  Be talking no more than things that are about 6 months ahead.|12 months - 36 months| + **Phase 4** +Phase 4 is hard because you start dealing with data.  You start chopping up the big, monolithic data into the service boundaries. You need to treat the data migration code as long-term code that you can run and rerun and that you will maintain just like product code.   Ops effort is medium because there are new database, etc.  You'll be writing code and building across multiple repositories. The big ball of mud is shrinking quicker than before.  You're migrating data out and building services.  You're completely out the rest of UI composition. You'll see lots of opportunities to make things better towards the tail end of phase 4.  You can learn to live with it. + +| | | | | +|---|---|---|---| +|Ops|Dev|Org|Duration| +|Medium|High|At some point, it will become clear that the way that teams are structured is hurting us.  You'll hear "we need a reorg".  The re-org will be along service boundaries.  It should be clear to everyone at this point what the service boundaries are.  Reorgs are hard and so you want enough momentum at this point to make it through.|12 months - 36 months| + **Notes** +Having a pattern of fallback to an old way (config to switch between new and old way) is a useful practice throughout all the phases.  It makes us bolder to try new things because we can always immediately switch back to the old way.  This helps with your momentum.  Enough failures will lead to a loss of momentum.  Having the immediate fallback makes the failure less noticeable (if at all).  You can be assured that things will never be _worse_ than they were before. A good metaphor is rock-climbing.  Every time you make a certain distance, you hammer in an anchor.  If you fall, you only fall so far. The percentage of our work that is dedicated to clean-up and refactoring should never be over 30%!  OUR JOB is to deliver business value to the business.   Trade-offs never stop.  A healthy state of things is to always be seeing where the improvements can happen. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 17 - Building Prod Web Systems.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 17 - Building Prod Web Systems.md new file mode 100644 index 0000000..dc5ea82 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 17 - Building Prod Web Systems.md @@ -0,0 +1,15 @@ +Traditional architecture was layered on top of a six-pack: two web servers, two service servers, db and failover.  The DB became the bottleneck and caching was introduced. Caches are hard to scale-out and can cause even more exasperating concurrency issues.  Caching didn't turn out to be a silver bullet.  We moved away from in-process caching towards some more explicit caching (like Redis).  One problem: the amount of data is going to grow faster than the amount of memory you have in your caching servers.  So, you have cache invalidation. Caching can actually degrade performance under higher loads as the hit rate erodes and memory runs out. If you cache, pay attention to your hit rate. **Content Delivery Network** +Great for off-loading static content.  Images, JS, css, etc.  Learn and leverage DNS!  Don't use a smart donkey when a heavy ox is what you need.  Don't make your web app smarter, when the heavy ox (the web) can be utilized to take part in your web application. HTTP output caching--IIS will cache the HTML output and serve the binary data immediately without re-rendering a page. Get information from the business on what things need to be refreshed quickly and what things don't need to be updated all that quickly.  Help them realize that if _everything_ is fast, then nothing will be fast.   A real cache doesn't even hit the controller.  It's at the web server level.  Model your site as a collection of static resources.  Your navigation is Nav.xml (or html or whatever).  They all just have varying times-to-live and can even be deployed to CDNs.   The web was designed around the concept that storage is cheaper than bandwidth.  So, caching is everywhere (browser, CDNs, output caches, etc).  There's an ISP cache too. + +- Browser + +ISP +CDN + +- Output cache + +In-memory caches + +- Fresh request + The "free" caching of the internet is our heavy ox. Think of this way: a user who finally arrives at your website after having traipsed across the vast desert of the internet checking cache after cache for fresh data, is dying for fresh data.  Is that the right place to then serve up stale cached data?? If you are building a site that very local.  Let's say for dog owners in Dallas.  Then, the heavy ox of the web caching system won't help.  It might hurt actually because you'll send users further away from your site to get static content.  That's when you might need caching more. Communicate with your ops people that as your site is live over time, fewer and fewer web requests will hit your servers over time.  Otherwise, this can be a concerning sign, "we're not getting any hits!". Explain that, with the caching of the 'net, this is normal. Of course, the helpful thing here is client-side composition.  Browsers can often work better and faster with multiple requests at once (client-side composition).  This is not true for mobile browsers.  Battery life is more important there and so one bigger request is probably more important. **Personalization** +Not all data is global data.  Weather widgets are good examples.  This is local weather for the user.  Personalized information is still scalable and internet-cacheable when we do the deep analysis. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 2 - Coupling in Distributed Systems.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 2 - Coupling in Distributed Systems.md new file mode 100644 index 0000000..d0cf050 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 2 - Coupling in Distributed Systems.md @@ -0,0 +1,34 @@ +Coupling = measurement of dependencies + +- if x depends on y, there is coupling between them +- Afferent coupling (Ca) - who depends on me +- Efferent coupling (Ce) - on what do I depend +- If x depends on y: +- + - x is efferently coupled to y + - y is afferently coupled to x + + How much coupling is too much? How much coupling is necessary for a class to be useful, but not too high to make it tightly coupled? Certain low-level frameworks or classes we might expect to have a high coupling.  For example, logging we would expect to be connected to a high number of other classes.  In fact, a low coupling level for a coupling framework might signal problems (not enough logging going on, etc). Efferent coupling is really the bigger issue.  A large set of changes can cause problems in the depending class. If A calls one method on B, is it's coupling the same as C which calls three methods on D? Probably not.  D has one afferent coupling to C, but C has three efferent couplings to D. Coupling that you can't see +Two components that depend on one DB are coupled together. **Loose coupling at the systems level** +- minimize both types of coupling +- zero coupling isn't really possible Coupling Aspect #1: platform +Also known as interoperability. 1 of 4 tenets of service orientation: Share contract and schema, not class or type _Solutions_ +Text-based representation on the wire (XML/JSON)--with or without schema. +Use standards based transfer protocol like http (or smtp, udp, etc). Coupling Aspect #2: temporal +Synchronous calls.  Caller has a high degree of coupling to callee. _Solutions_ +Canonical example: querying a system.  There isn't much to do (for the client) until the data comes back.  Caching can be used to reduce temporal coupling. Which side should cache be on?  Providing or asking side?  If you put it on the asking side, then at least you know that you are using a stale copy of data.  This can reveal to business stakeholders where data can be stale.  This, in turn, then can reveal where you proper service boundaries should be to meet business requirements. Pub/sub helps us solve temporal coupling. +- Subscriber must be able to make decisions based on somewhat stale data +- Requires a strong division of responsibility between publishers and subscribers +- Only one logical publisher should be able to publish a given kind of event Designing events: nothing everything should be modeled as an event.  Bad: "SaveCustomerRequested". +Good examples: "CustomerSaved", "OrderAccepted".  It's a fact--already done.  Subscriber shouldn't be able to validate it. Include validity period in events so that subscribers know how long to use it.  ProductPriceUpdates { Price: $5, ValidTo: 1/1/2015 } Your assumption should be that the way you first divided up your services is actually wrong. _Temporal coupling goes hand in hand with business consistency._ Coupling Aspect #3: spatial +Topology of IP addresses, DNS and machines. _Solutions_ +Application level code should not need to know whehre cooperating services are on the network. +Delete communications to lower layer, the service agent pattern. +How does the agent know which destination to send the message to. Load balancing - clients talking to servers through load balancer.  Routing is first logical, then physical. Prefer many strongly-typed messages (clearly communicating intent) over parsing message intent from the content of the message. **Summary** +Loose coupling is more than just a slogan. Coupling has 5 dimensions: + +1. Platform +2. Temporal +3. Spatial +4. Efferent +5. Afferent \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 3 - Messaging Patterns.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 3 - Messaging Patterns.md new file mode 100644 index 0000000..cb5d99b --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 3 - Messaging Patterns.md @@ -0,0 +1,20 @@ +Focusing on one-way messaging for now. Why? + +- Can reduce coupling +- + - XML/JSON for platform decoupling + - Asynchronous for temporal decoupling +- Can reduce afferent and efferent coupling + + Asynchronous messaging: one-way, fire-and-forget. + +- Requires ID for retry, deduplication + Distributed queuing: queue is local, messages are stored and forwarded.  When connectivity is present, outgoing queue sends message to incoming queue on remote machine.  Once the message is queued for delivery, the fire-and-forget process is done. Various failure scenarios: + +1. Network failure +2. Remote machine goes down +3. Remote process goes down + With RPC-based systems, with increased load, throughput keeps step for as long as it can until memory garbage collection begins to overtake processing until throughput begins to drop dramatically as load continues to increase.  You have too much synchronous processing going on. How does messaging improve this?  Main thing: it replaces memory and CPU time with storage.  Memory and CPU only has to queue the message (store it).  It's async by default. Messages fully contain the information of the intent of the action to be taken.  We can have more than one handler for a single message. Important point: your API becomes a set of messages.   **Fault Tolerance Scenarios** +When servers crash +When databases are down +When deadlocks occur in the database Without messaging, each scenario basically leads to the data evaporating and putting the onus on the user to notice he needs to resubmit, if he wants to. The client that originated the message is not responsible for retrying the message.  We should store the data and retry it internally.  The client isn't actively waiting for a response. Bad idea to keep messages in auditing queue for extended periods of time.  Need to watch the audit queue and move messages to longer-term storage.  Audit queue can be hard to interpret because messages are not in chronological order. **Leveraging message headers** => we can create a sequence of events, recreates http-like synchronous sequence of events. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 4 - Messaging Patterns continued.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 4 - Messaging Patterns continued.md new file mode 100644 index 0000000..a7daf51 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 4 - Messaging Patterns continued.md @@ -0,0 +1,7 @@ +**Web Services with messaging** +Separate pieces of logic behind their own messages.  This is so that, for example, if the database transaction fails, it won't continually try to hit the web services, or vice versa.  If you separate the operations behind two different messages, then the database transaction can be retried on its own and the web service call can be retried on its own. Instead of trying to make web services idempotent and re-engineer everything that message does, just change the interaction between your service and the web service to take place over messaging instead of HTTP calls. Use client-generated IDs (GUIDs) so that data can be uniquely identified throughout the business process and de-duped after failures and retries. **Request/Response with messaging** +Response is nothing different than the request.  It's just a message going back the other way.  It goes back to the return address. To make this work, you have to have a correlation ID so that the response an endpoint gets can be correlated to a specific message it sent.  Otherwise, after sending 100 messages, who knows which message the response relates to? With NServiceBus, you can provide a callback that is executed when the return message is received.   **Multiple Responses** +We can send multiple responses back to the requester by simply using the same correlation ID.  For example, this would be useful to report status to a UI on a long-running process. **Subscribe - Publish** +Subscribe as a request, publish as a series of messages coming back to that subscriber over time.  Logically, this is exactly the same as request, multi-response. The subscribe request doesn't actually need to send a message to the publisher.  It depends on the queuing technology.  If it supports pub/sub natively, then it's just a configuration of the broker to tell all subscribers when a message is published to a certain topic. Pub/sub is not multicast.  If a subscriber is down when a message is published, it will not miss the message.  It will be reliably delivered once the subscriber is up. _Important difference_: are subscribers independent subscribers (all should get event) or are they scaled out instances of the same logical subscriber (any one, but only one, should get the event)?  NServiceBus will pick one instance to send the published message to.  If you're doing something like invalidating a cache at multiple web frontends (therefore, all would have to get the event to invalidate their cache), don't use pub/sub!  It's a distributed cache--so, use a distributed cache instead of individual caches on each web server.  That is, use the technology that already solves the problem for you. **Exceptions** +We assign too much emergency to exceptions being thrown.  We need to change our mindset to allow transient error states in our systems that the system can recover from.  Do we need to catch every exception and throw our own custom exceptions and log our own custom messages?  Or can we just allow the exception to happen, allow the messaging to retry and only panic when message end up in the error queue. _Should we really check dependency-injected objects for null?_  Our system will fail consistently if we have it misconfigured to not inject dependencies. The error queue is your true source of problems--not exceptions.  Once something has failed after retries, it truly is a problem. **Summary** +You can get into a case where instead of one, monolithic ball of mud, you have 700 tiny balls of mud that send thousands of messages and subscribe and publish and you have no idea what's going on.  This is where boundaries come in and are important! \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 5 - Architectural Styles, Bus & Broker.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 5 - Architectural Styles, Bus & Broker.md new file mode 100644 index 0000000..76d5566 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 5 - Architectural Styles, Bus & Broker.md @@ -0,0 +1,46 @@ +Architectural style: what is and isn't allowed in an architecture.  There doesn't have to be ONLY one in a system.  For example, we mix MVC and layering. If we use layering, that doesn't mean every piece of code we write has to fit into _this_ style. When thinking about architecture, think about them as ingredients to a meal. Service Oriented Architecture is an architectural style.  SOA is likely to be founded on messaging. Architecture is what architects do.  Architects are those who do architecture.  :-) **Bus & Broker Commonalities** +Attempt to handle spatial coupling (but in very different ways). **Broker Architectural Style** +Also known as hub and spoke.  Another name: mediator pattern.  Lots of apps talk to the broker.  The broker mediates communication between the applications. Broker was introduced to save the integration between a large number of applications to all the other applications.  Instead, all applications integrate with the broker and the broker figures it out from there. Problem: the more things you integrate, the more complex and loaded the broker becomes.  The need for scaling presents itself. Examples: + +- Biztalk +- Websphere +- MS SQL Service Broker +- CORBA +- UDDI (concept was service discovery) + Challenges +Not really tech itself, but what it was used for. Broker becomes bloated as number of integrating apps increases. Advantages +Generic engine to use to communicate between applications. +Central management of communication.  IT can look at what's going on. Disadvantages +Embodies 11th fallacy: business logic can and should be centralized SOA was a reaction to the problems caused by highly-centralized business logic (brokers).  Brokers work well for a relatively small number of integrations. **Bus Architectural Style** +Very simple, older style thank broker.  Sources produce events, they go to sinks.  That's it.  Baseline assumption was that the things outside the bus were going to change.  The assumption of the broker was that things outside the broker would _not_ change. PCI bus and ethernet are bus architectural styles.  Internet was built around this.  Smart endpoints, dumb pipes.  This allows the endpoints to change a lot.  This was all hardware implementations of bus topology. Software buses try to do the same thing. + +- Everything on the bus needs a name +- Just like an ethernet card, every component on the bus needs a bus + Some new ESB products that are actually brokers: WebSphere, Mule, Sonic Software Bus techs: NServiceBus, MassTransit, Rhino Service Bus +Tibco Rendezvous, RabbitMQ, Qpid JGW's bus setup is hub-and-spoke in physical topology, but logically still a bus (dumb pipes, no single point of failure). RabbitMQ and ZeroMQ were created trying to solve the problem of quick message transfer rather than super-reliable message transfer. Their motivation is speed over reliability. Difficulty: much more difficult to design distributed solutions than centralized ones. When researching technologies, make sure to discover the reason they were created and the space out of which they came and which problem they were trying to solve (or even which aspect of which problem they were trying to solve). **SOA Building Blocks** +Tenets of Service Orientation: + +1. Services are autonomous (single responsibility--high cohesion) +2. Services have explicit boundaries (low coupling) +3. Services share contract & schema, not class or type (platform coupling) +4. Service interaction is controlled by policy (runtime elements to get things to talk to each other) + Those who came up with these were not coming up with something new.  They were looking back at old stuff and seeing what worked. What is a service? +A technical authority for a specific business capability. Nothing is "left over" after identifying services.  You can't say "the UI is over here and talks _to_ the services".  The UI code (in this case) was written for a reason to serve some business process and therefore should below in one of the services.  Everything must be in some service. What is NOT a service: + +- A service that only contains functionality: this is a function!  +- A service that has only data is a database, not a service. (CRUD stuff).  If all you have is a CRUD service, all you've done is create a proxy for a database. + This was the message of object-oriented programming: encapsulation.  SOA takes it to the next level: encapsulate business domains. If you want your services, keep them in separate code repositories.  It's hard to cross those boundaries and that's good. Client platforms are not out-of-scope for services.  Therefore, UI components can belong to services. When we say that a service is the authority for a particular business capability, this may span several systems. SERVICES ARE NOT SYSTEMS. UI composition allows you to put service-oriented components in different services.  A pricing component could come from the marketing service and the order component could come from the sales service. SOA aims to divide up business responsibility to make it easy to add business features later one without changing a lot in the existing systems. You don't always want to model the way the business currently operates.  There is usually a lot of overlap and disagreement on what requirements are.   **Homework:** +Example problem domain: hotel management system. +Marriott in Dallas.  A single hotel. +Functionality to book a room. +Search screen: check-in, check-out boxes. _Frontend experience_ +Use case #1: availability by in/out dates.  What is the price?  Can be multiple types of rooms.  If multiple room types are available, show all and their prices.  don't look for complexity around pricing--just assume list price. Use case #2: Making a reservation.  Guest information (first, last, etc), credit card information for securing reservation.  User clicks book now.  One guest, one room, one reservation. _Hotel experience_ +Use case #3: check-in process.  Finding reservation based on guest's name (what type of room, how many nights).  Next, finding room to put guest in. Use case #4: check-out process.  Simple for guest.  From hotel's perspective: this is last night of reservation, print up bill on that night.  Verify you've left the room.  Total charge (finalizing the charges)--did you trash room?  Did you eat minibar food?  Ultimately, charging card for appropriate total? Edge cases to think about: + +- Guest side: One room left, two people are trying to book it?  How to preserve consistency?  Overbooking is OK, but infinite overbooking is not allowed! +- Hotel side: No show.  Reservation made, but guest didn't show up. Probably a guest period. + Objective: find service boundaries.  What are the services?  What data are they responsible for?  What parts of the UI are they responsible for?  What events do they publish?  What events to they subscribe to?  What do they do with the events?  How do they collaborate with each other to implement the flows discussed? Hints: + +- Be careful with naming services +- Consider using stand-in names for services (red, blue, green--colors), then name them at the end. + WHEN DOING DESIGN, DEFER NAMING AS LONG AS POSSIBLE! \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 6 - Referential Integrity & Reporting.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 6 - Referential Integrity & Reporting.md new file mode 100644 index 0000000..0583db4 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 6 - Referential Integrity & Reporting.md @@ -0,0 +1,16 @@ +**Reporting** + +**Category #1: wants to apply filter to data** +Turn numbers that business users are looking for in reports into domain events.  "I want all orders over $1000".  When we ask why, the answer is that such an order is a risky order.  We now have a domain concept.  We can now emit events that say something like "I've accepted a risky order". **Category #2: "what do you want", "I don't know"** +Ultimately, all you can do is deliver data to this kind of user.  You can't automate it.  This user's job (he's really a researcher) is to do the un-automatable. _For which kind of situation is SOA problematic?_ + +- For startups and/or young companies.   +- + - SOA is around stable business practices + - Young startups don't have the stable business practices you need.   + - Everything is volatile--impossible to find service boundaries + - SOA is about optimizing for certain known constraints +- Building a "platform" +- + - The idea is that you can use this platform for anything + - SOA, again, is dependent on established, known business practices which don't exist for a "generic" platform \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 7 - Service Decomposition.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 7 - Service Decomposition.md new file mode 100644 index 0000000..304fa81 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 7 - Service Decomposition.md @@ -0,0 +1,17 @@ +Indications that you need to sub-divide a service into components: + +- Quality of service requirements +- + - are there large variations in response times + - ...in transaction processing times + - The business might treat categories of customer differently + - We should actually sub-divide our sales service into RegularCustomers component and StrategicCustomers component +- These things can start to show up when the business starts asking you to treat something (like a customer) in little different ways throughout the system.  You end up with a bunch of if statements asking the same question.   +- + - Ask the business if this is really a new business component + - Fork the code base and let them grow apart.  This is liberating as you don't have to maintain both component requirements in one code base. +- More examples +- + - Airlines - business vs economy class + - Shipping - frozen goods vs regular toilet paper + - Billing - charging credit cards vs invoicing \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 8 - Processes.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 8 - Processes.md new file mode 100644 index 0000000..b57ad7a --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 8 - Processes.md @@ -0,0 +1,6 @@ +=> IT to business interaction There is no "the business".  If you ask for "the business" there is no one person to come tell you everything. In most case, when the business comes to you, they are really wanting a work-around.  "Add this column to this report". "Allow me to sort by this".  These are not requirements, they are work-arounds.  For the most part, you don't want to be building work-arounds. You need a product owner, requirements engineer or whatever who the business will listen to and can push back. Helpful in this phase is to do rapid prototyping. Well-formed estimates include a degree of confidence that the project will be done between a T1 and T2 time period.  This assumes: + +- Formed team (already worked together) +- Team familiar with tech +- Team not working on anything else + Developers are familiar with the concept of being in the "flow" where we're at our most productive, most concentrated.  We need to know our high-energy periods and not waste them.  After 2-3 hours of this, however, we need a break, we run out of energy.  During the down times, we can work on rapid prototyping work, project planning, etc. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 9 - Services and transactions.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 9 - Services and transactions.md new file mode 100644 index 0000000..e025091 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Advanced Distributed Systems Design - Module 9 - Services and transactions.md @@ -0,0 +1,12 @@ +You have two types of components: + +1. Business components +2. Autonomous components + While you should probably only have 1 or 2 BCs in a service, you will have many more ACs.  The number of ACs you have will be proportional to the number of systems your service participates in. An AC is responsible for one or more message type.  Its message handlers could be real (server-side) message handlers on the bus, or could be javascript event message handlers--or, whatever else.   Multiple ACs can be hosted together. + +- Don't try to reuse code between ACs. +- Strive for "disposable" code +- Solve for today's problem - not tomorrow's (JFHCI = just frickin' hard code it) + **Shades of Physical Autonomy** +We can have everything deployed into one shared space.  We can put parts of a performance-sensitive AC to their own environments.  Or, we could just deploy the entire AC to it's own location. SOA = business value.  ACs help us to deploy separately, so that we can deploy high-value components out from their current location to another where it will perform better. **Summary** +The runtime environment is not made up of services.  Services are logical organizational constructs.  ACs are the deployment components. Commands are sent within service boundaries.  One AC in one service would not send a message to an AC in another service. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Homework 1.md b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Homework 1.md new file mode 100644 index 0000000..29a54a1 --- /dev/null +++ b/OneNote/Ben's Notebook/Training/Advanced Distributed Systems/Homework 1.md @@ -0,0 +1,90 @@ +**Use case #1: get available rooms** +Data + +- Room +- + - Type + - Price + - Description + - Name + - Pictures +- Check-in date +- Check-out date + + Actions + +- get room description (type, picture, etc) +- get available room list + **Use case #2: making a reservation** +Data + +- Guest +- + - First name + - last name +- Payment information +- + - card number + - expiration date + - name on card +- check-in date +- check-out date +- room ID + + Actions + +- room still available? +- reserve room for guest +- validate payment information + **Use case #3: check-in process** +Data + +- Guest +- + - First name + - Last name +- Payment information +- + - number + - expiration date + - name +- room +- + - number + - type + + Actions + +- Find reservation by guest name +- Find reservations by today's date +- realize reservation + **Use case #4: check-out process** +Data + +- Guest +- + - GuestId +- Room +- + - RoomId +- Reservation +- + - ReservationId + - Check out Date + +**Homework:** +Example problem domain: hotel management system. +Marriott in Dallas.  A single hotel. +Functionality to book a room. +Search screen: check-in, check-out boxes. _Frontend experience_ +Use case #1: availability by in/out dates.  What is the price?  Can be multiple types of rooms.  If multiple room types are available, show all and their prices.  don't look for complexity around pricing--just assume list price. Use case #2: Making a reservation.  Guest information (first, last, etc), credit card information for securing reservation.  User clicks book now.  One guest, one room, one reservation. _Hotel experience_ +Use case #3: check-in process.  Finding reservation based on guest's name (what type of room, how many nights).  Next, finding room to put guest in. Use case #4: check-out process.  Simple for guest.  From hotel's perspective: this is last night of reservation, print up bill on that night.  Verify you've left the room.  Total charge (finalizing the charges)--did you trash room?  Did you eat minibar food?  Ultimately, charging card for appropriate total? Edge cases to think about: + +- Guest side: One room left, two people are trying to book it?  How to preserve consistency?  Overbooking is OK, but infinite overbooking is not allowed! +- Hotel side: No show.  Reservation made, but guest didn't show up. Probably a grace period. + Objective: find service boundaries.  What are the services?  What data are they responsible for?  What parts of the UI are they responsible for?  What events do they publish?  What events to they subscribe to?  What do they do with the events?  How do they collaborate with each other to implement the flows discussed? Hints: + +- Be careful with naming services +- Consider using stand-in names for services (red, blue, green--colors), then name them at the end. + +WHEN DOING DESIGN, DEFER NAMING AS LONG AS POSSIBLE! \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Work/FaithLife interview.md b/OneNote/Ben's Notebook/Work/FaithLife interview.md new file mode 100644 index 0000000..5e01070 --- /dev/null +++ b/OneNote/Ben's Notebook/Work/FaithLife interview.md @@ -0,0 +1,29 @@ +Questions + +- How are teams structured? Leads, with 4-9 engineers, focused around platform/tech + + - Mobile team + - Web team + - All full stack + - Share + - On-call rotation, online services + - Backend e-commerce, backside to logos.com + - Internal tools, content production for datasets +- How are teams divided among projects? Web? Logos software? Mobile? +- Remote position permanently? Travel to home office? +- What is the QA process like? +- What are the best qualities of a Senior .NET dev to succeed? +- Reporting structure? +- Timelines? +- Remote works ok? + +Alan palmer, hiring manager +100 devs +Teams into business units +30 devs on his team +Software for 20+ years +Opening office in pueblo, mx + +Multi-stages to interview +Pairing session with engineer to solve some problem +Group interview \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Work/Faithlife pair programming interview.md b/OneNote/Ben's Notebook/Work/Faithlife pair programming interview.md new file mode 100644 index 0000000..08bf27d --- /dev/null +++ b/OneNote/Ben's Notebook/Work/Faithlife pair programming interview.md @@ -0,0 +1,54 @@ +Minesweeper implementation + +- Default to 8x8 board with 10 mines +- Variables + + - numRows + - numCols + - numMines +- Structs + + - Squarestate + + - hasFlag + - hasMine + - hidden + - Numneighboringmines +- For grid + + - Multidimensional array of squarestates +- Setup + + - Ask for num rows (default 8) + - Ask for num cols (default 8) + - Ask for num mines (make sure it's not more than num of squares) + - Q to quit + - F1,2 format for flag setting + - 1,2 for "opening" square + - Init array with rows and cols + - Use random to get col idx and row idx for mine until we reach number of mines + + - As we do, increment neighbor mine counts + +Summary +Your task is to implement the logic (not necessarily the GUI) of the classic Windows “Minesweeper” game. + +Game Description +The game board is a rectangular grid; placed randomly within the grid are “mines”. (The grid size and number of mines are user-configurable but default to an 8×8 with 10 mines.) +Initially, all grid squares are “hidden”. +The player chooses one square at a time to “reveal”. If the square contains a mine, the player loses and the game is over. +Otherwise, the square is changed to show the total number of immediate neighbor squares (diagonal and orthogonal) that contain mines (with a maximum of 8). If no neighboring squares contain mines (i.e., the count for this square is 0), then all neighboring squares are automatically revealed. (And if one of those squares has no neighbors that are mines, then all its neighbors are automatically revealed, and so on.) +The player can choose to “flag” a square that they think might contain a mine. This has no impact on gameplay; it is just to help the player record their guesses. +When the player has revealed every non-mine square, they win. + +Detailed Objectives +• Create data structures to represent an 8×8 grid +• Lay 10 mines in random locations +• For each square, calculate the total number of immediate neighbors that contain mines +• Display the board to the user (with all squares “hidden”) +o Note: This can use console/text mode UI if that’s quicker +• Accept user input to reveal or flag a square +o If the square is a mine, the game is over +o If the square has non-zero mine neighbors, display its count +o If the square has zero mine neighbors, reveal all adjacent squares +• Repeat until the player has revealed all non-mine squares \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Work/Faithlife panel interview.md b/OneNote/Ben's Notebook/Work/Faithlife panel interview.md new file mode 100644 index 0000000..e69de29 diff --git a/OneNote/Ben's Notebook/Work/Rightpoint interview.md b/OneNote/Ben's Notebook/Work/Rightpoint interview.md new file mode 100644 index 0000000..1ee97d0 --- /dev/null +++ b/OneNote/Ben's Notebook/Work/Rightpoint interview.md @@ -0,0 +1,83 @@ +Questions + +- Righpoint + + - Can you describe how Rightpoint likes to position itself for clients? Partner? Vendor? Most-valuable partner? + - What's the culture like at Rightpoint? How does this concept of "intrapeneur" play out? + - What's the pitch process like? +- Solutions architect + + - Most important quality of a solutions architect to succeed at Rightpoint? + - What's the typical team structure for a project? + - How many projects is a solutions architect typically responsible for? + - How my freedom does a solutions architect have? +- Developers + + - How much opportunity is given to developers to train and study for certification? - What's the covid-19 plan? Returning to offices soon? Permanently remote possible? + +Preparation + +- What Episerver commerce does well + + - Flexibility to be shaped as you see fit + + - Can totally work around it + - Extend it + - Pick pieces here and there + - Can stand alone for smaller solutions + - Can be integrated relatively easily with larger enterprises + - Clear that Episerver is paying attention to it, improving it tremendously +- Weaknesses of Episerver commerce + + - Flexibility - not a Shopify solution a business stakeholder can setup + - Relatively few plugins + - Old UI +- Most important for team + + - Communication + + - Used to say communication, but that's too generic and unclear + - Ability to actively listen to clients and team members + + - Understanding as others speak + - Asking clarifying questions + - Repeating to ensure understanding + - Accurately "go and do" based on what was said + - Wise risk-taking + + - Don't be afraid to fail + - Know how to recover if you do + + + +Notes: + +- Drew + + - Premier platinum partner with epi + - Bigger opportunities coming in + - Will love DXP + - Thomas john commerce practice lead +- Keith + + - Aniket on keith's team, digops + - Aniket is keith's direct report + - Post implementation support, like Electrolux + - Joseph Lee is head of digops, keith on his team + - All of qa reports up through + - Dev team is 40 devs, half in us half in india + - Hasn't worked on epi + - Mostly Sharepoint dev in early days + - Genpact in the backend transformation busniess, were part of GE, spin off + - Bought rightpoint as digital experience company + - Good SA + + - Raport with clients, have it, build it + - Comfortable with change + - Comfortable speaking to technology generally, not specifics, comfortable + - Fully remote definitely possible +- Joseph + + - Leads digops unit + - Managed services--providing production support + - Lots of freedom to decide where to work, what to do \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Work/Rightpoint recruiter.md b/OneNote/Ben's Notebook/Work/Rightpoint recruiter.md new file mode 100644 index 0000000..6360737 --- /dev/null +++ b/OneNote/Ben's Notebook/Work/Rightpoint recruiter.md @@ -0,0 +1,12 @@ +Base salary 145000 +Bonus typically 3-7% + +Signus, switching to BlueCross +Vision +dental +401k, 2.5%, two year vesting +Vacation: flexible, not 10 weeks! + +Any questions + +Start classes every other Monday. \ No newline at end of file diff --git a/OneNote/Ben's Notebook/Work/Switching jobs pros and cons.md b/OneNote/Ben's Notebook/Work/Switching jobs pros and cons.md new file mode 100644 index 0000000..c120084 --- /dev/null +++ b/OneNote/Ben's Notebook/Work/Switching jobs pros and cons.md @@ -0,0 +1,12 @@ +| | | | | | | | | +|---|---|---|---|---|---|---|---| +|Accepting Rightpoint offer||||Staying at VML|||| +|Pros|Weight|Cons|Weight|Pros|Weight|Cons|Weight| +|Salary increase|8|New people to meet|5|Familiar processes|6|No pay increase|3| +|Lots of work|10|Unknown exact job requirements|6|Familiar, good people|10|Uncertain work load future|7| +|Interesting colleagues|5|Less coding|5|Large company, probably solid|5|Un-inspiring boss|4| +|Grow in Episerver expertise|6|More client-facing|3|Potential to build Episerver practice and business|8|Liberal-minded company/employees|5| +|Promotion--more authority, influence|5|More travel|8|Potentially more time to do side projects, especially in the near term|10||| +|||Lose contact with VMLers (probably…not definite though)|1||||| +|||Switching insurance, 401k, etc|1||||| +||34||29||39||18| \ No newline at end of file diff --git a/Paper Moving off the Map.md/Exported image 20240808113929-0.png b/Paper Moving off the Map.md/Exported image 20240808113929-0.png new file mode 100644 index 0000000..98be660 Binary files /dev/null and b/Paper Moving off the Map.md/Exported image 20240808113929-0.png differ diff --git a/Private Equity thoughts.md b/Private Equity thoughts.md index 948d04e..2729731 100644 --- a/Private Equity thoughts.md +++ b/Private Equity thoughts.md @@ -1,3 +1,5 @@ +#privateequity #covehill + My meeting with Nate yesterday triggered a few more thoughts on private equity and Cove Hill's ownership of Logos. 1. Their goal is, obviously, profit diff --git a/Problem exploration, selection and validation. Irrational Exuberance.md/Exported image 20240808113923-0.png b/Problem exploration, selection and validation. Irrational Exuberance.md/Exported image 20240808113923-0.png new file mode 100644 index 0000000..e9ef41c Binary files /dev/null and b/Problem exploration, selection and validation. Irrational Exuberance.md/Exported image 20240808113923-0.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-0.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-0.png new file mode 100644 index 0000000..91a9cbb Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-0.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-1.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-1.png new file mode 100644 index 0000000..59196a5 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-1.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-10.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-10.png new file mode 100644 index 0000000..bd26f32 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-10.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-100.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-100.png new file mode 100644 index 0000000..4ec104f Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-100.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-101.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-101.png new file mode 100644 index 0000000..b132299 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-101.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-102.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-102.png new file mode 100644 index 0000000..733ee58 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-102.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-103.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-103.png new file mode 100644 index 0000000..4412350 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-103.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-104.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-104.png new file mode 100644 index 0000000..ad8a9ec Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-104.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-105.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-105.png new file mode 100644 index 0000000..4fc8465 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-105.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-106.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-106.png new file mode 100644 index 0000000..9701633 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-106.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-107.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-107.png new file mode 100644 index 0000000..4431967 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-107.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-108.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-108.png new file mode 100644 index 0000000..ed072f0 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-108.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-11.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-11.png new file mode 100644 index 0000000..8d38bb3 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-11.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-12.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-12.png new file mode 100644 index 0000000..3c52794 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-12.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-13.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-13.png new file mode 100644 index 0000000..d8f2d46 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-13.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-14.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-14.png new file mode 100644 index 0000000..045989c Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-14.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-15.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-15.png new file mode 100644 index 0000000..9b8bbc9 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-15.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-16.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-16.png new file mode 100644 index 0000000..cb21aa4 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-16.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-17.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-17.png new file mode 100644 index 0000000..de284c0 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-17.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-18.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-18.png new file mode 100644 index 0000000..1a36357 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-18.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-19.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-19.png new file mode 100644 index 0000000..6baee53 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-19.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-2.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-2.png new file mode 100644 index 0000000..e9953b5 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-2.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-20.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-20.png new file mode 100644 index 0000000..d569ee5 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-20.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-21.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-21.png new file mode 100644 index 0000000..f43b020 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-21.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-22.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-22.png new file mode 100644 index 0000000..990638d Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-22.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-23.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-23.png new file mode 100644 index 0000000..0a00694 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-23.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-24.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-24.png new file mode 100644 index 0000000..41f818d Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-24.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-25.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-25.png new file mode 100644 index 0000000..5babbef Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-25.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-26.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-26.png new file mode 100644 index 0000000..d70af31 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-26.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-27.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-27.png new file mode 100644 index 0000000..53050c1 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-27.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-28.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-28.png new file mode 100644 index 0000000..e0a57ff Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-28.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-29.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-29.png new file mode 100644 index 0000000..3c29713 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-29.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-3.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-3.png new file mode 100644 index 0000000..6782671 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-3.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-30.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-30.png new file mode 100644 index 0000000..8d20118 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-30.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-31.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-31.png new file mode 100644 index 0000000..2cac0ed Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-31.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-32.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-32.png new file mode 100644 index 0000000..4667ec3 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-32.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-33.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-33.png new file mode 100644 index 0000000..1bd8b5f Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-33.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-34.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-34.png new file mode 100644 index 0000000..188bbcc Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-34.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-35.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-35.png new file mode 100644 index 0000000..cdafab4 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-35.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-36.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-36.png new file mode 100644 index 0000000..e531bca Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-36.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-37.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-37.png new file mode 100644 index 0000000..590c08e Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-37.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-38.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-38.png new file mode 100644 index 0000000..9b6cc24 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-38.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-39.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-39.png new file mode 100644 index 0000000..df198b4 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-39.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-4.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-4.png new file mode 100644 index 0000000..3f51017 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-4.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-40.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-40.png new file mode 100644 index 0000000..fcbccd5 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-40.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-41.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-41.png new file mode 100644 index 0000000..df27b0c Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-41.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-42.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-42.png new file mode 100644 index 0000000..070f41a Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-42.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-43.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-43.png new file mode 100644 index 0000000..ab53b94 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-43.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-44.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-44.png new file mode 100644 index 0000000..5a2453e Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-44.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-45.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-45.png new file mode 100644 index 0000000..6c662a1 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-45.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-46.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-46.png new file mode 100644 index 0000000..058fa2f Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-46.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-47.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-47.png new file mode 100644 index 0000000..ad69ce1 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-47.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-48.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-48.png new file mode 100644 index 0000000..f0c7ad8 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-48.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-49.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-49.png new file mode 100644 index 0000000..d26a7a1 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-49.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-5.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-5.png new file mode 100644 index 0000000..6ec3a6c Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-5.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-50.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-50.png new file mode 100644 index 0000000..c7b8158 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-50.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-51.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-51.png new file mode 100644 index 0000000..7c75ddd Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-51.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-52.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-52.png new file mode 100644 index 0000000..23cf61a Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-52.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-53.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-53.png new file mode 100644 index 0000000..5977453 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-53.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-54.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-54.png new file mode 100644 index 0000000..2f7522e Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-54.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-55.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-55.png new file mode 100644 index 0000000..94fe4e2 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-55.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-56.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-56.png new file mode 100644 index 0000000..3a15747 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-56.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-57.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-57.png new file mode 100644 index 0000000..4ceb1bf Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-57.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-58.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-58.png new file mode 100644 index 0000000..db6e322 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-58.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-59.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-59.png new file mode 100644 index 0000000..c928214 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-59.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-6.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-6.png new file mode 100644 index 0000000..7851fd9 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-6.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-60.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-60.png new file mode 100644 index 0000000..251259c Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-60.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-61.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-61.png new file mode 100644 index 0000000..7144cd6 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-61.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-62.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-62.png new file mode 100644 index 0000000..77e6e81 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-62.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-63.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-63.png new file mode 100644 index 0000000..9f3c055 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-63.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-64.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-64.png new file mode 100644 index 0000000..9bf00dd Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-64.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-65.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-65.png new file mode 100644 index 0000000..0f1a980 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-65.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-66.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-66.png new file mode 100644 index 0000000..fc25e86 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-66.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-67.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-67.png new file mode 100644 index 0000000..0836805 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-67.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-68.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-68.png new file mode 100644 index 0000000..6924d6b Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-68.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-69.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-69.png new file mode 100644 index 0000000..16b1c33 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-69.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-7.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-7.png new file mode 100644 index 0000000..cf6169a Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-7.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-70.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-70.png new file mode 100644 index 0000000..51de300 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-70.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-71.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-71.png new file mode 100644 index 0000000..5ecb244 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-71.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-72.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-72.png new file mode 100644 index 0000000..8a5a2bb Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-72.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-73.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-73.png new file mode 100644 index 0000000..538b4af Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-73.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-74.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-74.png new file mode 100644 index 0000000..fe45a37 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-74.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-75.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-75.png new file mode 100644 index 0000000..a6c3033 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-75.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-76.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-76.png new file mode 100644 index 0000000..8d61a4c Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-76.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-77.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-77.png new file mode 100644 index 0000000..d323539 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-77.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-78.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-78.png new file mode 100644 index 0000000..46cfedd Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-78.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-79.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-79.png new file mode 100644 index 0000000..12c5205 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-79.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-8.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-8.png new file mode 100644 index 0000000..8a6d798 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-8.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-80.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-80.png new file mode 100644 index 0000000..18ec098 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-80.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-81.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-81.png new file mode 100644 index 0000000..02cc088 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-81.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-82.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-82.png new file mode 100644 index 0000000..adac7f8 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-82.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-83.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-83.png new file mode 100644 index 0000000..87144a6 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-83.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-84.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-84.png new file mode 100644 index 0000000..6dfd89d Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-84.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-85.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-85.png new file mode 100644 index 0000000..c715c3c Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-85.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-86.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-86.png new file mode 100644 index 0000000..319bb37 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-86.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-87.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-87.png new file mode 100644 index 0000000..ed6ca70 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-87.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-88.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-88.png new file mode 100644 index 0000000..dc3d8c2 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-88.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-89.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-89.png new file mode 100644 index 0000000..1ddfb10 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-89.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-9.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-9.png new file mode 100644 index 0000000..9014d69 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-9.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-90.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-90.png new file mode 100644 index 0000000..51fba69 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-90.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-91.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-91.png new file mode 100644 index 0000000..49ce5b3 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-91.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-92.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-92.png new file mode 100644 index 0000000..d6c0bee Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-92.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-93.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-93.png new file mode 100644 index 0000000..6bd2f6e Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-93.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-94.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-94.png new file mode 100644 index 0000000..e5f9a4a Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-94.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-95.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-95.png new file mode 100644 index 0000000..93afd98 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-95.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-96.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-96.png new file mode 100644 index 0000000..99bb738 Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-96.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-97.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-97.png new file mode 100644 index 0000000..47048eb Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-97.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-98.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-98.png new file mode 100644 index 0000000..3b7b0df Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-98.png differ diff --git a/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-99.png b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-99.png new file mode 100644 index 0000000..1145dcc Binary files /dev/null and b/Problem of Pain, C.S. Lewis.md/Exported image 20240808113911-99.png differ diff --git a/Product management in infrastructure eng. Irrational Exuberance.md/Exported image 20240808113927-0.png b/Product management in infrastructure eng. Irrational Exuberance.md/Exported image 20240808113927-0.png new file mode 100644 index 0000000..76309d1 Binary files /dev/null and b/Product management in infrastructure eng. Irrational Exuberance.md/Exported image 20240808113927-0.png differ diff --git a/Real World Recommendation System – Part 1.md/Exported image 20240808113928-0.jpeg b/Real World Recommendation System – Part 1.md/Exported image 20240808113928-0.jpeg new file mode 100644 index 0000000..b00dd14 Binary files /dev/null and b/Real World Recommendation System – Part 1.md/Exported image 20240808113928-0.jpeg differ diff --git a/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-0.jpeg b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-0.jpeg new file mode 100644 index 0000000..9a12ac9 Binary files /dev/null and b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-0.jpeg differ diff --git a/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-1.jpeg b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-1.jpeg new file mode 100644 index 0000000..c6eb678 Binary files /dev/null and b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-1.jpeg differ diff --git a/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-2.jpeg b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-2.jpeg new file mode 100644 index 0000000..f0471f3 Binary files /dev/null and b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-2.jpeg differ diff --git a/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-3.jpeg b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-3.jpeg new file mode 100644 index 0000000..19bd8ec Binary files /dev/null and b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-3.jpeg differ diff --git a/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-4.jpeg b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-4.jpeg new file mode 100644 index 0000000..bf52c89 Binary files /dev/null and b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-4.jpeg differ diff --git a/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-5.png b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-5.png new file mode 100644 index 0000000..7b3ec9e Binary files /dev/null and b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-5.png differ diff --git a/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-6.jpeg b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-6.jpeg new file mode 100644 index 0000000..b1dbfc3 Binary files /dev/null and b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-6.jpeg differ diff --git a/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-7.jpeg b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-7.jpeg new file mode 100644 index 0000000..81753eb Binary files /dev/null and b/Recommended Reading Research, Funding, Support Autism Science Foundation.md/Exported image 20240808113940-7.jpeg differ diff --git a/Retaining wall diagram 1.md/Exported image 20240808114117-0.jpeg b/Retaining wall diagram 1.md/Exported image 20240808114117-0.jpeg new file mode 100644 index 0000000..9a973e0 Binary files /dev/null and b/Retaining wall diagram 1.md/Exported image 20240808114117-0.jpeg differ diff --git a/Retaining wall diagram 2.md/Exported image 20240808114116-0.jpeg b/Retaining wall diagram 2.md/Exported image 20240808114116-0.jpeg new file mode 100644 index 0000000..3be9733 Binary files /dev/null and b/Retaining wall diagram 2.md/Exported image 20240808114116-0.jpeg differ diff --git a/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md/Exported image 20240808113914-0.png b/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md/Exported image 20240808113914-0.png new file mode 100644 index 0000000..9996dc8 Binary files /dev/null and b/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md/Exported image 20240808113914-0.png differ diff --git a/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md/Exported image 20240808113914-1.png b/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md/Exported image 20240808113914-1.png new file mode 100644 index 0000000..dbb0521 Binary files /dev/null and b/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md/Exported image 20240808113914-1.png differ diff --git a/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md/Exported image 20240808113914-2.png b/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md/Exported image 20240808113914-2.png new file mode 100644 index 0000000..5ed814f Binary files /dev/null and b/Scaling up the Prime Video audiovideo monitoring service and reducing costs by 90% - Prime Video Tech.md/Exported image 20240808113914-2.png differ diff --git a/Struggling Boy Finds Hope, Purpose, and Self-Worth through Trail Life Mentors.md/Exported image 20240808113917-0.jpeg b/Struggling Boy Finds Hope, Purpose, and Self-Worth through Trail Life Mentors.md/Exported image 20240808113917-0.jpeg new file mode 100644 index 0000000..2f961a2 Binary files /dev/null and b/Struggling Boy Finds Hope, Purpose, and Self-Worth through Trail Life Mentors.md/Exported image 20240808113917-0.jpeg differ diff --git a/Struggling Boy Finds Hope, Purpose, and Self-Worth through Trail Life Mentors.md/Exported image 20240808113917-1.jpeg b/Struggling Boy Finds Hope, Purpose, and Self-Worth through Trail Life Mentors.md/Exported image 20240808113917-1.jpeg new file mode 100644 index 0000000..9a0ca7e Binary files /dev/null and b/Struggling Boy Finds Hope, Purpose, and Self-Worth through Trail Life Mentors.md/Exported image 20240808113917-1.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-0.jpeg b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-0.jpeg new file mode 100644 index 0000000..d337e3e Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-0.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-1.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-1.gif new file mode 100644 index 0000000..d52cfd3 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-1.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-10.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-10.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-10.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-11.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-11.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-11.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-12.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-12.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-12.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-13.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-13.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-13.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-14.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-14.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-14.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-15.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-15.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-15.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-16.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-16.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-16.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-17.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-17.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-17.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-18.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-18.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-18.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-19.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-19.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-19.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-2.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-2.gif new file mode 100644 index 0000000..d52cfd3 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-2.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-20.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-20.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-20.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-21.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-21.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-21.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-22.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-22.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-22.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-23.jpeg b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-23.jpeg new file mode 100644 index 0000000..e9debf9 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-23.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-24.jpeg b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-24.jpeg new file mode 100644 index 0000000..7d93774 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-24.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-25.jpeg b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-25.jpeg new file mode 100644 index 0000000..27c87c7 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-25.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-26.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-26.gif new file mode 100644 index 0000000..ddf1e31 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-26.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-27.jpeg b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-27.jpeg new file mode 100644 index 0000000..bfa4a50 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-27.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-28.jpeg b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-28.jpeg new file mode 100644 index 0000000..c60dca3 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-28.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-29.jpeg b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-29.jpeg new file mode 100644 index 0000000..a683b0f Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-29.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-3.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-3.gif new file mode 100644 index 0000000..d52cfd3 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-3.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-30.jpeg b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-30.jpeg new file mode 100644 index 0000000..7db596b Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-30.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-31.jpeg b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-31.jpeg new file mode 100644 index 0000000..5514a34 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-31.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-32.jpeg b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-32.jpeg new file mode 100644 index 0000000..64089a4 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-32.jpeg differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-4.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-4.gif new file mode 100644 index 0000000..d52cfd3 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-4.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-5.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-5.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-5.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-6.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-6.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-6.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-7.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-7.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-7.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-8.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-8.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-8.gif differ diff --git a/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-9.gif b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-9.gif new file mode 100644 index 0000000..d8d3122 Binary files /dev/null and b/The Fraud Behind the MMR Scare - News Coverage from IAC.md/Exported image 20240808113939-9.gif differ diff --git a/Untitled note 1.md/305e82da0687bc4fb7ab116f2a3407cf.pdf b/Untitled note 1.md/305e82da0687bc4fb7ab116f2a3407cf.pdf new file mode 100644 index 0000000..20b9458 Binary files /dev/null and b/Untitled note 1.md/305e82da0687bc4fb7ab116f2a3407cf.pdf differ diff --git a/Untitled note 1.md/p4028.pdf b/Untitled note 1.md/p4028.pdf new file mode 100644 index 0000000..20b9458 Binary files /dev/null and b/Untitled note 1.md/p4028.pdf differ diff --git a/Untitled note.md/Exported image 20240808113938-0.png b/Untitled note.md/Exported image 20240808113938-0.png new file mode 100644 index 0000000..dea4859 Binary files /dev/null and b/Untitled note.md/Exported image 20240808113938-0.png differ diff --git a/Untitled note.md/Exported image 20240808113938-1.png b/Untitled note.md/Exported image 20240808113938-1.png new file mode 100644 index 0000000..d9b3418 Binary files /dev/null and b/Untitled note.md/Exported image 20240808113938-1.png differ diff --git a/Untitled note.md/Exported image 20240808113938-2.png b/Untitled note.md/Exported image 20240808113938-2.png new file mode 100644 index 0000000..1de075a Binary files /dev/null and b/Untitled note.md/Exported image 20240808113938-2.png differ diff --git a/Untitled note.md/Exported image 20240808113938-3.png b/Untitled note.md/Exported image 20240808113938-3.png new file mode 100644 index 0000000..919b256 Binary files /dev/null and b/Untitled note.md/Exported image 20240808113938-3.png differ diff --git a/Untitled note.md/Exported image 20240808113938-4.png b/Untitled note.md/Exported image 20240808113938-4.png new file mode 100644 index 0000000..19c749e Binary files /dev/null and b/Untitled note.md/Exported image 20240808113938-4.png differ diff --git a/Untitled note.md/Exported image 20240808113938-5.png b/Untitled note.md/Exported image 20240808113938-5.png new file mode 100644 index 0000000..90e27ba Binary files /dev/null and b/Untitled note.md/Exported image 20240808113938-5.png differ diff --git a/Untitled note.md/p2068.pdf b/Untitled note.md/p2068.pdf new file mode 100644 index 0000000..f75e062 Binary files /dev/null and b/Untitled note.md/p2068.pdf differ diff --git a/Valley shower faucet cartridge replacement.md/Exported image 20240808114111-0.jpeg b/Valley shower faucet cartridge replacement.md/Exported image 20240808114111-0.jpeg new file mode 100644 index 0000000..255184d Binary files /dev/null and b/Valley shower faucet cartridge replacement.md/Exported image 20240808114111-0.jpeg differ diff --git a/Valley shower faucet cartridge replacement.md/Exported image 20240808114111-1.jpeg b/Valley shower faucet cartridge replacement.md/Exported image 20240808114111-1.jpeg new file mode 100644 index 0000000..511976d Binary files /dev/null and b/Valley shower faucet cartridge replacement.md/Exported image 20240808114111-1.jpeg differ diff --git a/Valley shower faucet cartridge replacement.md/Exported image 20240808114111-2.jpeg b/Valley shower faucet cartridge replacement.md/Exported image 20240808114111-2.jpeg new file mode 100644 index 0000000..c88b218 Binary files /dev/null and b/Valley shower faucet cartridge replacement.md/Exported image 20240808114111-2.jpeg differ diff --git a/What is Scrumban Definition, Overview, and Examples.md/Exported image 20240808113924-0.png b/What is Scrumban Definition, Overview, and Examples.md/Exported image 20240808113924-0.png new file mode 100644 index 0000000..1117d6f Binary files /dev/null and b/What is Scrumban Definition, Overview, and Examples.md/Exported image 20240808113924-0.png differ diff --git a/What is Scrumban Definition, Overview, and Examples.md/Exported image 20240808113924-1.png b/What is Scrumban Definition, Overview, and Examples.md/Exported image 20240808113924-1.png new file mode 100644 index 0000000..c96a621 Binary files /dev/null and b/What is Scrumban Definition, Overview, and Examples.md/Exported image 20240808113924-1.png differ diff --git a/What is a Boy.md/Exported image 20240808113917-0.jpeg b/What is a Boy.md/Exported image 20240808113917-0.jpeg new file mode 100644 index 0000000..9972b58 Binary files /dev/null and b/What is a Boy.md/Exported image 20240808113917-0.jpeg differ diff --git a/When is it right to leave a church.md/Exported image 20240808113933-0.gif b/When is it right to leave a church.md/Exported image 20240808113933-0.gif new file mode 100644 index 0000000..4bb5c5c Binary files /dev/null and b/When is it right to leave a church.md/Exported image 20240808113933-0.gif differ diff --git a/When is it right to leave a church.md/Exported image 20240808113933-1.gif b/When is it right to leave a church.md/Exported image 20240808113933-1.gif new file mode 100644 index 0000000..5308122 Binary files /dev/null and b/When is it right to leave a church.md/Exported image 20240808113933-1.gif differ diff --git a/httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md/Attachment.pdf b/httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md/Attachment.pdf new file mode 100644 index 0000000..71f25af Binary files /dev/null and b/httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md/Attachment.pdf differ diff --git a/httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md/Exported image 20240808113921-0.png b/httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md/Exported image 20240808113921-0.png new file mode 100644 index 0000000..31c73ec Binary files /dev/null and b/httpsblackgirlbytes.deva-beginners-guide-to-prompt-engineering-with-github-copilot.md/Exported image 20240808113921-0.png differ diff --git a/httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md/Attachment.pdf b/httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md/Attachment.pdf new file mode 100644 index 0000000..93fcae1 Binary files /dev/null and b/httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md/Attachment.pdf differ diff --git a/httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md/Exported image 20240808113920-0.png b/httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md/Exported image 20240808113920-0.png new file mode 100644 index 0000000..0e7caf4 Binary files /dev/null and b/httpsworld.hey.comdhhcloud-exit-pays-off-in-performance-too-4c53b697.md/Exported image 20240808113920-0.png differ