Skip to content

Instantly share code, notes, and snippets.

View bwestergard's full-sized avatar

Björn Westergard bwestergard

  • Mt. Pleasant, Washington, D.C.
View GitHub Profile
@bwestergard
bwestergard / murray_grammar.md
Last active April 10, 2017 16:43
"The Grammar of Value"

Excerpt from "The Mismeasure of Wealth", 2016

How is the Term ‘Value’ Used in Ordinary Language?

Let us do some analysis of ordinary language and try to spell out the grammar of the word ‘value’ as used in everyday talk about the kind of value that money measures. I will interpolate comments regarding Bailey’s views – which largely oppose ordinary language – as we go. In common usage we employ the word ‘value’ in phrases such as ‘the value of commodity a’ or in questions such as ‘has the value of commodity a gone up or down?’ or ‘Do commodities a and b have the same value?’ The ordinary usages of the term ‘value’ include the following features:

  1. Value is public [Footnote: Prices, the necessary form of expression of value according to Marx, are public]. To talk about ‘value for me’ disregards the grammar of ‘value’ just as talk about ‘truth for me’ violates the ordinary grammar of ‘truth’. My allergy to dairy products does not mean cheese has no val
@bwestergard
bwestergard / lxApi.js
Created December 6, 2016 16:39
lxApi
import { find, propEq, memoize, pipe, filter, toPairs, contains, map, fromPairs, concat } from 'ramda'
import { all, resolve } from 'bluebird'
const authHeader = memoize((token) => ({ Authorization: `Bearer ${token}` }))
const $http = require('http-as-promised').defaults({ resolve: 'body', json: true })
const lx = {
gateway: 'https://lanetix-gateway.herokuapp.com',
records: 'https://lanetix-records.herokuapp.com'
}
@bwestergard
bwestergard / tco.js
Last active December 4, 2016 21:39
Lazy Streams in Node
"use strict";
// http://stackoverflow.com/questions/23260390/node-js-tail-call-optimization-possible-or-not
// Tested and working with node v7.2.0. Both of the following work:
// node --harmony_tailcalls tco.js
// node --harmony tco.js
const natsFrom = (n) => [n, () => natsFrom(n+1)]
const kth = ([hd, tl], k) => k === 0 ? hd : kth(tl(), k - 1)
udpPort.send({
address: '/s_new',
args: ['ping', 400]
}, '127.0.0.1', 57110)
@bwestergard
bwestergard / json_populate_recordset.md
Created February 29, 2016 22:23
json_populate_recordset example
lanetix=# \d foo
           Table "scripting.foo"
 Column |         Type          | Modifiers 
--------+-----------------------+-----------
 id     | integer               | not null
 a      | character varying(40) | not null
 b      | character varying(40) | not null
 c      | character varying(40) | not null
@bwestergard
bwestergard / ubi.md
Last active December 15, 2015 19:23
Basic Income Bibliography
@bwestergard
bwestergard / bibliography.md
Last active November 27, 2015 22:30
Surplus Population Bibliography
@bwestergard
bwestergard / example.js
Last active August 29, 2015 14:26
Ramda "supercompiler"
// Ramda provides one, but just for verbosity
var add = function (x,y) { return x + y; };
var square = function (x) { return x * x; };
// Redundant looping
var sumSquares = R.pipe(
R.map(square),
R.reduce(add, 0)
);
[
{
"id": 0,
"description": "Science In Action",
"tags": "read philosophy",
"dependencies": [6]
},
{
"id": 1,
"description": "Conscience of the Revolution",