Xah Web Dev Blog Archive 2019-09

dot product of n vectors of any dimension

so yester we did JavaScript dot product of n vectors of any dimension

const vecDot = (( ... vectors) => vectors . reduce ((v1, v2) => v1. map ((x,i) => x * v2[i])) . reduce ( (a,b) => (a+b)) );

supreme code

Xah Talk Show
hand writing Chinese, JavaScript coding vector dot product function style, intro to constructed language 2019-12-14

Xah Talk Show
JavaScript+SVG live coding+tutorial. creating polyhedron real-time rotation from scratch 2019-11-23

The Garbage Webpack Wants You to Do

the garbage webpack wants you to do. basically, they are normalizing hack. creating hack solution to solve problem. like unix did to industry.

webpackjs loading image 2019-11-01 p9fkr
webpackjs loading image 2019-11-01

i think webpack basic features a great, e.g. bundling, removing unused code, minimize js, etc.

but they tried to basically change the JavaScript lang, by importing css, image, font etc Using JavaScript import syntax. to move image css etc seems a major hack. Moving file and dealing with html images is a complete different category of task then JavaScript import/export modules.

they try to make the dependency clear. but the way they did is a hack job, seems they are popularizing the practice by the tool.

that's how programing industry becomes garbage.

minor updates

JavaScript Webpack Bloat

JavaScript installing webpack installs 390 f packages. F JavaScript

js npm webpack install 2019-10-29 krjs9
js npm webpack install 2019-10-29

following webpack official tutorial, 7 lines of code (213 bytes) becomes 134 lines 565k. jesus.

webpackjs generated bloat 2019-10-30 n324t
webpackjs generated bloat 2019-10-30

imgur reactjs bloat

imgur has become rotten since about 2017. Since, you can't view images with JavaScript off.

imgur reactjs bloat 2019-10-31 cqv9w
imgur reactjs bloat 2019-10-31 cqv9w https://twitter.com/csswizardry/status/1185604806901207045

svelte.dev

this is supposed to be the latest and greatest, better than angular react vue https://svelte.dev

Event Delegation

js before after 2015 2019-10-04 b47s4
JavaScript 2015 before and after

npm choke on node version

apparently, in some dinosaur age, npm decided to sit on /usr/local/lib/node_modules , and that became a relic. by the way the whole /usr/local/ is the relic inherited from your love of the unix philosophy. few milen gen understand it today.

npm choke on node version 2019-10-01 cwy5k
npm choke on node version 2019-10-01

my unix skillz of 1999 comes back to life. had to do surgery to get npm upgraded on MacOS. #nodejs the pesky error “npm WARN npm npm does not support Node.js v11.14.0”

npm choke on node version 2019-10-01 4vsjn
npm choke on node version 2019-10-01

The Story of XML

The rise and fall of XML. Be conservative in what you send; be liberal in what you accept. 2019-10-01

Load Order (major update)