git ssb

0+

dinoworm πŸ› / campjs-viii-ludditejs



Tree:
πŸ“„.gitignore
πŸ“„LICENSE
πŸ“„NOTES.md
πŸ“„README.md
πŸ“„avatar.png
πŸ“dist
πŸ“„enspiral.png
πŸ“„example.js
πŸ“„index.css
πŸ“„index.html
πŸ“„index.js
πŸ“„package-lock.json
πŸ“„package.json
πŸ“stuff
πŸ“test
README.md

luddite.js


hey CampJS VIII

i'm Mikey (@ahdinosaur) from Enspiral

<div class="row">
<a href="http://dinosaur.is.com">
<img alt="Mikey's avatar" src="./avatar.png" width="200" />
</a>
<a href="http://enspiral.com">
<img alt="Enspiral logo" src="./enspiral.png" width="200" />
</a>
</div>

slides are available at http://dinosaur.is/campjs-viii-ludditejs.

???

second time presenting at a conference.

i'm going to attack some JavaScript patterns, but i use those patterns too.

everyone in the JavaScript community is doing a wonderful job.

apologies in advance if i disguise any opinions as facts.


what?

luddite.js is simple decentralized JavaScript.

???

a study of JavaScript evolution

also totally made up

JavaScript was good

now it's popular

here's the beef


Luddite?

the Luddites was a political movement against automated centralized technology.

<img src="./luddite.jpeg" />

???


but JavaScript?

at the

???

simple primitives

what if i told you...

that you only needed plain functions and objects?

???


sync function

function fn (...args) { return value }
const fn = (...args) => { return value }
const fn = (...args) => value
const fn = (...args) => ({ value })

sync function error

function fn (...args) { throw error }
try {
  fn(...args)
} catch (const err) {
  // handle error
}

require / module.exports =

const thing = require('module')
module.exports = thing
const { thing: thingy } = require('module')
module.exports = { thing: thingy }

vs: import / export

import thing from 'module'
import { thing as thingy } from 'module'

hyperscript

const h = require('react-hyperscript')

module.exports = Table

function Table ({ rows ) {
  return h('table.table', rows.map(row => {
    h('tr.row', row.map(item => {
      h('td.item', item)
    })
  })
}

vs: jsx

const React = require('react')

export default function Table ({ rows ) {
  return <table className='table'>
    {rows.map(row => {
      <tr className='row'>
        {row.map(item => {
          <td className='item'>{item}</td>
        })}
      </tr>
    })
  </table>
}

async function


continable


vs: promise


callback errors


promise errors


observ-able


vs: es observable


pull stream


vs: wg-streams


why am i picking on tc39?


top-down decision-making


bloat


snippet-driven development


what is a standard?

example: feross/standard


how to we do better standards?

less coupling to trendy libraries, more function signature conventions: https://twitter.com/jekrb/status/859242655011745793


redux


tc39

a great team advancing the state of the art in JavaScript,

but is one of many possible JavaScript standards.


what other standards?


what if i told you...

that anyone can make a JavaScript standard?


standards in the wild


Node.js core


require


callback(error, result)

???


async ecosystem

to make callbacks sane


programmer errors

???


Node.js userland

???


hyperscript


continuables


observ-ables


pull streams

???

differences with node streams:

redux

http middleware

depject

stories

why

When engineering is about β€œsolving interesting problems” and never about why these are problems, you get stuff like Uber.

https://twitter.com/sanspoint/status/856185837582790655

Node.js core

references

Built with git-ssb-web