7,416 karma · joined Oct 23, 2009 (17y ago) · 1,582 submissions
Email: charles@codemix.com
comment 9y ago · link · parent
comment 9y ago · link · parent
There is also no requirement that a Linux distribution includes any GNU software at all, should we refer to them as e.g Busybox/Linux?
comment 9y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent
Edit: Dear downvoters, normally it'd be unlikely for the name clash to matter, but because these are both JS libraries, both available on npm, it's the difference between `npm install static-land` and `npm install staticland` which would be an easy mistake for anyone to make.
comment 9y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
This is exactly the point though. The guidelines that apply in the Netherlands are different to the guidelines in, say, the UK, precisely because the two countries have very different attitudes towards cycling. In the Netherlands you have an environment where cycling is extremely common, motorists are very used to sharing the roads and in fact most motorists are also cyclists themselves. This dramatically reduces the sort of us vs them conflicts between cyclists and motorists that seem so common in other countries. Different types of road user are seen more or less equally and show each other a level of respect that is just about unheard of elsewhere. In such an environment, hogging the lane seems unnecessarily aggressive because you simply don't need to do it.
In the UK, USA and just about everywhere else motorists are simply not used to driving close to cyclists. They don't know how much space to leave, they don't know how to pass them safely, it's actually socially acceptable to be aggressive towards cyclists but most of all, motorists are not on the lookout for cyclists, they are not expecting them. In this kind of environment the cyclist's number one priority is to make themselves seen and that's why being assertive is so important.
If you're in the middle of the lane by default the car behind you might be annoyed but at least they are likely to see you, and when you've been seen you can then move closer to the kerb to allow them to pass you safely. This puts the cyclist in control in a situation where they'd normally be at the mercy of motorists.
comment 10y ago · link · parent
type User = {name: string, isAdmin: boolean};
// compiles to
const User = t.object(
t.property('name', t.string()),
t.property('isAdmin', t.boolean())
);
// which you can then use with
User.check({name: 'Alice'}); // boolean
User.assert({nom: false}); // throws
Ultimately it should be possible to use this to implement pattern matching in JS based on flow types, for example: type User = {
name: string;
roles: Role[];
};
type Role = {
id: number;
name: string;
users: User[]
};
const url = match(someInput,
(user: User) => `/users/${user.name}`,
(role: Role) => `/roles/${role.id}`,
(_) => `/` // default URL
);
The really hard thing is to do this whilst maintaining perfect compatibility with flow.comment 10y ago · link · parent
Actually kind of the opposite - babel used to use the common ESTree AST format, but they've moved away to something similar but incompatible.