# Eternity Async Tutoring

**URL:** <https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932>\
**Category:** Tutoring\
**Created:** [April 17, 2024, 11:22pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932 "2024-04-17T23:22:52Z")\
**Posts on this page:** 20\
**Page:** 41

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 22, 2025, 11:13pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/802 "2025-02-22T23:13:05Z")

</div>

Some quick writing to share:

I just realized how much my family has gotten used to our abusive fathers anger. For various health reasons he’s no longer able to be physically abusive for the past ~2 years, due to that me, my brother, and my mom have been able to somewhat live comfortably and just ignore all his yelling and stuff.

I mentioned previously we got in a new family member and it made me realize how comfortable we’ve gotten with a bad situation. He was confused by our capacity to ignore all the stuff and we just told him, “If he isn’t calling for anyone in particular, just ignore him.” I guess its not normal to be able to ignore stuff like this.

He reminds me of this from _Atlas Shrugged_ (his being Mouch a scene around directive 10-289):

> His head drawn into his shoulders, he was looking at them with the anger of a man declaring that the country’s troubles were a personal affront to him. So many men seeking favors had been afraid of him that he now acted as if his anger were a solution to everything, as if his anger were omnipotent, as if all he had to do was to get angry. Yet, facing him, the men who sat in a silent semicircle before his desk were uncertain whether the presence of fear in the room was their own emotion or whether the hunched figure behind the desk generated the panic of a cornered rat.

Hmm. I guess the process is something like this: I have power. I get angry and can use that power against you. Appease my anger and I won’t use that power against you. I may even use it for you That sounds about accurate for my father. That sounds about accurate for the stuff I read about abusive men.

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 22, 2025, 11:29pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/803 "2025-02-22T23:29:31Z")

</div>

> [@Elliot](#):
>
> Think about other, simpler ways to get the rank from a string like “5H”. Like brainstorm different things you could do with that which would return “5”.

Ok. I just looked at the string documentation and just looked for stuff that could work:

these two seem simple:

“5H”.chr and “5H” .chop

---

<div class="post-metadata">

**Author:** ![Elliot](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/elliot/32/14_2.png) [@Elliot](https://discuss.criticalfallibilism.com/u/Elliot)\
**Post date:** [February 23, 2025, 2:40am UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/804 "2025-02-23T02:40:19Z")

</div>

Yes. Also `"5H"[0]`

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 23, 2025, 2:45am UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/805 "2025-02-23T02:45:34Z")

</div>

> [@Elliot](#):
>
> Yes. Also `"5H"[0]`

huh. neat. I tried seeing what you’re doing in the documentation, couldn’t find it. I assumed it had something to do with the position of something in a string. Seems I was right?:

 ![image](https://discuss.criticalfallibilism.com/uploads/default/original/2X/5/55786bcb6fcde10b9a0d0c8858b04ade1a6b7e2d.png)

so thats neat.

---

<div class="post-metadata">

**Author:** ![Elliot](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/elliot/32/14_2.png) [@Elliot](https://discuss.criticalfallibilism.com/u/Elliot)\
**Post date:** [February 23, 2025, 2:46am UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/806 "2025-02-23T02:46:47Z")

</div>

[https://ruby-doc.org/3.4.1/String.html#method-i-5B-5D](https://ruby-doc.org/3.4.1/String.html#method-i-5B-5D)

it might not automatically scroll down but you can find it in the sidebar and click on `#[]`

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 23, 2025, 2:50am UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/807 "2025-02-23T02:50:37Z")

</div>

I made a post about issues related to quoting like @ActiveMind had here:  
[Curiosity – Specialist Creators with Small Audiences - #13 by ActiveMind](https://discuss.criticalfallibilism.com/t/curiosity-specialist-creators-with-small-audiences/580/13).

I and others have made mistakes about this before, so I asked about it on the discourse meta forum: [Issues quoting quotes - Support - Discourse Meta](https://meta.discourse.org/t/issues-quoting-quotes/353875)

Nothing really helpful tho. Sadge. I don’t know how these forums work maybe someone will see it later and has something, but yeah.

---

<div class="post-metadata">

**Author:** ![Elliot](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/elliot/32/14_2.png) [@Elliot](https://discuss.criticalfallibilism.com/u/Elliot)\
**Post date:** [February 23, 2025, 3:06am UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/808 "2025-02-23T03:06:55Z")

</div>

> [@Eternity](#):
>
> I don’t know how these forums work maybe someone will see it later and has something, but yeah.

I think you’re supposed to put it in the bugs or feature requests section if you want something changed.

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 24, 2025, 3:30am UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/809 "2025-02-24T03:30:17Z")

</div>

> [@Elliot](#):
>
> I think you’re supposed to put it in the bugs or feature requests section if you want something changed.

Yeah I figured. It feels odd to request things. Especially when I’m unsure if its just a me issue here. Seeing how the person who responded seems to be a big discourse user though I guess I should be fine.

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 24, 2025, 3:31am UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/810 "2025-02-24T03:31:33Z")

</div>

So this is what I’ve come up with so far:

```auto
def hand_to_ranks(hand)
  ranks=Array.new
  hand[0].each do |n|
    ranks<<n[0]
  end
  puts ranks
end

```

well the puts part wasn’t necessary i was just checking if i got the right values.

---

<div class="post-metadata">

**Author:** ![Elliot](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/elliot/32/14_2.png) [@Elliot](https://discuss.criticalfallibilism.com/u/Elliot)\
**Post date:** [February 24, 2025, 4:33pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/811 "2025-02-24T16:33:58Z")

</div>

Have you run this code and checked the results? Once you think you’ve got it working, share an example of running it and the output.

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 24, 2025, 4:56pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/812 "2025-02-24T16:56:18Z")

</div>

> [@Elliot](#):
>
> Have you run this code and checked the results?

I changed it to print instead of puts so its all on one line and I got this:

 ![image](https://discuss.criticalfallibilism.com/uploads/default/original/2X/a/a0c1823b90d713a6fd6f548e71682723739f4e78.png)

---

<div class="post-metadata">

**Author:** ![Elliot](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/elliot/32/14_2.png) [@Elliot](https://discuss.criticalfallibilism.com/u/Elliot)\
**Post date:** [February 24, 2025, 4:56pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/813 "2025-02-24T16:56:55Z")

</div>

Run it in IRB using manual input.

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 24, 2025, 4:59pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/814 "2025-02-24T16:59:09Z")

</div>

> [@Elliot](#):
>
> Run it in IRB using manual input.

Like this?:

 ![image](https://discuss.criticalfallibilism.com/uploads/default/original/2X/b/bc16273116e4daffd957eee418d40338a3b3cfa4.png)

or put the whole code in irb ?:

 ![image](https://discuss.criticalfallibilism.com/uploads/default/original/2X/b/b5ff0bf9c17b5e79c712f0a90974b5f8820f6ce7.png)

---

<div class="post-metadata">

**Author:** ![Elliot](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/elliot/32/14_2.png) [@Elliot](https://discuss.criticalfallibilism.com/u/Elliot)\
**Post date:** [February 24, 2025, 5:01pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/815 "2025-02-24T17:01:33Z")

</div>

Run it with your own test data in IRB, e.g.:

`hand_to_ranks(%w[AH AD 5H 3S 2C])`

%w is a shortcut for making arrays of strings with less typing. you can run that part by itself to see what it does.

also, your function is currently outputting nil

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 24, 2025, 5:55pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/816 "2025-02-24T17:55:50Z")

</div>

> [@Elliot](#):
>
> Run it with your own test data in IRB, e.g.:
> 
> `hand_to_ranks(%w[AH AD 5H 3S 2C])`

I may be doing something wrong, but I just replaced the (hands) part with the the stuff you provided. I got this:

 ![image](https://discuss.criticalfallibilism.com/uploads/default/original/2X/4/44a4170e7ef95f15f4d591d579b0953e00f45245.jpeg)  
i assume that has something to do with my code mentions the hand array while (%w[AH AD 5H 3S 2C]) does not. . hmm I don’t know what the stuff in the parentheses is for. I know that you can def a function by something like this:

```auto
def name
some code
end

#put the name here and it will run the code

```

> [@Elliot](#):
>
> also, your function is currently outputting nil

hmm i see that. i think thats because i have the print part in my code? i did that to check if the right values got put in rank. lets see.

this seems to work:

```auto
def hand_to_ranks(hand)
  ranks=Array.new
  hand[0].each do |n|
    ranks<<n[0]
  end
  ranks
end

```

![image](https://discuss.criticalfallibilism.com/uploads/default/original/2X/3/381205f9314ccd45a4c59bf4070c020fd1a5ebf4.png)

if I don’t put that ranks at the end the return value i get is just the hand array:

 ![image](https://discuss.criticalfallibilism.com/uploads/default/original/2X/0/0927c215f6eb3ce318dcdbb4529309a08ef28a4e.png)

```auto

def hand_to_ranks(hand)
  ranks=Array.new
  hand[0].each do |n|
    ranks<<n[0]
  end

end

```

---

<div class="post-metadata">

**Author:** ![Elliot](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/elliot/32/14_2.png) [@Elliot](https://discuss.criticalfallibilism.com/u/Elliot)\
**Post date:** [February 24, 2025, 5:59pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/817 "2025-02-24T17:59:20Z")

</div>

Your code has a bug and also whatever data you have saved in the `hand` variable appears to be wrong.

You should test individual parts. Like print out what’s in `hand` or run these in irb:

```auto
testhand = %w[AH AD 5H 3S 2C]
testhand[0]

```

since the first thing your code does to the `hand` input is call the `[]` method with `0` as input.

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 24, 2025, 6:02pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/818 "2025-02-24T18:02:02Z")

</div>

> [@Elliot](#):
>
> Your code has a bug and also whatever data you have saved in the `hand` variable appears to be wrong.

Before I try anything this is whats in my hand variable:  
 ![image](https://discuss.criticalfallibilism.com/uploads/default/original/2X/7/7ebea98f97088ecdaae3e8f800c500020d50a998.png)  
its an array in an array. instead of addressing that i’ve been just calling on hand[0] to get access to the array inside. i assume thats probably causing some of my problems

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 24, 2025, 6:13pm UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/819 "2025-02-24T18:13:55Z")

</div>

Still haven’t done the stuff you mentioned but this fixed it:

```auto
cards = Array.new

deck = Array.new
suits = ["S","C","D","H"]

letters = ["A","T","J","Q","K"]

suits.each do |a|

  2.upto(9) do |n|
  cards << "#{n}#{a}"
  end

  letters.each do |l|
  cards << "#{l}#{a}"
  end

end

deck = cards.shuffle

hand = deck.slice!(0..4)

```

I had hand originally defined hand as an Array. So at the beginning was hand=Array.new and then I shoved/\<\< the slice of the deck into the hand array. Seems like the return value of slice of multiple things is an array (from the [documentation](https://ruby-doc.org/3.4.1/Array.html#method-i-slice-21)):

 ![image](https://discuss.criticalfallibilism.com/uploads/default/original/2X/b/b07efa35bd07a26528ac42e2a56b2376f9a682f6.png)  
So I was putting an array into an array.

It seems fine now. This is what I get for hand now:

 ![image](https://discuss.criticalfallibilism.com/uploads/default/original/2X/5/5413728e0a795bb5a0740451b88005cb8260b08a.png)

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 25, 2025, 2:56am UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/820 "2025-02-25T02:56:50Z")

</div>

Something I thought of today while at work:

Hmm. I forgot what lead me to think of this at work so I don’t have that to share.

I’ve heard before stuff like “ends justify the means”. I don’t know. I think the means determine the end. I’m not great at coming with examples (Is that a skill that can be worked on? probably) but here’s one:

Lets say you have a murderer on the loose. There’s a house where he locked himself up in. An ends justify the means kind of person could say something like,“Blow up the house.” Or. more absurdly, “Blow up the city.” The reasoning goes: getting rid of a murder justifies _whatever_ we do. It usually feels like people are context-dropping when using this. They just blew up a city and just focus on the fact that a murderer is gone. They ignore all the stuff around that situation. From costs of the explosives, to the other deaths they caused, or, if not deaths, the property damage caused.

Hmm. A similar kind of thing: a cause can have multiple effects. I think this is obvious but I don’t know. Going off of killing some bad guy again. Going through a scenario:  
You shoot him in public. Bullet kills him, but the bullet can hit other things. Also people will get scared by hearing/seeing the bullet/shooter. You can think of other methods to kill him or whatever to solve the issue and need to keep him in mind all the effects your cause can have besides the effect you care about.

---

<div class="post-metadata">

**Author:** ![Eternity](https://discuss.criticalfallibilism.com/user_avatar/discuss.criticalfallibilism.com/eternity/32/5930_2.png) [@Eternity](https://discuss.criticalfallibilism.com/u/Eternity)\
**Post date:** [February 25, 2025, 3:03am UTC](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932/821 "2025-02-25T03:03:01Z")

</div>

Some work related stuff:

Apparently when I got hired at Starbucks, I got hired at every Starbucks in the area. This wasn’t’ disclosed to me. The reasoning kinda makes sense? You aren’t hired by “some\_location\_name” Starbucks. You were hired by corporate Starbucks. You just work at “some\_location\_name” for convenience.

This issue came up because some coworkers were told to go to another store, in the middle of their shift, to another store to cover a call out. The coworker refused because they didn’t want to drive there and because the store they were going to was known to be quite toxic. The DM “politely” informed them that they are employees of Starbucks and that unless they had a car safety issues they would have to go.

I don’t know if this kind of thing is normal for big corporations. If I get hired by Walmart am I a employee of every corporate Walmart in the US? Idk. I guess so.

[Previous page](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932.md?page=40)

[Next page](https://discuss.criticalfallibilism.com/t/eternity-async-tutoring/1932.md?page=42)
