cross-posted from: https://programming.dev/post/57259387

I wrote this a few months ago and figured I'd go ahead and post it. I originally wrote it as a way to process my feelings about my own beliefs. TW about depression, paranoia, and leaving one's birth religion.

I don’t know when I realized I was depressive. It should have been something I figured out early on, but didn’t hit me until later. I guess now is still early for most, given I’m 22. Realizing I lost my religion at the age of 17 made me have to recontextualize my worldview in a way that uprooted me from long held beliefs from birth. That was not easy. I remember at the beginning, just conceptualizing right and wrong as ideas that were not tied to a deity was difficult. The urge to pray was instilled in me since childhood, so it took a while before I stopped feeling it out of habit.

Something that has confused me since I started questioning my former faith is how anyone can believe that “objective” morality is an intelligible concept. Morality is a framework for how an individual conceptualizes the weight of actions and situations. Something is considered immoral if one’s moral framework says so. I specified individuals instead of groups because within groups, there is a mismatch between what people consider moral, making a moral framework an inherently individual phenomenon. Objectivity is the idea that something is true regardless of one’s viewpoint. Gravity pulls me down towards the ground whether I believe it or am conscious to experience it. If a deity claims their moral framework is objective, it simply isn’t. They are labeling their subjective moral framework as one that is true regardless of one’s viewpoint, even though the existence of their moral framework is completely dependent on them as an individual. It’s akin to saying my taste in music is the objective taste in music (which it is, of course). My taste in music is my own subjective experience and is completely contingent on me. How would I establish that something I feel is good is good irrespective of others’ viewpoints? It’s an unintelligible claim.

How do you establish objectivity? I don’t know. I also find objectivity as a concept to be hard to wrap my head around given my previous argument. So how do you establish anything as objectively true? I don’t think you can. Every experience you have is contingent on yourself, making them relative experiences, which would make you reach a similar stopping point as the previous argument. It’s hard to let go of the idea that things need to be objectively true. The closest thing I can get to objectivity is the scientific method, which is an attempt to converge onto truths.

I like to separate things I consider true into two categories: “functional” and “convergent” truths. Functional truths are truths I hold because they’re convenient for perceiving and conceptualizing reality. They’re essentially axioms. I try to minimize these because axioms cannot be verified. I hold my senses as being generally accurate as a functional truth. It’s an unfalsifiable claim, but is also convenient to perceiving and experiencing the world. If a functional truth can’t be verified, they may reduce the accuracy of my held worldview because of a direct or implied assumption coming from that functional truth. One example would be god. I’ve had conversations with folks that hold god as an axiom. That creates implied beliefs that reinforce the supernatural, which are unfalsifiable, but due to people’s axiom that a god exists, it allows them to also believe in supernatural phenomena because one of their axioms supports it. Convergent truths are simply truths that are enforced by many people observing the same phenomenon. It’s the scientific process. If many people experience gravity to the point that we can describe it usually mathematical notation, it’s safe to say it exists.

I’ve struggled with mental illness in the past. Like most people, depression, but also lots of delusions. Deep paranoia about imminent supernatural things that I felt deeply in my heart but knew in my head were delusions. I got to the point that I wasn’t sure whether my reality was real at times. I’ve heard the argument that if life wasn’t real that it wouldn’t be worth living and that you should just lay there until you die because it doesn’t matter. It’s interesting because you get to establish what you think is real up to a certain point. Even if my life wasn’t real, that wouldn’t make the sensations and experiences I have any different. Why should life being real deter me from experiencing it? I don’t hold an opinion on whether my life is real because, frankly, I don’t give a fuck. I still get to drive two hours to see my brother and almost throw my guts up at an Indian restaurant. I still get to hit that riff for the first time after a week of practicing it. I still get to tell my mother how I lost my faith and have to sit there to hear her remarks. Those experiences don’t change.

This idea of relativity in morality is such a shallow topic but once stepped in, instantly engulfs me. Starting meaning from where I draw it is such a freeing yet threatening idea because of the amount of, essentially, creative freedom you have to apply to your own wants. Whenever I make a song, I almost always run into a block. Whether I should add more chords or if I should put another instrument in, after a certain point the amount of freedom I can apply to that song is just too much and I need to take a step back to listen, and listen, and listen and understand what it is will scratch that itch in my brain. I find morality to be a similar concept. Because of the amount of freedom you have to do different things that inevitably feel right or wrong, the possibilities are endless. You have to figure out what direction you want to go in by understanding the width and breadth of your emotions surrounding as many things as you can. This contrasts an “objective” morality which dictates what direction people should tend to go in as better or worse and leaves less decision to an individual. This is not about the merits of individuality, nor am I making an argument for individuality, but I feel more at peace knowing I have a choice.

Sometimes the world doesn’t feel real. Sometimes I need to look at the veins in my mother’s hands, or the leaves on a tree, or hear the happiness in a loved one’s laugh to ground me. Those things feel right. But how do I choose to experience those? When do I choose to experience those? It’s much like creative block. How do I go about expressing and consuming love for those things in my life which I hold sacred? I have to decide. It’s not up to a deity, or a religious figure to tell me how many times I should be doing those things, but it’s my decision. The world doesn’t feel real because I am the experience of sensory information being processed by a flesh calculator. There is no inherent meaning to what or why I want to see things, and I don’t think there’s a higher purpose to what is happening on our planet. Moral relativity is the idea that things matter to individuals, not as some sort of objective Cartesian grid you can plot morality coefficients across, but just as internal, intransitive experiences that can conglomerate on a larger scale to create moral trends across a specific population, time, and place. But it all starts with individuals trying to reach inside to understand themselves, because living is a journey to knowing oneself before it passes.

This morning I went on a walk and saw a squirrel stealing a tomato from someone’s garden. It was a green tomato that it could barely bite into, being roughly half its size. I was feeling like nothing really mattered and putting one foot in front of the other felt like trudging through mud. This squirrel had given me eyes that told me not to knock on that house’s door to tell on it. I’m not a snitch. I had originally planned on running, but I couldn’t run in the mud. My mind switches between the ideas of “feeling nothing matters, so why should anything matter” and “so many things matter to me, why should nothing matter”. I don’t really know why it switches like that, but I prefer the latter. The former places me in the mud. The latter lets me giggle at the squirrel and go on with my day.

 

I wrote this a few months ago and figured I'd go ahead and post it. I originally wrote it as a way to process my feelings about my own beliefs. TW about depression, paranoia, and leaving one's birth religion.

I don’t know when I realized I was depressive. It should have been something I figured out early on, but didn’t hit me until later. I guess now is still early for most, given I’m 22. Realizing I lost my religion at the age of 17 made me have to recontextualize my worldview in a way that uprooted me from long held beliefs from birth. That was not easy. I remember at the beginning, just conceptualizing right and wrong as ideas that were not tied to a deity was difficult. The urge to pray was instilled in me since childhood, so it took a while before I stopped feeling it out of habit.

Something that has confused me since I started questioning my former faith is how anyone can believe that “objective” morality is an intelligible concept. Morality is a framework for how an individual conceptualizes the weight of actions and situations. Something is considered immoral if one’s moral framework says so. I specified individuals instead of groups because within groups, there is a mismatch between what people consider moral, making a moral framework an inherently individual phenomenon. Objectivity is the idea that something is true regardless of one’s viewpoint. Gravity pulls me down towards the ground whether I believe it or am conscious to experience it. If a deity claims their moral framework is objective, it simply isn’t. They are labeling their subjective moral framework as one that is true regardless of one’s viewpoint, even though the existence of their moral framework is completely dependent on them as an individual. It’s akin to saying my taste in music is the objective taste in music (which it is, of course). My taste in music is my own subjective experience and is completely contingent on me. How would I establish that something I feel is good is good irrespective of others’ viewpoints? It’s an unintelligible claim.

How do you establish objectivity? I don’t know. I also find objectivity as a concept to be hard to wrap my head around given my previous argument. So how do you establish anything as objectively true? I don’t think you can. Every experience you have is contingent on yourself, making them relative experiences, which would make you reach a similar stopping point as the previous argument. It’s hard to let go of the idea that things need to be objectively true. The closest thing I can get to objectivity is the scientific method, which is an attempt to converge onto truths.

I like to separate things I consider true into two categories: “functional” and “convergent” truths. Functional truths are truths I hold because they’re convenient for perceiving and conceptualizing reality. They’re essentially axioms. I try to minimize these because axioms cannot be verified. I hold my senses as being generally accurate as a functional truth. It’s an unfalsifiable claim, but is also convenient to perceiving and experiencing the world. If a functional truth can’t be verified, they may reduce the accuracy of my held worldview because of a direct or implied assumption coming from that functional truth. One example would be god. I’ve had conversations with folks that hold god as an axiom. That creates implied beliefs that reinforce the supernatural, which are unfalsifiable, but due to people’s axiom that a god exists, it allows them to also believe in supernatural phenomena because one of their axioms supports it. Convergent truths are simply truths that are enforced by many people observing the same phenomenon. It’s the scientific process. If many people experience gravity to the point that we can describe it usually mathematical notation, it’s safe to say it exists.

I’ve struggled with mental illness in the past. Like most people, depression, but also lots of delusions. Deep paranoia about imminent supernatural things that I felt deeply in my heart but knew in my head were delusions. I got to the point that I wasn’t sure whether my reality was real at times. I’ve heard the argument that if life wasn’t real that it wouldn’t be worth living and that you should just lay there until you die because it doesn’t matter. It’s interesting because you get to establish what you think is real up to a certain point. Even if my life wasn’t real, that wouldn’t make the sensations and experiences I have any different. Why should life being real deter me from experiencing it? I don’t hold an opinion on whether my life is real because, frankly, I don’t give a fuck. I still get to drive two hours to see my brother and almost throw my guts up at an Indian restaurant. I still get to hit that riff for the first time after a week of practicing it. I still get to tell my mother how I lost my faith and have to sit there to hear her remarks. Those experiences don’t change.

This idea of relativity in morality is such a shallow topic but once stepped in, instantly engulfs me. Starting meaning from where I draw it is such a freeing yet threatening idea because of the amount of, essentially, creative freedom you have to apply to your own wants. Whenever I make a song, I almost always run into a block. Whether I should add more chords or if I should put another instrument in, after a certain point the amount of freedom I can apply to that song is just too much and I need to take a step back to listen, and listen, and listen and understand what it is will scratch that itch in my brain. I find morality to be a similar concept. Because of the amount of freedom you have to do different things that inevitably feel right or wrong, the possibilities are endless. You have to figure out what direction you want to go in by understanding the width and breadth of your emotions surrounding as many things as you can. This contrasts an “objective” morality which dictates what direction people should tend to go in as better or worse and leaves less decision to an individual. This is not about the merits of individuality, nor am I making an argument for individuality, but I feel more at peace knowing I have a choice.

Sometimes the world doesn’t feel real. Sometimes I need to look at the veins in my mother’s hands, or the leaves on a tree, or hear the happiness in a loved one’s laugh to ground me. Those things feel right. But how do I choose to experience those? When do I choose to experience those? It’s much like creative block. How do I go about expressing and consuming love for those things in my life which I hold sacred? I have to decide. It’s not up to a deity, or a religious figure to tell me how many times I should be doing those things, but it’s my decision. The world doesn’t feel real because I am the experience of sensory information being processed by a flesh calculator. There is no inherent meaning to what or why I want to see things, and I don’t think there’s a higher purpose to what is happening on our planet. Moral relativity is the idea that things matter to individuals, not as some sort of objective Cartesian grid you can plot morality coefficients across, but just as internal, intransitive experiences that can conglomerate on a larger scale to create moral trends across a specific population, time, and place. But it all starts with individuals trying to reach inside to understand themselves, because living is a journey to knowing oneself before it passes.

This morning I went on a walk and saw a squirrel stealing a tomato from someone’s garden. It was a green tomato that it could barely bite into, being roughly half its size. I was feeling like nothing really mattered and putting one foot in front of the other felt like trudging through mud. This squirrel had given me eyes that told me not to knock on that house’s door to tell on it. I’m not a snitch. I had originally planned on running, but I couldn’t run in the mud. My mind switches between the ideas of “feeling nothing matters, so why should anything matter” and “so many things matter to me, why should nothing matter”. I don’t really know why it switches like that, but I prefer the latter. The former places me in the mud. The latter lets me giggle at the squirrel and go on with my day.

 

I've been trying to contribute to statrs recently, and one of the issues I've been running into is that I'm trying to have an iterator that returns items in sorted order without cloning the underlying data. I'm working this PR if you wanted to take a look at my code so far. I looked up this problem and found this StackOverflow post about this topic from years ago but, frankly, I don't believe it. Assuming you're iterating from a vector, mutating the underlying vector is akin to keeping state on the order of the vector. Why cant that happen in a separate data structure? Is there a more efficient way to represent ordinality other than a vector? Creating an iterator is simply tracking traversal through that structure, which I think could be done using a bloom filter to track which indices have not been traversed yet. That just leaves the traversal algorithm itself. What information would an iterator need to know to make the best decision? Could I adapt a sorting algorithm to be an iterator?

I'm asking a lot of questions because I'm a statistics guys, not an algorithms guy. Any starting point or input is much appreciated!

 

I've been trying to make an RNG that outputs data in a way that has an entropy that approaches a user defined value as the output gets arbitrarily long. I've been struggling at a certain point that I'll detail later, but the main motivation for this project is just trying to practice on a problem like this. Here's my repo.

In this post, we'll be talking about Shannon entropy. Here's a good refresher for it. If you scroll down there's examples and the equation.

Looking at the equation, when developing this algorithm we have two different input values for it: the target entropy and the number of outcomes, n. From there, we can create a probability vector of length n whose entropy is equal to the target entropy, then we can map objects to elements of the probability vector and sample indices from the vector by using the alias sampling method. From there, we have a nice algorithm for creating sequences of any type that have the target entropy.

So where's the problem? It's in actually generating the probability vector. In order to get to a V0, I implemented two functions: helpers::compute_probabilities and helpers::find_lambda. compute_probabilities creates the probability vector that has the target entropy by sampling from the exponential distribution. find_lambda repeatedly calls compute_probabilities using binary search to converge on a lambda that produces a probability vector with the target entropy. The problem line is right here:

    pub fn compute_probabilities(num_outcomes: usize, lambda: f64) -> Vec<f64> {
        let unnormalized: Vec<f64> = (1..=num_outcomes)
            .map(|i| (-lambda * i as f64).exp())
            .collect();

When calculating the actual probability values, they get exponentially smaller as the probability vector gets bigger. This works. Technically. But in the worst way. When sampling using vectors generated using this function, they realistically only sample the first few elements. That's the problem. I want to more equally distribute the probability in such a way that doesn't make the tenth value arbitrarily small but the first value really large in comparison. For reference, using this function and lambda=1, the tenth element in the vector is 5x10^-5 but the first value .37.

I figured I'd post this before I start throwing a bunch of different distributions at this function to see if anyone sees any inherent flaws with my process.