Skip to content

Instantly share code, notes, and snippets.

View BekaValentine's full-sized avatar

Rebecca Valentine BekaValentine

View GitHub Profile
@BekaValentine
BekaValentine / medsets.hs
Created December 24, 2020 08:42
Kathryn's Med Set Problem
-- Problem
--
-- Given a set of people P, and for each person p in P, a set of meds M_p that the person takes
-- Find the partitions of P for which every set t in the partition, every medication that some person in t takes
-- is taken at least two people in t, and the partition has the maximum number of subsets.
--
-- Rephrased: the set of largest partitions of a set of people P, for which each set in the partition
-- consists of people who share each medication w/ someone else in the set.
--
-- Example
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
main = print ()
-- generic types
data Zero r
data One r = Unit
data X r = Rec r
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeOperators #-}
module ASTs where
-- Let's do Hutton's Razor. Here's the version with a standard
Q) What's the stack graph for the following program
def foo(x):
return x
foo(1)
Q) What are the stack graph analogs of the following scope graph programs
1.
beka@ultralaser:~/Projects/RetroUI/src$ mypy --strict retroui/terminal/colorswatch.py
Traceback (most recent call last):
File "/home/beka/.local/bin/mypy", line 10, in <module>
sys.exit(console_entry())
File "/home/beka/.local/lib/python3.7/site-packages/mypy/__main__.py", line 8, in console_entry
main(None, sys.stdout, sys.stderr)
File "mypy/main.py", line 89, in main
File "mypy/build.py", line 180, in build
File "mypy/build.py", line 249, in _build
File "mypy/build.py", line 2649, in dispatch
Alice wishes to get some information from Bob.
Both Alice and Bob each have a key pair:
```
pk_alice (Alice's public key), sk_alice (Alice's secret key)
pk_bob (Bob's public key), sk_bob (Bob's secret key)
```
To get the information, Alice sends Bob a message consisting of:

lovedaresnot protocol proposal

The protocol has two components: an absolute consensus component, and then a way to calculate thresholded consensus, and finally an efficiency improvement on the thresholded consensus.

absolute consensus

N voters want to determine if they all agree on a binary proposition.

I wonder what Illich would think of these. I think these are more convivial than not, now that they're in a more affordable price range. Hackerspaces especially have the feel of convivialization, because when they're Open, they have the tendency to reduce the need for specialization and such by not only making the tool available to all financial levels, but also eliminating the need for controlled specialized knowledge.

But this raises some questions: many of the tools we use in hackerspaces DO have some amount of constraints here: a novice who breaks the only 3D printer in the space makes it unusable for everyone and thus is a thing we wish to avoid. Some

“The core idea was that radical or difficult ideas were held back by the
thought that no one else had them. That fear of isolation led people to stay
"in the closet" about their ideas, making them the "love that dares not speak
its name." So lovedaresnot (shortened to "Dare Snot") gave you a way to find
out if anyone else felt the same, without forcing you to out yourself.
Anyone could put a question -- a Snot Dare -- up, like "Do you think we should
turf that sexist asshole?" People who secretly agreed signed the question with
a one-time key that they didn't have to reveal unless a pre-specified number
of votes were on the record. Then the system broadcast a message telling