Email or username:

Password:

Forgot your password?
4 posts total
mei

fun fact:

>>> from amaranth import *
>>> meow = Signal()
>>> meow.name
'meow'

the signal can infer its name from the variable it’s been assigned to. it knows what variable it’s been assigned to.

this isn’t supposed to be possible. it isn’t possible.

but it works anyway.

because amaranth walks through the backtrace, finds the function in which you’re creating the Signal, disassembles its Python bytecode, and finds the right variable to read out its name

i’m not sure if i should be impressed or horrified :neocat_flush:

fun fact:

>>> from amaranth import *
>>> meow = Signal()
>>> meow.name
'meow'

the signal can infer its name from the variable it’s been assigned to. it knows what variable it’s been assigned to.

this isn’t supposed to be possible. it isn’t possible.

but it works anyway.

because amaranth walks through the backtrace, finds the function in which you’re creating the Signal, disassembles its Python bytecode, and finds the right variable to read out its name

rini ☁️

@mei I had made this awesome package doing this

>>> is_even(2)
True
>>> not is_even(3)
True
>>> is_even(5)
Fatal python error: number_not_even: Number was odd
[stacktrace]

To ensure truthfulness, the above error directly caused the following:

segmentation fault (core dumped) python
mei

elect me as Unicode consortium president! I will:

- mandate sitelen pona support in modern operating systems
- implement xkcd’s non-breaking snake proposal
- assign codepoints to the neocats, with ZWJ sequences for the hugging variants to allow for combinatorial variation
- introduce full configurability of the number of eyes in your cyryllic multiocular O
- remove the redundancy between the flags of Poland and Indonesia, factoring it out into a universal “rotate by 180 degrees” codepoint that will definitely not unleash chaos unto the world

the future is in our grasp! vote mei today!

elect me as Unicode consortium president! I will:

- mandate sitelen pona support in modern operating systems
- implement xkcd’s non-breaking snake proposal
- assign codepoints to the neocats, with ZWJ sequences for the hugging variants to allow for combinatorial variation
- introduce full configurability of the number of eyes in your cyryllic multiocular O
- remove the redundancy between the flags of Poland and Indonesia, factoring it out into a universal “rotate by 180 degrees” codepoint that will...

mei
> board train
> pull out my laptop
> guy next to me asks me whether I'm running i3 or sway
> we talk a bit
> i mention programming in rust
> they ask my pronouns
Go Up