havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.5, 2.5.7, 2.7.0-preview3: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
drincruz has quit [Ping timeout: 265 seconds]
fphilipe has joined #ruby
ellcs1 has quit [Ping timeout: 250 seconds]
jinie_ has quit [Quit: ZNC 1.6.1 - http://znc.in]
DTZUZO has quit [Ping timeout: 265 seconds]
jinie_ has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
bvdw has quit [Read error: Connection reset by peer]
thebetra3 has quit [Ping timeout: 252 seconds]
bvdw has joined #ruby
ellcs1 has joined #ruby
spacesuitdiver has joined #ruby
mokha has joined #ruby
mokha has quit [Client Quit]
mokha has joined #ruby
mokha has quit [Client Quit]
dev-rfc83 has joined #ruby
DTZUZO has joined #ruby
ellcs1 has quit [Ping timeout: 245 seconds]
zlogan has quit [Read error: Connection reset by peer]
zlogan has joined #ruby
DaRock has joined #ruby
titanbiscuit has quit [Ping timeout: 276 seconds]
titanbiscuit has joined #ruby
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thebetra3 has joined #ruby
thebetra3 has quit [Ping timeout: 250 seconds]
misterwhatever has joined #ruby
nowhereman has quit [Ping timeout: 276 seconds]
ur5us has quit [Ping timeout: 245 seconds]
jottr has joined #ruby
zlogan2003 has joined #ruby
zlogan has quit [Ping timeout: 276 seconds]
al2o3-cr has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
Nicmavr has joined #ruby
jottr has joined #ruby
drincruz has joined #ruby
ellcs1 has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
davidw has quit [Ping timeout: 246 seconds]
ogres has quit [Quit: Connection closed for inactivity]
jottr has joined #ruby
Swyper has joined #ruby
<Swyper> hi :D
drincruz has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 250 seconds]
<havenwood> Swyper: hi
jottr has joined #ruby
ur5us has quit [Ping timeout: 245 seconds]
NL3limin4t0r_afk has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
drincruz has joined #ruby
jottr has joined #ruby
NL3limin4t0r_afk has joined #ruby
leitz has quit [Quit: Leaving]
ellcs1 has quit [Ping timeout: 245 seconds]
ffl^ has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
akemhp_ has joined #ruby
zlogan has joined #ruby
akemhp has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
akemhp_ has quit [Ping timeout: 252 seconds]
zlogan2003 has quit [Ping timeout: 276 seconds]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
fphilipe has joined #ruby
greengriminal has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
fphilipe has quit [Ping timeout: 276 seconds]
jottr has joined #ruby
jottr has quit [Ping timeout: 265 seconds]
Technodrome has joined #ruby
NODE has quit [Quit: changing servers]
Swyper has quit [Remote host closed the connection]
jottr has joined #ruby
NODE has joined #ruby
derpadmin has quit [Ping timeout: 276 seconds]
gix has quit [Ping timeout: 268 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
misterwhatever has quit [Quit: misterwhatever]
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
ivanskie has joined #ruby
NODE has quit [Quit: changing servers]
jottr has quit [Ping timeout: 246 seconds]
NODE has joined #ruby
derpadmin has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
derpadmin has quit [Remote host closed the connection]
AJA4351 has joined #ruby
greengriminal has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
Swyper has joined #ruby
NODE has quit [Quit: changing servers]
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
NODE has joined #ruby
sagax has joined #ruby
wildtrees has quit [Quit: Leaving]
akemhp has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
hamdan has joined #ruby
jottr has joined #ruby
AJA4350 has quit [Remote host closed the connection]
AJA4350 has joined #ruby
alfiemax has joined #ruby
jottr has quit [Ping timeout: 265 seconds]
jottr has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
alfiemax has quit [Ping timeout: 268 seconds]
jottr has quit [Ping timeout: 268 seconds]
AJA4350 has quit [Ping timeout: 245 seconds]
jottr has joined #ruby
AJA4350 has joined #ruby
entel has quit [Quit: Connection closed for inactivity]
devrfc83 has joined #ruby
dev-rfc83 has quit [Ping timeout: 268 seconds]
devrfc83 is now known as dev-rfc83
jottr has quit [Ping timeout: 276 seconds]
harai has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has joined #ruby
Mrbuck has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
buckworst has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4351 has joined #ruby
fphilipe has joined #ruby
jottr has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
NODE has quit [Quit: changing servers]
fphilipe has quit [Ping timeout: 276 seconds]
jottr has quit [Ping timeout: 276 seconds]
sagax has quit [Remote host closed the connection]
NODE has joined #ruby
jottr has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
jottr has quit [Ping timeout: 265 seconds]
AJA4351 has joined #ruby
greengriminal has joined #ruby
alfiemax has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
jottr has joined #ruby
AJA4351 has quit [Ping timeout: 250 seconds]
Caerus has quit [Ping timeout: 276 seconds]
AJA4350 has joined #ruby
brool has quit [Ping timeout: 276 seconds]
thebetra3 has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
thebetra3 has quit [Ping timeout: 245 seconds]
jottr has joined #ruby
abdellah_ has quit [Ping timeout: 240 seconds]
abdellah_ has joined #ruby
jottr has quit [Ping timeout: 276 seconds]
jottr has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
AJA4350 has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 250 seconds]
Caerus has joined #ruby
jottr has quit [Ping timeout: 276 seconds]
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
Mrbuck has quit [Ping timeout: 265 seconds]
buckworst has quit [Quit: WeeChat 2.3]
rcvu has quit [Quit: Changing server]
bruce_lee has quit [Ping timeout: 265 seconds]
sagax has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
bruce_lee has joined #ruby
jweiss has quit [Quit: WeeChat 1.4]
alfiemax has quit [Remote host closed the connection]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
hamdan has quit [Remote host closed the connection]
conta has joined #ruby
alfiemax has joined #ruby
rcvu has joined #ruby
zlogan has quit [Ping timeout: 276 seconds]
cgfbee has quit [Quit: cgfbee]
rcvu has quit [Quit: leaving]
rcvu has joined #ruby
cd has quit [Quit: cd]
freedom has quit [Remote host closed the connection]
sauvin has joined #ruby
schne1der has joined #ruby
freedom has joined #ruby
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
fphilipe has joined #ruby
Inline has quit [Quit: Leaving]
fphilipe has quit [Ping timeout: 252 seconds]
entel has joined #ruby
schne1der has quit [Ping timeout: 245 seconds]
fphilipe has joined #ruby
dionysus69 has joined #ruby
ffl^ has quit []
NODE has quit [Quit: changing servers]
infinityfye has joined #ruby
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
zlogan has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
abdellah_ has quit [Ping timeout: 265 seconds]
skx86 has joined #ruby
kapil_ has joined #ruby
conta has quit [Ping timeout: 240 seconds]
conta has joined #ruby
DTZUZO has quit [Ping timeout: 252 seconds]
akemhp_ has joined #ruby
akemhp has quit [Ping timeout: 250 seconds]
akemhp has joined #ruby
akemhp_ has quit [Ping timeout: 268 seconds]
infinityfye has quit [Ping timeout: 268 seconds]
ur5us has joined #ruby
fphilipe has quit [Ping timeout: 250 seconds]
infinityfye has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 265 seconds]
schne1der has joined #ruby
prestorium has joined #ruby
jottr has joined #ruby
suukim has joined #ruby
BH23 has joined #ruby
ellcs1 has joined #ruby
fphilipe has joined #ruby
ellcs1 has quit [Ping timeout: 245 seconds]
alfiemax has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
alfiemax has joined #ruby
<zenspider> dostoyevsky: do you have to use ubuntu 18? there's an official ruby channel in docker and they have all the versions you could want with none of the building.
bitwinery has quit [Quit: Leaving]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hanma[m] has quit [Remote host closed the connection]
mariusz-kowalski has quit [Read error: Connection reset by peer]
f440[m] has quit [Remote host closed the connection]
kp666[m] has quit [Read error: Connection reset by peer]
qbrd[m] has quit [Read error: Connection reset by peer]
gtwatt[m] has quit [Remote host closed the connection]
dmitrycy[m] has quit [Remote host closed the connection]
otaznik[m] has quit [Remote host closed the connection]
execat[m] has quit [Read error: Connection reset by peer]
Corey[m] has quit [Remote host closed the connection]
aecepoglu[m] has quit [Remote host closed the connection]
someGmrGrl[m] has quit [Remote host closed the connection]
danielk43[m] has quit [Read error: Connection reset by peer]
kodcx[m] has quit [Remote host closed the connection]
linuus[m] has quit [Remote host closed the connection]
samdixon[m] has quit [Write error: Connection reset by peer]
turt2live has quit [Write error: Connection reset by peer]
jottr has quit [Ping timeout: 252 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
NODE has quit [Client Quit]
jottr has joined #ruby
DTZUZO has joined #ruby
NODE has joined #ruby
alfiemax has quit [Remote host closed the connection]
NODE has quit [Client Quit]
NODE has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
NODE has quit [Client Quit]
Emmanuel_Chanel has joined #ruby
NODE has joined #ruby
za1b1tsu has joined #ruby
NODE has quit [Client Quit]
DTZUZO has quit [Ping timeout: 246 seconds]
NODE has joined #ruby
misterwhatever has joined #ruby
DTZUZO has joined #ruby
zapata has joined #ruby
DaRock has quit [Ping timeout: 276 seconds]
DTZUZO has quit [Ping timeout: 246 seconds]
zlogan has quit [Ping timeout: 252 seconds]
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
sameerynho has joined #ruby
DTZUZO has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
Intelo has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 252 seconds]
alfiemax has joined #ruby
howdoi has joined #ruby
DTZUZO has joined #ruby
alfiemax has quit [Ping timeout: 246 seconds]
kapil_ has quit [Quit: Connection closed for inactivity]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
NODE has quit [Client Quit]
Intelo has joined #ruby
NODE has joined #ruby
turt2live has joined #ruby
Corey[m] has joined #ruby
f440[m] has joined #ruby
execat[m] has joined #ruby
qbrd[m] has joined #ruby
linuus[m] has joined #ruby
sepp2k has joined #ruby
aecepoglu[m] has joined #ruby
iotatron[m] has joined #ruby
samdixon[m] has joined #ruby
kp666[m] has joined #ruby
Hanma[m] has joined #ruby
danielk43[m] has joined #ruby
kira_rose[m] has joined #ruby
mariusz-kowalski has joined #ruby
kodcx[m] has joined #ruby
someGmrGrl[m] has joined #ruby
otaznik[m] has joined #ruby
gtwatt[m] has joined #ruby
Hanspolo[m] has joined #ruby
dmitrycy[m] has joined #ruby
lineus has quit [Ping timeout: 260 seconds]
NODE has quit [Client Quit]
NODE has joined #ruby
NODE has quit [Client Quit]
DTZUZO has joined #ruby
NODE has joined #ruby
DTZUZO has quit [Ping timeout: 252 seconds]
DTZUZO has joined #ruby
zlogan has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
alfiemax has joined #ruby
lineus has joined #ruby
DTZUZO has joined #ruby
lineus_ has joined #ruby
lineus has quit [Remote host closed the connection]
DTZUZO has quit [Ping timeout: 265 seconds]
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 265 seconds]
za1b1tsu has quit [Remote host closed the connection]
DTZUZO has joined #ruby
akemhp_ has joined #ruby
akemhp has quit [Ping timeout: 265 seconds]
DTZUZO has quit [Ping timeout: 240 seconds]
Intelo has quit [Ping timeout: 268 seconds]
alfiemax has quit [Remote host closed the connection]
DTZUZO has joined #ruby
thrizian has joined #ruby
BH23 has quit [Remote host closed the connection]
<thrizian> Hi everyone, Finally decided to join a ruby community. Also because i have a question the https://github.com/rubocop-hq/ruby-style-guide does not seem to answer for me.
<thrizian> When i'm in an if else statement the style guide recommends not using more than 80 characters. How am i to format an if else statement where the boolean tests combined with logical operators exceed the 80 character limit?
NODE has quit [Quit: changing servers]
infinityfye has quit [Remote host closed the connection]
DTZUZO has quit [Ping timeout: 276 seconds]
NODE has joined #ruby
infinityfye has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
DTZUZO has joined #ruby
snickers has joined #ruby
<leah2> thrizian: i personally break after the operators
<leah2> if foo && bar &&
<leah2> quux && baz
DTZUZO has quit [Ping timeout: 276 seconds]
<thrizian> leah2: thanks, i prefer to break after the operators too but am still pondering on what is more pleasant, https://hastebin.com/guyoxevaxa.rb
DTZUZO has joined #ruby
<thrizian> Would you prefer to fill the line up to 80 characters or the last operator before 80 characters in line?
<leah2> i use variant 2
DTZUZO has quit [Ping timeout: 240 seconds]
DTZUZO has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
NL3limin4t0r_afk is now known as NL3limin4t0r
DTZUZO has quit [Ping timeout: 276 seconds]
Nicmavr has joined #ruby
poontangmessiah has joined #ruby
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 265 seconds]
Intelo has joined #ruby
DTZUZO has joined #ruby
Guest53430 has joined #ruby
<Guest53430> hi
Guest53430 is now known as RougeRR
<RougeRR> anyone about to give some OOP advise?
DTZUZO has quit [Ping timeout: 276 seconds]
jottr has joined #ruby
DTZUZO has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
NODE has quit [Client Quit]
bvdw has joined #ruby
lineus_ has quit [Remote host closed the connection]
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
jottr_ has joined #ruby
<thrizian> I might be able to give advice if the question is right @RogueRR
jottr has quit [Ping timeout: 245 seconds]
Jonopoly has quit [Quit: WeeChat 2.5]
Jonopoly has joined #ruby
<RougeRR> thrizian,
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
jottr_ has quit [Ping timeout: 268 seconds]
jottr_ has joined #ruby
yann-kaelig has joined #ruby
AJA4350 has joined #ruby
chalkmonster has joined #ruby
<NL3limin4t0r> thrizian: You could also reduce your current statement to: `cow&.likes_beer? && cow == chicken`
<thrizian> NL3limin4t0r: thanks, i know however i needed to make up a long list of logical operators.
lineus has joined #ruby
<thrizian> RogueRR: ??
<NL3limin4t0r> You could also group some expressions together and save them in a variable. For example: `active = !recurring_product.disabled && recurring_product.end_date >= Date.today` then use `active` in your if statement.
<NL3limin4t0r> However, it might be cleaner to simply group common expressions in you class. `recurring_product.active?` would then do the trick.
<thrizian> Yup. I knew that one too but i was merely trying to see if there was a preferred method of indenting the arguments to the if statemnt and where to break the logical operators.
<thrizian> Had they been recurring i would have certainly done that. But it's all one time use.
snickers has quit [Read error: Connection reset by peer]
<NL3limin4t0r> From the options you've provided I find variant 2 also the most readable. But I would indent the second line one space further, so it lines up with the first line.
<thrizian> My buddy on slack gave me the same suggestion and i have to admit, i agree. He is also dutch so perhaps it's a culture thing.
Mrbuck has joined #ruby
<NL3limin4t0r> Maybe =)
<NL3limin4t0r> thrizian: I normally don't put my county code in my username, but it's my go-to when services don't allow usernames to start with a number.
zlogan has quit [Read error: Connection reset by peer]
zlogan has joined #ruby
<thrizian> Happy to see you #represent the dutch in here! Have you been ruby developer for long?
rwb has quit [Ping timeout: 265 seconds]
donofrio_ has quit [Remote host closed the connection]
donofrio_ has joined #ruby
dev-rfc83 has quit [Ping timeout: 265 seconds]
donofrio_ has quit [Remote host closed the connection]
donofrio_ has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
banisterfiend has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.5]
dinfuehr has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Client Quit]
dinfuehr has joined #ruby
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
<NL3limin4t0r> thrizian: Finished my study about 2 years ago. If you do count the study experience I would say about 7 years.
gavlee_ has joined #ruby
gavlee has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
jottr_ has quit [Ping timeout: 268 seconds]
Swyper has quit [Remote host closed the connection]
Intelo has quit [Quit: Leaving]
Intelo_ has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
Intelo has joined #ruby
Intelo has quit [Client Quit]
Intelo_ has quit [Client Quit]
CrazyEddy has quit [Remote host closed the connection]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
CrazyEddy has joined #ruby
zlogan has quit [Ping timeout: 276 seconds]
Mia has quit [Ping timeout: 276 seconds]
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
thrizian has quit [Ping timeout: 268 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dev-rfc83 has joined #ruby
banisterfiend has joined #ruby
thrizian has joined #ruby
suukim has quit [Quit: Konversation terminated!]
Jonopoly has joined #ruby
snickers has joined #ruby
nowhereman has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
schne1der has quit [Ping timeout: 265 seconds]
nowhereman has quit [Remote host closed the connection]
nowhereman has joined #ruby
jinie_ has quit [Quit: ZNC 1.6.1 - http://znc.in]
<thrizian> NL3limin4tor: Nice, I've joined the developer branche about 3 to 4 years ago. Hicking up to becomming a medior :)
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhereman has quit [Remote host closed the connection]
shansen has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
RougeRR has quit [Ping timeout: 265 seconds]
Mrbuck has quit [Remote host closed the connection]
jottr_ has joined #ruby
jottr_ has quit [Ping timeout: 268 seconds]
AJA4350 has quit [Ping timeout: 265 seconds]
jottr_ has joined #ruby
jottr_ has quit [Ping timeout: 276 seconds]
greengriminal has joined #ruby
conta has quit [Ping timeout: 252 seconds]
brool has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: inabit. zz.]
poontangmessiah has quit [Ping timeout: 250 seconds]
Jonopoly has quit [Quit: WeeChat 2.5]
mikecmpbll has joined #ruby
pavelz has quit [Ping timeout: 246 seconds]
RougeR has joined #ruby
RougeR is now known as Guest56727
Guest56727 is now known as RougeRR
jottr_ has joined #ruby
<RougeRR> can someone explain how to format this to stop rubocop yelling with no style explanation online
grilix has joined #ruby
Esa_ has joined #ruby
<al2o3-cr> one line
phaul has quit [Ping timeout: 240 seconds]
davidw has joined #ruby
NODE has quit [Quit: changing servers]
<al2o3-cr> feel free to do what you want
<RougeRR> assume its much longer
<al2o3-cr> just keep indentation consistant
<RougeRR> yeah i know
<RougeRR> im saying i want to shut rubocop up
<RougeRR> haha
NODE has joined #ruby
<al2o3-cr> it's a style guard, not the unholy
<RougeRR> same for this: https://dpaste.de/KGoj
<RougeRR> i know
<RougeRR> i just want to know what on earth it actually wants
<RougeRR> as the example on the rspec docs is woeful
phaul has joined #ruby
<RougeRR> its using foo ba, which is a bad example as its two items and its unclear what they want
no_gravity has joined #ruby
NODE has quit [Client Quit]
<al2o3-cr> either follow it, or not
<al2o3-cr> who cares
<RougeRR> okay
<RougeRR> i want to know how to follow it
<RougeRR> thats what im asking
<RougeRR> how to align that hash so the cop passes
drincruz_ has joined #ruby
<NL3limin4t0r> RougeRR: Have you already checked out the doc, for the rubocop warning?
<RougeRR> yep
drincruz has quit [Read error: Connection reset by peer]
NODE has joined #ruby
no_gravity has left #ruby [#ruby]
<RougeRR> im not sure which one it is
<RougeRR> it says the deafult is hash rocket enforced
<NL3limin4t0r> So you've seen that the default style should not be indented additional spaces?
NODE has quit [Client Quit]
<NL3limin4t0r> For what you're doing you need: EnforcedColonStyle: table
jottr_ has quit [Quit: WeeChat 2.6]
phaul has quit [Ping timeout: 265 seconds]
NODE has joined #ruby
NODE has quit [Client Quit]
<NL3limin4t0r> If you're planning to use the same when using the rocket syntax you need to set EnforcedHashRocketStyle: table as well.
<RougeRR> im just having a read
<RougeRR> wait so, does the cop need to manually be configured?
<al2o3-cr> RougeRR: of course.
<NL3limin4t0r> RougeRR: only if you want to adjust default behaviour
NODE has joined #ruby
<al2o3-cr> some shit i don't agree with
<RougeRR> and the default is hash rocket style?
<al2o3-cr> RougeRR: what does it say?
<NL3limin4t0r> RougeRR: Have a look at the link I posted, the default style is visable in the examples.
<RougeRR> EnforcedHashRocketStyle: key (default)
<RougeRR> seems...odd
<RougeRR> as its not common to use hash rockets
<al2o3-cr> RougeRR: odd?
<RougeRR> ah default for colon too
<RougeRR> EnforcedColonStyle: key (default)
<RougeRR> makes more sense
schne1der has joined #ruby
<NL3limin4t0r> RougeRR: They have a default style for rockets, and a default style for colons.
bsdbandit-01 has joined #ruby
<RougeRR> eyah im there now, thanks for the link
<RougeRR> still think it look awful tbh
<RougeRR> they could do with longer keys/values and a bigger hash for the examples
<al2o3-cr> my two pennys, rescue <foo>: err
<NL3limin4t0r> RougeRR: If you want to change the config create the file `.rubocop.yml` in your project root. Then add the stuff you want to alter from the defaults in there.
dionysus70 has joined #ruby
<RougeRR> yeah that was always my issue
<NL3limin4t0r> You can find the default config here: https://github.com/rubocop-hq/rubocop/blob/master/config/default.yml
NODE has quit [Quit: changing servers]
<RougeRR> rubocop/vscode has a bug if i try to use a config file outside the project
<NL3limin4t0r> Line 655 starts the Layout/HashAlignment settings
<RougeRR> ive been meaning to add a global .gitignore
<RougeRR> because i dont want to add it to each project gitignore
<RougeRR> thankyou
zlogan has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
dionysus70 is now known as dionysus69
<al2o3-cr> gitingore?
NODE has joined #ruby
<NL3limin4t0r> Here is the config documentation page if you need it: https://www.rubocop.org/en/stable/configuration/
bsdbandit-01 has quit [Ping timeout: 245 seconds]
NODE has quit [Client Quit]
NODE has joined #ruby
NODE has quit [Client Quit]
phaul has joined #ruby
<RougeRR> ty NL3limin4t0r
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
dionysus69 has quit [Remote host closed the connection]
phaul has quit [Ping timeout: 265 seconds]
dionysus69 has joined #ruby
NODE has quit [Client Quit]
alfiemax has joined #ruby
dr_mdma_md has joined #ruby
NODE has joined #ruby
infinityfye has quit [Quit: Leaving]
chalkmonster has joined #ruby
NODE has quit [Client Quit]
phaul has joined #ruby
NODE has joined #ruby
<NL3limin4t0r> RougeRR: btw I agree with you that the default style isn't the most beautiful, however it is better maintainable. Since you need to indent all key-value pairs if you later on deside to add a key-value pair with a longer key. This also results in a larger git diff.
NODE has quit [Client Quit]
<NL3limin4t0r> With the default style you can leave the other lines alone.
alfiemax_ has joined #ruby
NODE has joined #ruby
phaul has quit [Ping timeout: 276 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
drincruz has joined #ruby
drincruz_ has quit [Read error: Connection reset by peer]
alfiemax has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
poontangmessiah has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
phaul has quit [Ping timeout: 276 seconds]
AJA4350 has joined #ruby
phaul has joined #ruby
Nahra has joined #ruby
Nahra has joined #ruby
dviola has quit [Ping timeout: 276 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
phaul has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
spacesuitdiver has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
spacesuitdiver has quit [Read error: Connection reset by peer]
spacesuitdiver has joined #ruby
mikecmpbll has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
Nahra has quit [Ping timeout: 265 seconds]
poontangmessiah has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
drincruz has quit [Read error: Connection reset by peer]
drincruz has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
execc has joined #ruby
greengriminal has joined #ruby
diego1 has joined #ruby
ogres has joined #ruby
Jonopoly has joined #ruby
phaul has joined #ruby
thrizian has quit [Ping timeout: 245 seconds]
ivanskie has joined #ruby
<execc> Hi, i ran
<execc> bundle exec rackup config.ru
<execc> This repository works find when i deploy on heroku, but i want to host it on my own, What am i doing wrong?
phaul has quit [Ping timeout: 268 seconds]
phaul has joined #ruby
<havenwood> execc: The default is already `config.ru` so you don't need to specify it.
<havenwood> execc: What's the problem you're seeing?
yokel has quit [Ping timeout: 240 seconds]
<havenwood> execc: Say more about what's going wrong.
<havenwood> execc: In general, it works to: bundle exec rackup
<havenwood> Are you reverse proxying from NGINX or Apache? Serving directly on port 80 or 443?
phaul has quit [Ping timeout: 268 seconds]
<execc> No, should i reverse proxy?
<execc> i get no error. It's just that when i visit the ipaddress:9292 nothing shows up
AJA4351 has joined #ruby
<execc> What I did:
yokel has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
<execc> 1- create GCP instance 2-ssh into it 3- pull git repo 4- `bundle install` 5- `bundle exec rackup`
phaul has joined #ruby
<havenwood> execc: Does it work on port 80?
<havenwood> execc: If I had to guess, I'd say you were filewalling off port 9292. Dunno.
<havenwood> execc: Works on my machine.
<execc> Not on port 80 either. I'll check the firewall rules
<havenwood> execc: Are you serving to localhost they trying to access it remotely?
<havenwood> execc: Switch to 0.0.0.0
<dorian> folks is there a canonical guide to handing off maintainership of a gem?
yann-kaelig has quit [Quit: yann-kaelig]
snickers has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
<dorian> aha
snickers has quit [Client Quit]
alfiemax_ has quit [Remote host closed the connection]
thebetra3 has joined #ruby
<havenwood> dorian: And then typically add them to authors and emails in your gemspec: https://guides.rubygems.org/specification-reference/#authors=
<havenwood> execc: Does it work on 0.0.0.0:80?
yann-kaelig has joined #ruby
<execc> havenwood How to make it 0.0.0.0:80? `bundle exec rackup -p 0.0.0.0:80`?
<dorian> amusingly that page was coming up in searches but nothing in the serp summary connected it in my head
<dorian> also only root can open a tcp port lower than 1024
<havenwood> execc: bundle exec rackup --host 0.0.0.0 --port 80
<havenwood> execc: Or you can alternatively set the host and port in the rackup file.
<execc> havenwood `/usr/lib/ruby/2.5.0/socket.rb:201:in `bind': Permission denied - bind(2) for 0.0.0.0:80 (Errno::EACCES)
<havenwood> execc: sudo
<havenwood> execc: (port 80)
<havenwood> execc: It should work on whatever port though, if you want to go back to 9292.
My_Hearing has joined #ruby
<execc> havenwood Thank you! It works. So it was firewall problem yeah?
diego1 has left #ruby ["WeeChat 2.6"]
<havenwood> execc: It was just that localhost is a local host only.
dviola has joined #ruby
<execc> i see, so as long as i run with 0.0.0.0 it'll be fine.
<havenwood> execc: localhost is 127.0.0.1, it's just a loopback
<havenwood> execc: 0.0.0.0 is what you want, yes
<execc> got it.
<havenwood> execc: You can drop the `File::RDONLY` argument, since read only is already the default.
<havenwood> execc: File.open doesn't self-close the file descriptor in its non-block form.
<havenwood> execc: If you just want to normally serve the file, consider: File.read('index.html')
phaul has joined #ruby
<havenwood> execc: It'll serve in chunks if you do: File.readlines('index.html')
<havenwood> execc: To simply serve up the current directory, without a rackup file at all:
<havenwood> ruby -run -ehttpd --
Technodrome has joined #ruby
<havenwood> execc: sudo --preserve-env ruby -run -ehttpd -- --port=80 --bind-address=0.0.0.0
<execc> havenwood sweet! thanks for the tips. I'll play around with it.
<havenwood> execc: no prob, any time!
Jonopoly has quit [Quit: WeeChat 2.5]
phaul has quit [Ping timeout: 246 seconds]
<execc> havenwood what do you mean ```It'll serve in chunks if you do: File.readlines('index.html')
wildtrees has joined #ruby
<havenwood> execc: HTTP/1.1 added the idea of chunked transfer encoding, where the data is sent in chunks.
<havenwood> execc: In the Rack spec, you give the status code, headers, then the body—in your case File.open.
<havenwood> execc: If the body has multiple parts, Rack will serve them up in chunks automatically.
<havenwood> execc: "Data is sent in a series of chunks. The Content-Length header is omitted in this case and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format, followed by '\r\n' and then the chunk itself, followed by another '\r\n'."
<havenwood> execc: HTTP/2 does not use chunks, since it has full streaming support.
poontangmessiah has joined #ruby
<havenwood> execc: HTTP/1, no chunks. HTTP/1.1, chunks. HTTP/2, no chunks.
<havenwood> (Rack is designed around HTTP/1.1.)
<execc> havenwood aha nice
phaul has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
yann-kaelig has quit [Quit: yann-kaelig]
howdoi has joined #ruby
phaul has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
NODE has quit [Quit: changing servers]
mikecmpbll has quit [Quit: inabit. zz.]
NODE has joined #ruby
phaul has joined #ruby
dviola has quit [Ping timeout: 268 seconds]
NODE has quit [Client Quit]
NODE has joined #ruby
cd has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
bsdbandit-01 has joined #ruby
dviola has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
nixy37 has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
ytti_ has quit [Ping timeout: 250 seconds]
ytti has joined #ruby
cliluw has quit [Ping timeout: 250 seconds]
MasterNayru_ has quit [Ping timeout: 250 seconds]
baweaver has quit [Ping timeout: 250 seconds]
prestorium has quit [Ping timeout: 268 seconds]
baweaver has joined #ruby
NODE has quit [Quit: changing servers]
DTZUZU has quit [Quit: WeeChat 2.2]
rippa has joined #ruby
nixy3 has quit [Ping timeout: 250 seconds]
alfiemax has joined #ruby
baweaver is now known as Guest62961
Axy has quit [Ping timeout: 250 seconds]
sauvin has quit [Ping timeout: 250 seconds]
drincruz_ has joined #ruby
cliluw has joined #ruby
DTZUZU has joined #ruby
madhatter has quit [Ping timeout: 250 seconds]
NODE has joined #ruby
NODE has quit [Client Quit]
nowhere_man has joined #ruby
drincruz has quit [Ping timeout: 250 seconds]
madhatter has joined #ruby
NODE has joined #ruby
dinfuehr has quit [Ping timeout: 276 seconds]
MasterNayru has joined #ruby
dinfuehr has joined #ruby
thebetra3 has quit [Ping timeout: 250 seconds]
NL3limin4t0r is now known as NL3limin4t0r_afk
eam has quit [Ping timeout: 250 seconds]
eam has joined #ruby
bodqhrohro has joined #ruby
<bodqhrohro> What does indexing on a number do?
<bodqhrohro> 1234[0] => 0, 1234[1] => 1, 1234[2] => 0, 1234[3] => 0, 1234[4] => 1
NODE has quit [Quit: changing servers]
NODE has joined #ruby
sauvin has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
<Swyper> hi
<Swyper> so weird
<Swyper> im on v 2.6.3 of ruby but rails t won't work
bvdw has joined #ruby
execc has left #ruby [#ruby]
<Swyper> p-192-168-1-34:Sample_app rickyarora$ rails test test/controllers/static_pages_controller_test.rbrbenv: rails: command not found
<bodqhrohro> Nevermind, found it in docs https://ruby-doc.org/core-2.6.5/Integer.html
NODE has quit [Quit: changing servers]
phaul has quit [Ping timeout: 240 seconds]
NODE has joined #ruby
phaul has joined #ruby
altious2 has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bsdbandit-01 has quit [Ping timeout: 252 seconds]
poontangmessiah_ has joined #ruby
bvdw has joined #ruby
phaul has quit [Ping timeout: 245 seconds]
dev-rfc83 has quit [Ping timeout: 245 seconds]
adam12 has quit [Ping timeout: 250 seconds]
altious has quit [Ping timeout: 250 seconds]
poontangmessiah has quit [Ping timeout: 250 seconds]
BTRE has quit [Ping timeout: 276 seconds]
adam12 has joined #ruby
phaul has joined #ruby
SeepingN has joined #ruby
dev-rfc83 has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
phaul has quit [Ping timeout: 245 seconds]
NODE has quit [Client Quit]
alfiemax has quit [Remote host closed the connection]
NODE has joined #ruby
AJA4351 has joined #ruby
phaul has joined #ruby
fphilipe has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
bmurt has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
fphilipe has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
nibbo_ has quit [Ping timeout: 276 seconds]
nibbo has joined #ruby
lucasb has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
alfiemax has joined #ruby
nibbo has quit [Ping timeout: 246 seconds]
NODE has quit [Quit: changing servers]
nibbo has joined #ruby
phaul has joined #ruby
devrfc83 has joined #ruby
NODE has joined #ruby
dev-rfc83 has quit [Ping timeout: 276 seconds]
devrfc83 is now known as dev-rfc83
NODE has quit [Client Quit]
Swyper has quit [Quit: Connection closed]
ogres has quit [Quit: Connection closed for inactivity]
NODE has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
phaul has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
greengriminal has joined #ruby
Technodrome has quit [Read error: Connection reset by peer]
donofrio__ has joined #ruby
NODE has quit [Client Quit]
phaul has quit [Ping timeout: 252 seconds]
NODE has joined #ruby
NODE has quit [Client Quit]
cliluw has quit [Ping timeout: 276 seconds]
donofrio_ has quit [Ping timeout: 268 seconds]
cliluw has joined #ruby
phaul has joined #ruby
NODE has joined #ruby
NODE has quit [Client Quit]
NODE has joined #ruby
yann-kaelig has joined #ruby
lghtstkr has quit [Ping timeout: 240 seconds]
BTRE has joined #ruby
phaul has quit [Ping timeout: 252 seconds]
spacesuitdiver has quit [Quit: Textual IRC Client: www.textualapp.com]
phaul has joined #ruby
lightstalker has joined #ruby
phaul has quit [Ping timeout: 276 seconds]
alfiemax_ has joined #ruby
harai has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
sauvin has quit [Remote host closed the connection]
phaul has joined #ruby
phaul has quit [Ping timeout: 276 seconds]
phaul has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
Azure has quit [Ping timeout: 246 seconds]
phaul has quit [Ping timeout: 245 seconds]
phaul has joined #ruby
Azure has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
chalkmonster has joined #ruby
My_Hearing has quit [Ping timeout: 268 seconds]
phaul has joined #ruby
My_Hearing has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
harai has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
NODE has quit [Client Quit]
NODE has joined #ruby
harai has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
ewanchic has joined #ruby
<ewanchic> havenwood: That's! I might just start with rvm part of the code first. Basically, it involves using the rails new script (I'm paraphrasing here). My gem starts by generating a new rails project, and creating a new rvm gemset based on specs, and then going back in to run a bundle install. For some reason I end up using certian commands (paraphrasing again) to make it work in the gemset...and then it's like the rails project doesn't recongiz
<ewanchic> e the bundle installed gems....it was a month ago I was working on this...sorry
<ewanchic> havenwood: I mean thats great. Thanks!
<havenwood> ewanchic: Show the command you're running and the resulting error?
<ewanchic> I'll have to get back to you on that. I just sat down to collect my thoughts before going onto the next task. I just thought I'd generalize of it. I'm sure you work too. When are good times/bad times to chat?
phaul has quit [Ping timeout: 246 seconds]
<ewanchic> sorry, I think faster that I type, and I miss words :P
<ewanchic> But I'll start loading my code into the fr8 gem.
<ewanchic> so you can see later. That would be easier.
NODE has quit [Quit: changing servers]
<ewanchic> havenwood: sorry, over :)
ur5us has joined #ruby
NODE has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
phaul has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
AndreiSZS has joined #ruby
gix has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
AJA4350 has quit [Ping timeout: 240 seconds]
execc has joined #ruby
phaul has joined #ruby
chalkmonster has quit [Read error: Connection reset by peer]
<execc> Hi,when i close the ssh connection to my server my website goes down. Do I have to keep the terminal open?
<execc> I tried with `bundle exec rackup` and `ruby -run -e httpd` Both reslut in loss of uptime when ssh window is closed
fphilipe has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
altious2 has quit [Quit: Leaving]
phaul has joined #ruby
thebetra3 has joined #ruby
execc has quit [Ping timeout: 260 seconds]
fphilipe has quit [Ping timeout: 276 seconds]
Ahmad2 has joined #ruby
skx86 has quit [Quit: Connection closed for inactivity]
phaul has quit [Ping timeout: 268 seconds]
<ewanchic> execc: are you using unicorn or passenger? if you manually run your app, and exit out, then yes it will close. If you run you app as a daemon service, it will stay running.
thebetra3 has quit [Ping timeout: 250 seconds]
execc has joined #ruby
phaul has joined #ruby
<ewanchic> execc: are you using unicorn or passenger? if you manually run your app, and exit out, then yes it will close. If you run you app as a daemon service, it will stay running.
thebetra3 has joined #ruby
<execc> ewanchic I'm using neither. I'm serving static files with the commands above. I tried the -D flag but it got me errors
<execc> `Errno::ENOENT at /en
phaul has quit [Ping timeout: 265 seconds]
<execc> I'll fix it and go with a daemon. ty!
harai has joined #ruby
thebetra3 has quit [Ping timeout: 246 seconds]
chalkmonster has joined #ruby
<ewanchic> No problem. I'd try using NGINX, or Apache2, with either unicorn or passenger (Nginx and unicorn are my favorites)
thebetra3 has joined #ruby
ouemt has joined #ruby
<execc> alright i'll look into that
phaul has joined #ruby
cadeskywalker has quit [Ping timeout: 265 seconds]
<ouemt> hey, I'm working on someone else's code that uses `a_string.to_i(16).to_s(2)` are both of those steps necessary?
AJA4350 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has quit [Ping timeout: 250 seconds]
chalkmonster has quit [Quit: WeeChat 2.6]
dev-rfc83 has quit [Quit: Bye bye!]
NODE has quit [Quit: changing servers]
jcalla has quit [Quit: Leaving]
<ewanchic> ouemt: so first it reads the string and interprets it as HEX value, then converts that decimal number into binary. Two step conversion. Seems ok to me.
<ouemt> ewanchic: just seems like something that could be done in one step, but it works so whatever :)
NODE has joined #ruby
ur5us_ has joined #ruby
NODE has quit [Client Quit]
<ewanchic> ouemt: you could make a method to return that. `a_string.as_hex_to_binary`
phaul has joined #ruby
NL3limin4t0r_afk has quit [Ping timeout: 276 seconds]
<leftylink> it could maybe be done in one step w/ a string replacement, but of ccourse the code would be longer.
ur5us has quit [Ping timeout: 245 seconds]
<leftylink> s/maybe/surely/
NODE has joined #ruby
<leftylink> the "maybe" was more of a "if you felt like it, maybe you want to"
harai has quit [Ping timeout: 260 seconds]
<leftylink> rather than "maybe it's possible" since there's no "maybe" for the fact that it is possible
NL3limin4t0r_afk has joined #ruby
NODE has quit [Client Quit]
chalkmonster has joined #ruby
cadeskywalker has joined #ruby
grilix has quit [Ping timeout: 265 seconds]
execc has quit [Remote host closed the connection]
bmurt has joined #ruby
NODE has joined #ruby
phaul has quit [Ping timeout: 276 seconds]
poontangmessiah_ has quit [Ping timeout: 245 seconds]
r29v has joined #ruby
<ouemt> I'm translating it to python, and that and the next line together became `a = f'{int(hex, 16):b}'.zfill(20)`
<ouemt> ugly, but it works
r29v has quit [Client Quit]
nixy37 has quit [Quit: The Lounge - https://thelounge.chat]
nixy37 has joined #ruby
<ewanchic> ouemt: I think you gave me a reason why not to python. (O_O)
phaul has joined #ruby
<ouemt> ewanchic: to be fair, I'm going for conciseness, not readability
<ewanchic> ouemt: fair enough...I'm still learning.
<ouemt> and this code is ugly to start with... a few lines back I had to deal with `header = /(.*)(reply: )(.*)(\/.*)(\/.*)/.match(message)[3]`
<ouemt> because 5 captures are necessary when you only want one of them
thebetra3 has quit [Quit: WeeChat 2.5]
<havenwood> ouemt: .hex.to_s(2)
<havenwood> &>> '123'.hex.to_s(2)
<rubydoc> # => "100100011" (https://carc.in/#/r/832d)
<ouemt> havenwood: neat!
<ouemt> is there a ruby function that fills with zeroes from the left? .zfill in python
Mia has quit [Read error: Connection reset by peer]
phaul has quit [Ping timeout: 268 seconds]
<havenwood> ouemt: String#rjust
<havenwood> &>> Integer('42', 16).to_s(2).rjust(8, '0')
<rubydoc> # => "01000010" (https://carc.in/#/r/832e)
<ouemt> havenwood: perfect, thanks!
<havenwood> ouemt: np!
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
ivanskie has quit [Ping timeout: 276 seconds]
<havenwood> ouemt: alternatively:
<havenwood> &>> '%08b' % '1'.hex
<rubydoc> # => "00000001" (https://carc.in/#/r/832f)
<havenwood> &>> '%08b' % '42'.hex
<rubydoc> # => "01000010" (https://carc.in/#/r/832g)
<havenwood> oops
<havenwood> oh, that's right
<havenwood> '42'.hex.to_s(2).rjust(8, '0')
<ouemt> heh, I was trying to find a mistake like, "but it looks right"
<havenwood> &>> sprintf '%08b', '42'.hex
<rubydoc> # => "01000010" (https://carc.in/#/r/832h)
<havenwood> &>> '42'.hex.to_s(2).rjust(8, '0')
<rubydoc> # => "01000010" (https://carc.in/#/r/832i)
<havenwood> yup, checks out
<leftylink> huh, when was it added
<leftylink> &ri String#hex
<havenwood> ouemt: and another way:
<havenwood> &>> '42'.hex.digits(2).join
<rubydoc> # => "0100001" (https://carc.in/#/r/832j)
phaul has joined #ruby
<leftylink> huh, since 1.8.7 at least
<havenwood> leftylink: digits is newer :)
<leftylink> well, that's cool how there still remains something to learn about this language I guess.
<havenwood> though that last one doesn't rjust >.>
greengriminal has quit [Quit: This computer has gone to sleep]
phaul has quit [Ping timeout: 250 seconds]
monika has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
witlesswonder has joined #ruby
phaul has joined #ruby
Fernando-Basso has joined #ruby
dviola has quit [Ping timeout: 240 seconds]
jinie_ has joined #ruby
dviola has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
greengriminal has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
greengriminal has quit [Client Quit]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
jinie_ is now known as jinie
chalkmonster has quit [Quit: WeeChat 2.6]
AJA4351 has joined #ruby
phaul has joined #ruby
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
fphilipe has joined #ruby
chalkmonster has joined #ruby
dviola has quit [Ping timeout: 250 seconds]
rwb has joined #ruby
phaul has quit [Ping timeout: 276 seconds]
fphilipe has quit [Ping timeout: 250 seconds]
nuh^ has joined #ruby
phaul has joined #ruby
nowhere_man has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
monika has quit [Ping timeout: 276 seconds]
phaul has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
hiroaki has joined #ruby
phaul has joined #ruby
ellcs1 has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
skx86 has joined #ruby
dev-rfc83 has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
Nicmavr has joined #ruby
im0nde_ has joined #ruby
phaul has joined #ruby
AJA4351 has joined #ruby
im0nde has quit [Ping timeout: 240 seconds]
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
bruce_lee has quit [Remote host closed the connection]
phaul has quit [Ping timeout: 252 seconds]
AndreiSZS has quit [Remote host closed the connection]
schne1der has quit [Ping timeout: 246 seconds]
phaul has joined #ruby
im0nde_ is now known as im0nde
dr_mdma_md has quit [Quit: leaving]
Ven`` has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
yann-kaelig has quit [Quit: yann-kaelig]
phaul has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 252 seconds]
AJA4351 is now known as AJA4350
phaul has quit [Ping timeout: 265 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
phaul has joined #ruby
pizzaiolo has joined #ruby
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven`` has joined #ruby
Ven`` has quit [Client Quit]
phaul has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
mark1_ has left #ruby [#ruby]
phaul has quit [Ping timeout: 250 seconds]
hiroaki has quit [Ping timeout: 240 seconds]
chalkmonster has quit [Quit: WeeChat 2.6]
phaul has joined #ruby
Fernando-Basso has quit [Quit: Leaving]
phaul has quit [Ping timeout: 252 seconds]
baojg has quit [Remote host closed the connection]
lineus_ has joined #ruby
zlogan has quit [Read error: Connection reset by peer]
lineus_ has quit [Remote host closed the connection]
Ven`` has joined #ruby
zlogan has joined #ruby
phaul has joined #ruby
lineus has quit [Ping timeout: 260 seconds]
akem__ has joined #ruby
ur5us_ has quit [Ping timeout: 240 seconds]
ur5us_ has joined #ruby
dev-rfc83 has quit [Quit: Bye bye!]
akemhp_ has quit [Ping timeout: 268 seconds]
phaul has quit [Ping timeout: 250 seconds]
AJA4351 has joined #ruby
drincruz_ is now known as drincruz
AJA4351 is now known as AJA4350
AJA4350 has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
lineus has joined #ruby
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has quit [Ping timeout: 265 seconds]
phaul has joined #ruby
phaul has quit [Ping timeout: 265 seconds]