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.
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
following webpack official tutorial, 7 lines of code (213 bytes) becomes 134 lines 565k. jesus.
imgur reactjs bloat
imgur has become rotten since about 2017. Since, you can't view images with JavaScript off.
svelte.dev
this is supposed to be the latest and greatest, better than angular react vue https://svelte.dev
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.
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”
Load Order (major update)