git ssb

0+

dinoworm 🐛 / campjs-viii-ludditejs



Commit 4db53a552e3e351132de9ff96cd61a20cc4810ee

okay

Michael Williams committed on 8/6/2017, 12:21:47 AM
Parent: c563ee340b811683da77ae884f028ad43419ef51

Files changed

README.mdchanged
index.htmlchanged
README.mdView
@@ -69,10 +69,12 @@
6969 - i take the Douglas Engelbart approach to developer experience
7070 - you may have heard of the Mother of all Demos, if not i highly recommend you check it out
7171 - he intended to boost collective intelligence to solve urgent global problems
7272 - Englebart's vision was that the power of technology came with inherent complexity
73 + - not a good idea to sweep complexity under the rug
7374 - so priority is not ease of use but powerful human computer expression
74-- let's evolve our JavaScript together to solve urgent global problems
75 + - kinda the opposite of Steve Jobs
76 +- keen to evolve our JavaScript with this in mind
7577
7678 references:
7779
7880 - https://alistapart.com/column/douglas-engelbart
@@ -93,9 +95,8 @@
9395 ???
9496
9597 an ambiguous utopia
9698
97-
9899 ---
99100 class: info
100101
101102 ## Luddite?
@@ -152,9 +153,9 @@
152153 class: info
153154
154155 ### what is a standard?
155156
156-anything that enough people use is a "standard"
157 +a standard is an opinion about a pattern
157158
158159 example: ["standard style"](https://github.com/feross/standard)
159160
160161 ```
@@ -162,9 +163,9 @@
162163 ```
163164
164165 ???
165166
166-- a standard is one opinion, shared my many
167 +- an opinion that enough people agree with is a serious standard
167168 - tc39 is a great team advancing the state of the art in JavaScript,
168169 - but the standards produced by tc39 are only one of _many_ possible JavaScript opinions
169170 - we all have the power to create our own JavaScript opinions
170171 - no experience necessary!
@@ -289,10 +290,8 @@
289290 - why new syntax?
290291 - there's myths that es modules make possible something new
291292 - what is happening here?
292293 - i find this can be confusing for beginners who don't understand the special syntax and complex implementation details
293-- in the wild, export default breaks CommonJS code
294- - yes, i'm bitter about this, i've lost many hours debugging broken code, only to realize the module author published a patch version that broke the CommonJS exports
295294
296295 ---
297296 class: success
298297
@@ -320,10 +319,52 @@
320319 - wrap in closure to provide global variables like `require`, `module`, `exports`, `global`
321320 - run code in JavaScript interpreter
322321 - capture result of `module.exports` variable
323322 - when i started using Node.js from Python, `require`-as-a-function is what excited me the most
324- - so yes, i'm somewhat bitter that now JavaScript is adopting the same syntax as Python
323 +
325324 ---
325 +class: success
326 +
327 +### depject
328 +
329 +```js
330 +const module = {
331 + needs: {
332 + message: {
333 + layout: 'first',
334 + render: 'map',
335 + decorate: 'reduce'
336 + }
337 + },
338 + gives: {
339 + message: {
340 + view: true
341 + }
342 + },
343 + create: ({ message: { layout, render, decorate }) => {
344 + return { message: { view } }
345 +
346 + function view () {}
347 + }
348 +}
349 +
350 +combine([modules...])
351 +```
352 +
353 +???
354 +
355 +https://github.com/depject/depject
356 +
357 +- dependency injection for overlapping opinions
358 +- each module is an object with exposes `{ needs, gives, create }`
359 +- `needs` is a map of names to types
360 + - first: use the first module that has an opinion about a thing
361 + - map: get each module's opinion about a thing
362 + - reduce: compose each module's opinion about a thing into one opinion
363 +- gives is an object of names to export
364 +- create is a function which receives needed plugs and returns given plugs
365 +
366 +---
326367 class: center, info
327368
328369 ## dom elements
329370
@@ -363,8 +404,9 @@
363404 - looks friendly on the surface, but underneath has non-obvious edge cases
364405 - hides that JSX is actually `React.createElement` function calls
365406 - "why can't i use `if () { first } else { second }`?
366407 - can only use expressions, not statements
408 +- new syntax means you need a special code syntax highlighter, i ran out of time
367409
368410 ---
369411
370412 class: success
@@ -397,10 +439,10 @@
397439 ```
398440
399441 ???
400442
401-- syntax can be confusing at first
402-- `React.createElement` is basically a strict hyperscript
443 +- same with lust functions
444 +- syntax can be unattractive at first
403445
404446 see also:
405447
406448 - [`hyperscript-helpers`](https://github.com/ohanhi/hyperscript-helpers)
@@ -437,8 +479,12 @@
437479 return h('div', { className }, text)
438480 )
439481 ```
440482
483 +???
484 +
485 +- `React.createElement` is basically a strict hyperscript
486 +
441487 ---
442488 class: center, info
443489
444490 ## eventual value
@@ -544,10 +590,13 @@
544590 ???
545591
546592 - promise errors smush the user and programmer errors together
547593 - promises wrap all your handlers in a `try` / `catch`, so even if you have a different opinion about error handling, promises will force it's opinion on you
548- - yes, i'm bitter about this, i've lost many hours trying to figure out where my errors went
549594
595 +i could talk about how to do pipe continuable as a waterfall, in parallel, etc, but...
596 +
597 +both continuables and promises have their own place in hell, we need better abstractions.
598 +
550599 ---
551600 class: center, info
552601
553602 ## reactive values
@@ -725,8 +774,25 @@
725774 // first value: 0
726775 ```
727776
728777 ---
778 +class: info
779 +
780 +#### pull stream errors
781 +
782 +with a pull stream source callback, there are four possible signals:
783 +
784 +1. value: `callback(null, value)`
785 +2. user error: `callback(error)`
786 +3. programmer error: `throw error`
787 +4. complete: `callback(true)`
788 +
789 +???
790 +
791 +- both the source and sink can signal back-pressure ("hey i'm busy") by not calling the respective callback
792 +
793 +
794 +---
729795 class: success
730796
731797 #### sink spec
732798
@@ -860,8 +926,10 @@
860926
861927 #### compose pull streams
862928
863929 ```js
930 +pull(source, through, sink) === sink(through(source))
931 +
864932 pull(source, through) // returns source
865933
866934 pull(through, sink) // returns sink
867935
@@ -897,24 +965,8 @@
897965
898966 obviously you don't want to re-implement simple streams from scratch all the time
899967
900968 ---
901-class: info
902-
903-#### pull stream errors
904-
905-with a pull stream source callback, there are four possible signals:
906-
907-1. value: `callback(null, value)`
908-2. user error: `callback(error)`
909-3. programmer error: `throw error`
910-4. complete: `callback(true)`
911-
912-???
913-
914-- both the source and sink can signal back-pressure ("hey i'm busy") by not calling the respective callback
915-
916----
917969 class: center, info
918970
919971 ## why should you be a JavaScript luddite?
920972
@@ -922,10 +974,14 @@
922974 class: success
923975
924976 ### better performance
925977
926-software performance is less about gaining muscle, more about losing weight
978 +software performance is
927979
980 +less about gaining muscle
981 +
982 +more about losing weight
983 +
928984 ???
929985
930986 - code runs faster when it does less
931987 - was going to put a picture showing an over-powered muscly person versus a light and lean runner, but hey i'll leave it to your imagination :)
@@ -935,10 +991,12 @@
935991 class: success
936992
937993 ### easier to describe
938994
939-specification is a function signature, not a complex state machine
995 +specification is a function signature,
940996
997 +not a complex state machine
998 +
941999 ???
9421000
9431001 - clear inputs and outputs
9441002 - small code blocks (or "snippets") can be deceiving
@@ -1054,9 +1112,11 @@
10541112 class: success, center
10551113
10561114 #### offline social media
10571115
1058-<http://patchwork.campjs.com>
1116 +[patchwork.campjs.com](http://patchwork.campjs.com)
1117 +&
1118 +[scuttlebutt.nz](https://www.scuttlebutt.nz)
10591119
10601120 <img src="./patchwork-screenshot.jpg" height="400" class="center" />
10611121
10621122 ---
@@ -1134,11 +1194,11 @@
11341194 class: info
11351195
11361196 ### all the "standards"
11371197
1138-make up your own "standards"!
1198 +make up your own opinions!
11391199
1140-you have just as much a right to make the next JavaScript standard as anyone else.
1200 +your opinion about JavaScript is valid.
11411201
11421202 ???
11431203
11441204 at the end of the day, standards are just somebody's opinion.
index.htmlView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 901081 bytes
New file size: 902531 bytes

Built with git-ssb-web