engineer, designer and plumber @tldraw dreaming of electric sheep ૮꒰˵• ﻌ •˵꒱ა

London
Joined December 2018
this took me way to long to fully understand
3
2
1
18
we need event driven claudes, oh wait, thats just tldraw fairies
i spend more time talking to bots about software architecture than humans right now, and I ain’t made about it.
fuck and this unlikely pair
i used to be so inspired by Apple, but seeing this horrid square to round radius buggy interaction being shipped on their phones is cooked
I read “Lever of Riches” and it was ace, consider this book bought by me
Highly recommended! The new book by Nobel Prize winner Joel Mokyr, Avner Greif, and Guido Tabellini. Two Paths to Prosperity: Culture and Institutions in Europe and China, 1000–2000 "In this landmark book, three leading economists offer a bold new account of why Europe and China evolved along such different trajectories. In the early Middle Ages, public goods like risk sharing, religious worship, education, and conflict resolution were provided by nonstate organizations in both societies. China increasingly relied on kin-based cooperation within clans, while weaker kinship ties in Europe gave rise to corporations such as guilds, universities, and self-governing towns." amzn.to/3XhWpQQ
friday night, time to de-slopify
AoE taught me that to build the best civilisation, you need cheat codes
the more I work with the tldraw codebase, the more I realise how cracked it is
oops, I think I fucked up
i'm gonna create some cool logos with globs in tldraw
bindings in tldraw made connecting these nodes a breeze and work out the box!
1
rage against the glob
this is what I get to do at work and why @tldraw is the best place to be in London right now
1
we can use this angle as a flag to check whether we take the larger or smaller arc. with atan2 angles > 180° are negative, as they represent clockwise movements and positive when < 180°. below we switch between the green and red arc as the angles go from ± 180° (or from positive to negative). problem solved, we get smooth glob caps
one neat property about the trig functions is that their periodic and thus automatically wrap for you. you can pass this raw difference to sin and cos and get the correct x, y values on the unit circle, and pass that to atan2.
a gotcha with atan2 is that it returns values in the [-180°, 180°] range. so taking two angles returned from atan2 and taking the raw difference can give misleading angles. you need to normalise them!
we can measure angles with atan2, between the endpoints and the centre of the node. there are two possibilities here: - angle is larger than 180° -> take the larger arc - angle is smaller than 180° -> take the smaller arc