Oddbean new post about | logout

Notes by lkraider | export

 I'm learning a lot about cryptography. Just enough to be incompetent. 
 The whole of my formal cryptography training:

Cipher = Plain xor Key
<—>
Plain = Cipher xor Key

🧙🏻‍♂️ 
 There are 2 coding realities today:
- Every C code is being rewritten in Rust.
- Every Java code ... 
 Ask the AI Oracles. 
 > _but grug learn control passions, major difference between grug and animal_ 
 USER: Can you make a python library for this?

AGENT: Certainly! Below is a simple Python library that implements the Cornish numeral system. This library provides functions to convert numbers to Cornish numerals and vice versa.

### Cornish Numerals Library

```python
# cornish_numerals.py

class CornishNumerals:
    # Basic numerals and their Cornish representations
    basic_numerals = {
        1: "un",
        2: "dew",
        3: "tri",
        4: "peswar",
        5: "pymthek",
        6: "hwegh",
        7: "seyth",
        8: "ew",
        9: "nav",
        10: "deg",
        20: "ugens",
        30: "trigain",
        40: "peswarugens",
        50: "pymtheg",
        60: "hwegh",
        100: "kan"
    }

    @classmethod
    def to_cornish(cls, number):
        if number <= 10:
            return cls.basic_numerals.get(number, None)
        elif number < 20:
            return f"{cls.basic_numerals[10]} ha {cls.basic_numerals[number - 10]}"
        elif number >= 20:
            m = number // 20
            n = number % 20
            parts = []
            if m > 0:
                parts.append(cls.basic_numerals[20 * m])
            if n > 0:
                if n <= 10:
                    parts.append(cls.basic_numerals[n])
                else:
                    parts.append(f"{cls.basic_numerals[10]} ha {cls.basic_numerals[n - 10]}")
            return " ha ".join(parts)

        return None

    @classmethod
    def from_cornish(cls, cornish_numeral):
        # Handle basic numerals
        for key, value in cls.basic_numerals.items():
            if cornish_numeral == value:
                return key

        # Handle compound numerals
        parts = cornish_numeral.split(" ha ")
        total = 0
        for part in parts:
            if part in cls.basic_numerals.values():
                total += list(cls.basic_numerals.keys())[list(cls.basic_numerals.values()).index(part)]
            else:
                for key, value in cls.basic_numerals.items():
                    if part == value:
                        total += key
                        break
        return total

# Example usage
if __name__ == "__main__":
    # Convert number to Cornish numeral
    for i in range(1, 30):
        print(f"{i} in Cornish: {CornishNumerals.to_cornish(i)}")

    # Convert Cornish numeral back to number
    example_numeral = "ugens ha tri"
    print(f"{example_numeral} is {CornishNumerals.from_cornish(example_numeral)} in numeric form.")
```

### Explanation

1. **Class Definition**: The `CornishNumerals` class contains methods to convert numbers and Cornish numerals.
2. **Basic Numerals**: A dictionary maps integers to their Cornish representations.
3. **Conversion Methods**:
   - `to_cornish(number)`: Converts a numeric integer to its Cornish numeral representation.
   - `from_cornish(cornish_numeral)`: Converts a Cornish numeral back to its numeric form.
4. **Example Usage**: The script includes an example that demonstrates the conversion both ways.

### How to Use

1. Save the code in a file named `cornish_numerals.py`.
2. Run the script, or import the `CornishNumerals` class in another Python script to use its methods.

This library can be expanded with more features, such as handling larger numbers or improving error handling as needed. 
 I’ve been fascinated by an idea that doesn’t have a word, so I am going to coin one:

Cryptop... 
 The issue is to assume that through that “study” - and that’s a can of worms on its own - it necessarily follows that systematizing the lived experience into some information system will render any greater insight. For example, it is clear that explaining all about a sport like basketball doesn’t make the person that doesn’t practice that sport into a good basketball player. Learning, as a form of encyclopedic knowledge, is not a complete knowledge. The same reason as simply reading about religion is not the same as practicing a religion. The Truth is not encoded into systems of knowledge, but in lived experience, and trying to convey it through systematization is always a lower resolution version of that. 
 The presumptions there are not all true in that captchas are unique to solving them:

Brute-force protection doesn’t require captchas to solve. IP throttling goes a long way, and botnets can be detected at scale too.

Form spam can be filtered by content filters instead.

Web scraping is the same deal as brute-force protection.

Fakes signup: if your user account is so highly valued, require  phone number verification.

Web resources: again, rate limiting.

Sure captchas can help in those areas, but they are overly employed I think because they are a good business and those business keep pushing them as a solution for everything, and in turn create a bad internet user experience overral for how widespread they are now. 
 The correct response of course is you stop the trolley and eat all the ice cream yourself. 
 Wow, negentropy is amazing 
 What is it? In human terms… 
 Depends what your device can handle. Think of it like this: the full model might be 4Gb, if your device has 8Gb it might fit in memory, so 100% of the layers can be loaded there (and still have some room for the system and apps and such). But if your device has only 6Gb or 4Gb, the whole model will not fit, so you will need to test if 50% can be loaded into memory, or maybe less. At some point it might not make sense to use the GPU if only too little layers are loaded there, since the overhead of combining CPU + GPU work can predominate. Also, you need free memory space for the context window, so bigger contexts will consume more space and leave less space for layers, while smaller context leaves space for more layers. 
 Seria mais como: “temos que garantir o acesso ao fogo a todos de forma segura e efetiva, instituicionalizando o fogo através do nosso ministério que irá garantir que todos possam receber o fogo em suas casas através de especialistas em fogo treinados e mantidos pela colaboração obrigatória de toda população.“ 
 Just loaded up an app codebase from 3 years ago. Nothing works and it barely compiles. 😅

Code... 
 Runtime platforms are what perish. 
 Wrong take. You can’t evade suffering, it is like energy, you just shove it elsewhere. 
 Someone needs to inform them it will take even more money and still will not work. 
 Humans are monkeys, using our monkey hards on our monkey phones. Ordering monkey food made by oth... 
 We are humans. Deconstruction will not help you find enlightenment. 
 every new keypair reinforces the bulwark of freedom.

generate a key, save the world. 
 Meaning comes first, not as consequence. 
 Rumble has already folded for censorship in Brazil, don’t see them as a beacon of resistance. 
 Sempre achei curiosos isso. Por exemplo, é possível “injentar” uma dose de vírus em uma planta e causar doença nela? Ou é necessário que certos fatores ambientais proporcionem fatores que levam a doença? Acredito que seria um bom teste a se fazer.  
 Want to support nostr?  Simple.  Change your default zap size to 1000 sats.  And top up monthly. ... 
 I have zero zaps unfortunately, still glad I can use this network without payments tho 
 I guess they reason you can then print multiple files if you need to cover a larger area. 
 Essa imagem me parece coisa de comunista revolucionário. 
 O ato revolucionário social moderno é uma construção com base no movimento comunista, que cria alguma dicotomia social como gatilho para a revolução. O objetivo não é resolver a dicotomia, mas sim criar um estado permanente de desconstrução social. 

E especificamente essa imagem porque ela é do Occupy movement de justiça social, que é basicamente comunismo 2.0 mas usando segregação racial como a dicotomia da vez. https://openspace.sfmoma.org/2012/12/an-idea-cannot-be-destroyed/ 
 Testflight is up! We’re live. nostr:note1wgeck0dfpe6skag79t568jplsprj58x58fx6alpcrwy375jw6hvqjw... 
 I’m stuck on iOS 15 :( 
 He simply repackaged the periodic table designed by Walter Russell and featured in his book “The Universal One” published in 1926.