git ssb

0+

dinoworm 🐛 / campjs-viii-ludditejs



Commit 76b336a49e9c19973592a5bc4a6817c87465b34a

things

Michael Williams committed on 8/5/2017, 11:04:36 AM
Parent: badf9524f5f9e1de0c15c5d16316367bd34b53de

Files changed

README.mdchanged
index.htmlchanged
README.mdView
@@ -37,9 +37,9 @@
3737 <http://dinosaur.is/campjs-viii-ludditejs>
3838
3939 ???
4040
41-- second time presenting at a conference.
41 +- second time presenting at a conference
4242 - i want to share what i am passionate about
4343 - i might say negative things about some JavaScript patterns, but i use those patterns too
4444 - i don't want to yuck your yum
4545 - i'll try to be upfront and honest, apologies in advance if i disguise any opinions as facts
@@ -51,9 +51,9 @@
5151 ## shout-out
5252
5353 ???
5454
55-- when i was writing this talk a few days ago, covered in Imposter Syndrome, i realized...
55 +- when i was writing this talk a few days ago, deep in Imposter Syndrome, i realized...
5656 - someone inspired my passion behind this talk without me realizing
5757
5858 ---
5959 class: info
@@ -173,8 +173,24 @@
173173
174174 ---
175175 class: info
176176
177 +what if i told you...
178 +
179 +<img src="./morpheus-cat.png" height="400" />
180 +
181 +that you only needed _functions and objects_?
182 +
183 +???
184 +
185 +- no fancy syntax necessary
186 + - less language clutter
187 +- how can we apply this pattern to the full stack?
188 +
189 +
190 +---
191 +class: info
192 +
177193 ### what is a _luddite.js_ standard?
178194
179195 a standard based on a function signature
180196
@@ -209,23 +225,8 @@
209225
210226 ## simple patterns based on function signatures
211227
212228 ---
213-class: info
214-
215-what if i told you...
216-
217-<img src="./morpheus-cat.png" height="400" />
218-
219-that you only needed _functions and objects_?
220-
221-???
222-
223-- no fancy syntax necessary
224- - less language clutter
225-- how can we apply this pattern to the full stack?
226-
227----
228229 class: success
229230
230231 ### just a function
231232
@@ -418,9 +419,9 @@
418419
419420 module.exports = Todos
420421
421422 const Todos = ({ items }) => (
422- h(List, {}, items.map(item =>
423 + h(List, null, items.map(item =>
423424 h(Item, { item })
424425 ))
425426 )
426427
@@ -444,9 +445,9 @@
444445
445446 ---
446447 class: danger
447448
448-### promise
449 +### promise spec
449450
450451 ```js
451452 const promise = new Promise((resolve, reject) => {
452453 // do stuff...
@@ -463,8 +464,10 @@
463464 ```
464465
465466 ???
466467
468 +https://tc39.github.io/ecma262/#sec-promise-objects
469 +
467470 TODO waterfall
468471
469472 parallel
470473
@@ -568,11 +571,11 @@
568571 ### observ-ables
569572
570573 reactive values using only functions!
571574
572-> - `thing()` gets the value
573-> - `thing.set(...)` sets the value
574-> - `thing(function (value) { ... })` listens to the value.
575 +- `thing()` gets the value
576 +- `thing.set(value)` sets the value
577 +- `thing((value) => { ... })` listens to the value
575578
576579 ???
577580
578581 - [`observ`](https://github.com/Raynos/observ)
@@ -583,13 +586,39 @@
583586 ---
584587 class: success
585588
586589 ```js
587-TODO add mutant html example
590 +const { h, Struct, Value, when } = require('mutant')
591 +
592 +const toggle = (state) => {
593 + state.set(!state())
594 +}
595 +
596 +const Activity = ({ activity: { isActive, text }) => (
597 + h('div', {
598 + style: {
599 + color: when(isActive, 'green', 'red')
600 + },
601 + events: {
602 + click: () => toggle(isActive)
603 + }
604 + }, text)
605 +)
606 +
607 +var activity = Struct({
608 + text: Value('give a talk'),
609 + isActive: Value(true)
610 +})
611 +var element = Activity({ activity })
612 +
613 +document.body.appendChild(element)
588614 ```
589615
590616 ???
591617
618 +- mutant has observables for all composite data structures: arrays, sets, dictionaries, etc
619 +- updates in-place, no dom diff-ing!
620 +
592621 ---
593622 class: center, info
594623
595624 ## values over time
@@ -645,16 +674,16 @@
645674
646675 ---
647676 class: success
648677
649-#### source spec
678 +#### source
650679
651680 ```js
652681 function createSource (...args) {
653682 // a source function accepts
654683 // - abort: a boolean whether to signal end
655684 // - callback: where to send next signal
656- return source (abort, callback) => {
685 + return (abort, callback) => {
657686 if (abort || done) callback(true)
658687 else callback(null, value)
659688 }
660689 }
@@ -779,15 +808,9 @@
779808 // a sink function: accept a source
780809 return (source) => {
781810 // but return another source!
782811 return (abort, callback) {
783- // if the through should abort, pass that on.
784- source(abort, (err, value) => {
785- // if the source has an error, pass that on.
786- if (err) callback(err)
787- // else transform the value
788- else callback(null, transformValue(value))
789- })
812 + // ...
790813 }
791814 }
792815 }
793816 ```
@@ -1145,10 +1168,10 @@
11451168 - [Tiny Guide to Non Fancy Node](https://github.com/yoshuawuyts/tiny-guide-to-non-fancy-node)
11461169
11471170 ## luddite.js apps
11481171
1172 +- https://scuttlebutt.nz/
1173 +- http://loopjs.com/
1174 +- https://choo.io/
11491175 - https://webtorrent.io/
11501176 - http://standardjs.com/
11511177 - https://peermaps.github.io/
1152-- http://loopjs.com/
1153-- https://scuttlebutt.nz/
1154-- https://choo.io/
index.htmlView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 901141 bytes
New file size: 901081 bytes

Built with git-ssb-web