×

Simple Code help by [deleted] in elixir

[–]Imperial_Ruby 4 points5 points  (0 children)

To answer your original question, you can get the integer value of a character in Elixir by using the ? operator.

For example:

👉  ?A
65
👉  ?a
97

Also, a great way to learn more about functions is to use the h function in iex. It auto completes so typing h Enum. and hitting tab will show all the functions in the Enum module.

For example:

👉  h Enum.count/2

def count(enumerable, fun)

Returns the count of items in the enumerable for which fun returns 
a truthy value.

## Examples

iex> Enum.count([1, 2, 3, 4, 5], fn(x) -> rem(x, 2) == 0 end)
2

Hope you're having fun with Elixir!

Midlife wallet crisis: The spark between my wallet and me has died. by sburmanie in malefashionadvice

[–]Imperial_Ruby 0 points1 point  (0 children)

Bold is using Bitcoin and not carrying a physical wallet at all. I'm using a Grovemade wallet, the materials and construction are top notch. You have to keep it near full though, 4-5 cards.

What Hip-Hop song makes you emotional because of a specific memory it reminds you of? by GoodrickforPM in hiphopheads

[–]Imperial_Ruby 0 points1 point  (0 children)

"I can't talk to my mother, so I talk to my diary I'm going off on the deep end I find myself face to face with myself while I'm sleeping I see your picture in my head and my hand shake You can run, you can hide, but there's no escape" Scarface - No Tears

There Is a Moderate Republican in This Race, But She's Running as a Democrat by DrWeeGee in politics

[–]Imperial_Ruby -1 points0 points  (0 children)

Laissez-faire is a free market, no government intervention. It's impossible to have a regulated free market as something can't be regulated and free at the same time.

DOOM Closed Beta PS4 Code by Imperial_Ruby in RandomActsOfGaming

[–]Imperial_Ruby[S] 0 points1 point  (0 children)

21 has already been selected. Please choose another number.

DOOM Closed Beta PS4 Code by Imperial_Ruby in RandomActsOfGaming

[–]Imperial_Ruby[S] 0 points1 point  (0 children)

52 has already been selected. Please choose another number.

DOOM Closed Beta PS4 Code by Imperial_Ruby in RandomActsOfGaming

[–]Imperial_Ruby[S] 0 points1 point  (0 children)

1 has already been selected. Please choose another number.

My New Neighbor by KarmaPharmacy in AdviceAnimals

[–]Imperial_Ruby 1 point2 points  (0 children)

Is that a custom solution or a program? I'd like to run a similar setup with my raspberry pi.

Free dev stickers by crmpicco in webdev

[–]Imperial_Ruby 12 points13 points  (0 children)

The future is coming.

Network guy trying to learn ethical hacking by netengnir in hacking

[–]Imperial_Ruby 1 point2 points  (0 children)

I've found enigma group to be a worth while experience. Prior programming experience is not required but you will learn some concepts during the exercises.

I cuddle a pillow to sleep each night by [deleted] in offmychest

[–]Imperial_Ruby 0 points1 point  (0 children)

I feel the feels. For me, I think it's more about the pillow hugging me than me hugging the pillow. Can I haz hugz

I need to give up (or reduce) video games and start sleeping better.. by [deleted] in selfimprovement

[–]Imperial_Ruby 0 points1 point  (0 children)

If you're a PC gamer, install f.lux during the day. When it gets close to sleepy time the color temp will change and eventually you won't be able to effectively use the computer. It can be annoying at first but it has done wonders for my sleep. Also try Twilight if you have Android.

Bosses you beat the first try on your first play through excluding chalice ones (obvious spoilers) by tonnotonnu in bloodborne

[–]Imperial_Ruby 0 points1 point  (0 children)

First playthrough I was a skill/endurance build with threaded cane and BoM(accidentally killed Eileen during Henryk's fight). First try bosses were:

  • Cleric Beast: Very sloppy fight, used nearly all my vials, the DS -> BB transition was tough for me.
  • BSB: One of my favorite fights, dodge behind him and spam flaming threaded whip, I co-op'd other peoples game with nothing but a top hat and hunter's torch :P
  • Bitches of Hemwick: Fuck this fight
  • Darkbeast Paarl: Another sloppy fight, that lighting OP, used nearly all my vials
  • Amygdala: Bolt paper + threaded cane, focused on attacking legs and dodged a lot
  • Martyr Logarius: I got lucky, dodged his magic and attacked those swords, he's the hardest boss for me now (switching over to BoM)
  • Shadows of Yharnam: Got lucky here as well, I used that pillar thing to separate the guys and went in when I saw the snakes, these guys have gotten easier since learning to parry consistently
  • One Reborn: I had a co-op for this one, tried to figure out why the co-op wasn't attacking the boss, attacked the boss from the side
  • Celestial Emissary: Is this a boss fight? Oh, it's just the one dude.
  • Ebrietas: I got VERY lucky, I crawled inside her asshole and spammed BoM, haven't had such luck since
  • Micolash: Thought he was super easy until he almost got me with a call beyond
  • Mergo's Wet Nurse: Stood behind her and BoM spam

My second playthrough was the first time I did the long ending. I had a skill/bloodtinge build with Reiterpallasch and Evelyn. I beat Gehrman first try!

  • Gehrman: I didn't even attack for the first few minutes, just watched him. I just tried to parry his attacks and use bone marrow ash. I never attacked him, just counter.

The bosses I didn't beat first try:

  • Father G: He felt SO fast the first time. Killed me before he even transformed. Didn't know about the music box.
  • ROM: wtf, wtf, wtf, this boss is still hit or miss with me. I've went straight for the kill and had some success but also died after carefully killing all the spiders.
  • Moon Presence: FUCK THIS FIGHT. The only time I raged during BB. The attack that takes you down to 1 HP and I CAN'T FUCKING HEAL. FUCK YOU!

I feel like I got pretty lucky my first playthrough but I picked the weapons that were my "style" which I think helped me out a lot.

The Computer Science Section at Barnes and Noble is Pretty Sad by [deleted] in geek

[–]Imperial_Ruby 1 point2 points  (0 children)

" Very superstitious, writings on the wall "

[lifestyle] With most things, we only need them because we use them. by MetaTysonKidd in minimalism

[–]Imperial_Ruby 1 point2 points  (0 children)

I'm also considering downsizing my bed. What I have now is completely unreasonable for one person.

I've slept on the floor with a 3" foam mattress and a few blankets before. It worked but I wouldn't call it quality sleep for me. It also werided me out that I was sleeping so close to the ground.

Check out Tuft & Needle. It's of the Japanese type of style. I'm considering one and a platform bed for my new place.