zovirl
Joined 2 years ago
Joined 2 years ago
Humans already control the weather: https://en.wikipedia.org/wiki/Cloud_seeding.
We already have an example of humans sabotaging the measurement of weather: https://news.ycombinator.com/item?id=41684440. Two ranchers sabotaged weather monitoring stations in order to fraudulently collect millions in drought insurance. One of the farmhands involved ended up dead.
And we have an example of prediction markets attempting to manipulate reporting of events: https://news.ycombinator.com/item?id=47397822.
I have a hard time believing weather prediction markets will be net beneficial. The incentive for sabotage & manipulation up and down the chain seems likely to lead to worse weather predictions overall.
Honorable mentions might go to PICO-8's flavor of Lua (C-like but clearly designed to create a specific type of game and have a specific developer experience) and Excel (used for developing & balancing game mechanics, but usually replaced in the final product).
So much power! And right in line with Perl’s mantra, “there’s more than one way to do it.”
Unfortunately, our codebase contained more than one way of doing it. Different parts of the code used different, incompatible object systems. It was a lot of extra work to learn them all and make them work with each other.
It was a relief to later move to a language which only supported a single flavor of object-oriented programming.
You can acknowledge the problems more directly: "I get it, we don't have enough chairs so Wednesday is likely to be a challenge." or "I know mandatory 9-5 is going to disrupt your commute."
A bonus of the more precise approach is you can follow up with "do you have other issues with the new policy that I may not know?"
This article is a perfect example: it says syncing is a challenge for local-first apps, logical clocks and CRDTs are the solution, and then just ends. It ignores the elephant in the room: CRDTs get you consistency, but consistency isn’t enough.
Take a local-first text editor, for example: a CRDT ensures all nodes eventually converge on the same text, but doesn’t guarantee the meaning or structure is preserved. Maybe the text was valid English, or JSON, or alphabetized, but after the merge, it may not be.
My suspicion, and I might be going out on a limb here, is that articles don’t talk about this because there is no good solution to merging for offline or local-first apps. My reasoning is that if there was a good solution, git would adopt it. The fact that git stills makes me resolve merge conflicts manually makes me think no one has found a better way.
What made it click for me was http://www.exemark.com/FORTH/eForthOverviewv5.pdf, specifically sections 2.3 "Loops and Branches" and 5.3 "Structures". With a slight simplification, if/else/then branching is defined in 7 words.
Two primitive words, branch and ?branch (in python because I know it better than assembly):
def branch():
""" branch is followed by an address, which it unconditionally jumps to."""
ip = code[ip] # Get address from next cell in code, jump to it.
def branch_if_zero():
""" ?branch is followed by an address. ?branch either jumps to that address,
or skips over the address & continues executing, depending on the value on the
stack."""
if stack.pop() == 0: # Pop flag off stack
ip = code[ip] # Branch to address held in cell after ?branch
else:
ip += 1 # Don't branch, skip over address & keep executing
Two helper words for forward branching. >MARK adds a placeholder branch address to code and pushes the address of the placeholder. >RESOLVE resolves the branch by replacing the placeholder with the address from the stack. : >MARK ( -- A ) HERE 0 , ;
: >RESOLVE ( A -- ) HERE SWAP ! ;
And then the actual IF, ELSE, and THEN words. IF puts ?branch and a placeholder address in code. ELSE puts branch and a placeholder address in code, then updates the preceding branch address (from an IF or ELSE) to land after the ELSE. THEN updates the preceding branch address to land after the THEN. : IF ( -- A ) COMPILE ?branch >MARK ; IMMEDIATE
: ELSE ( A -- A ) COMPILE branch >MARK SWAP >RESOLVE ; IMMEDIATE
: THEN ( A -- ) >RESOLVE ; IMMEDIATE
> We'll go bare metal and then build an operating system of our own, with a C compiler of our own. It's simpler this way.
I love the audacity of those statements. And I appreciate this sort of approach which says "let's implement the simplest possible version of _______ to learn how it is done."