<leitz>
zenspider, had to add the rpms and then recompile Ruby.
Mon_Ouie has quit [Quit: WeeChat 1.9.1]
Mon_Ouie has joined #ruby
psmolen has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
DTZUZO has quit [Ping timeout: 244 seconds]
Guest58115 has joined #ruby
Guest58115 has quit [Ping timeout: 245 seconds]
clorisu has quit [Quit: Leaving]
<zenspider>
leitz: why are you compiling ruby?
psmolen has joined #ruby
<leitz>
Because I got really really tired of people saying "you should upgrade". So I do. Every week or so.
duderonomy has joined #ruby
<zenspider>
seems a bit extreme
<zenspider>
s/a bit //
<leitz>
I left Ruby twice because I spent more time being told to upgrade, after saying I couldn't, than I did getting answers.
<leitz>
That was a bit extreme.
<zenspider>
"couldn't"? seems like you can.
<zenspider>
ya know what? nevermind... I don't think any understanding is going to come of this
<leitz>
I work on servers; I can't upgrade them. I can upgrade my personal machine, but then lose the ability to code for servers.
<baweaver>
You can upgrade them. If your base image is old enough that it still has Ruby 2.0.0 or below there are more severe security risks there as well.
<baweaver>
CentOS 6 and friends are far out of date, and they all like to lock down old versions of things with critical security flaws.
<leitz>
There's no ROI to upgrade, or to even install Ruby. I was trying to get it into the environment.
<leitz>
And RHEL 6 still pays a lot of bills for people.
scott4000 has joined #ruby
<baweaver>
The ROI is not having holes in your network
<leitz>
At least for two more years.
<leitz>
Even RHEL 7 uses an unsupported Ruby. Not sure about RHEL 8.
<leitz>
All software has bugs.
<baweaver>
Playing chicken with LTS is a good way to have nightmares.
<baweaver>
Though you could repackage your base image and load more packages into YUM for it.
<leitz>
Like I said, no ROI. We don't use Ruby, I was trying to build that. Not enough value in my code to even install Ruby, much less support locally compiled versions.
<leitz>
And the vi/readline issue is fixed. Added the readline-devel and libedit-devel rpms to the requirements.
<havenwood>
Ah, just remembered, it was "rlwrap" I was trying to recall.
<havenwood>
rlwrap irb
Xeago_ has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
Xeago_ is now known as Xeago
Azure has quit [Ping timeout: 245 seconds]
Azure has joined #ruby
savolla has quit [Ping timeout: 240 seconds]
mroutis_ has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
Guest58115 has joined #ruby
arescorpio has joined #ruby
Guest58115 has quit [Ping timeout: 252 seconds]
dbz has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dbz has quit [Ping timeout: 260 seconds]
dbz has joined #ruby
jhass has quit [Ping timeout: 260 seconds]
AJA4350 has quit [Quit: AJA4350]
beeman has quit [Ping timeout: 260 seconds]
sylario has quit [Ping timeout: 260 seconds]
balr0g has quit [Ping timeout: 260 seconds]
jhass has joined #ruby
sylario has joined #ruby
beeman has joined #ruby
mroutis has joined #ruby
bheesham has joined #ruby
arescorpio has quit [Quit: Leaving.]
braincrash has quit [Quit: bye bye]
Kilo`byte has quit [Ping timeout: 245 seconds]
nikivi has quit [Read error: Connection reset by peer]
Nikita has joined #ruby
Nikita is now known as Guest93195
Guest93195 is now known as nikivi
braincrash has joined #ruby
Kilo`byte has joined #ruby
samort7 has joined #ruby
dviola has quit [Quit: WeeChat 2.2]
jhill has joined #ruby
Hobbyboy has quit [Ping timeout: 240 seconds]
jhass has quit [Ping timeout: 252 seconds]
gnufied has quit [Ping timeout: 260 seconds]
dbz has quit [Remote host closed the connection]
Hobbyboy has joined #ruby
jhass has joined #ruby
psmolen has quit [Ping timeout: 246 seconds]
dbz has joined #ruby
gix has joined #ruby
psmolen has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
Danielss89 has quit [Ping timeout: 276 seconds]
PaulePanter has quit [Ping timeout: 260 seconds]
Danielss89 has joined #ruby
redlegion has quit [Ping timeout: 256 seconds]
redlegion has joined #ruby
evdubs has quit [Remote host closed the connection]
mroutis has quit [Ping timeout: 245 seconds]
evdubs has joined #ruby
Guest58115 has joined #ruby
dbz has quit [Remote host closed the connection]
Guest58115 has quit [Ping timeout: 272 seconds]
dbz has joined #ruby
exchgr` has joined #ruby
salasrod has quit [Quit: /quit]
havenwood has quit [Ping timeout: 268 seconds]
havenwood has joined #ruby
crankharder has quit [Ping timeout: 268 seconds]
exchgr has quit [Ping timeout: 268 seconds]
crankharder has joined #ruby
salasrod has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
rupam123456 has quit [Remote host closed the connection]
olblak has quit [Ping timeout: 240 seconds]
rupam123456 has joined #ruby
esrse has joined #ruby
reber has joined #ruby
reber has quit [Remote host closed the connection]
reber has joined #ruby
idiocrash has joined #ruby
esrse has quit [Quit: Leaving]
esrse has joined #ruby
<JJonah>
i'm writing a module that adds methods to a class when that class extends it. it will add private methods as well, purely to make the code more readable, but i don't want those private methods to conflict with any private methods a user might write. is there a convention for doing this? eg, prepending or appending `_` or `__` to the private method names?
dbz has quit [Remote host closed the connection]
duderonomy has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
MoritaShinobu has joined #ruby
ur5us has quit [Ping timeout: 245 seconds]
apeiros has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sauvin has joined #ruby
doubledup has joined #ruby
doubledup has quit [Remote host closed the connection]
apeiros has quit [Read error: Connection reset by peer]
sysvalve has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
nfk has joined #ruby
d^sh has quit [Ping timeout: 244 seconds]
d^sh has joined #ruby
alex``` has joined #ruby
bomb has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
LiftLeft has quit [Ping timeout: 240 seconds]
x0f has quit [Ping timeout: 245 seconds]
x0f has joined #ruby
apeiros has joined #ruby
roshanavand has quit [Quit: leaving]
AJA4350 has joined #ruby
tristanp has joined #ruby
roshanavand has joined #ruby
tristanp has quit [Ping timeout: 252 seconds]
c355e3b has left #ruby [#ruby]
sysvalve has quit [Ping timeout: 272 seconds]
sysvalve has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
alex``` has quit [Ping timeout: 240 seconds]
Nicmavr has joined #ruby
alex``` has joined #ruby
roshanavand has quit [Quit: leaving]
roshanavand has joined #ruby
roshanavand has quit [Client Quit]
roshanavand has joined #ruby
roshanavand has quit [Client Quit]
roshanavand has joined #ruby
roshanavand has quit [Client Quit]
sylario has joined #ruby
pulgolino has quit [Quit: WeeChat 0.4.2]
pulgolino has joined #ruby
bak1an has joined #ruby
bmurt has joined #ruby
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
cschneid_ has quit [Remote host closed the connection]
DTZUZO has joined #ruby
bhaak has quit [Ping timeout: 260 seconds]
jottr has joined #ruby
bhaak has joined #ruby
kapil___ has joined #ruby
<pyrmont>
qolq: Like baweaver said, it's a little hard to know how best to structure this without more context but there are situations in which three values might be returned. The <=> method is typically implemented to return -1, 0, 1. My suggestion would be to return something in this format. Perhaps something like :constrained, :unconstrained, :unchanged.
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
edwardthefma has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
mike11 has quit [Ping timeout: 245 seconds]
chromis has joined #ruby
bak1an has quit [Read error: Connection reset by peer]
bak1an has joined #ruby
sysvalve has quit [Quit: Leaving]
thejs has joined #ruby
AlwaysHigh has joined #ruby
AlwaysHigh has left #ruby ["Leaving"]
edwardthefma has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
edwardthefma has joined #ruby
Alina-malina has quit [Ping timeout: 244 seconds]
edwardthefma has left #ruby [#ruby]
<qolq>
ineb: i agree. but i've been stuck on this refactoring for quite a while now and i've reached the point where i just decided to write spaghetti code (but more organized than the previous) for now so i could organize things in my head better
<qolq>
eventually i'll refactor it yet again
nowhere_man has quit [Ping timeout: 252 seconds]
<qolq>
pyrmont: i considered that after baweaver's comment actually. but i think the structure of this is going to change significantly so i won't need to do it anymore
gr33n7007h has joined #ruby
<qolq>
anyway, thanks for the help guys
al2o3-cr has quit [Ping timeout: 272 seconds]
mniip has quit [Ping timeout: 615 seconds]
RougeR has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
cschneid_ has quit [Remote host closed the connection]
gr33n7007h has quit [Read error: Connection reset by peer]
drale2k_ has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
Turnikov has quit [Quit: Leaving]
gnufied has joined #ruby
gr33n7007h has joined #ruby
RougeR has joined #ruby
Rapture has joined #ruby
drale2k_ has quit [Ping timeout: 245 seconds]
alem0lars has joined #ruby
apeiros has quit []
\_[o_o]_ has joined #ruby
bijan_ has joined #ruby
mroutis has joined #ruby
v01d4lph4 has quit [Remote host closed the connection]
apeiros_ has joined #ruby
Inline has joined #ruby
regedit has joined #ruby
Inline has quit [Read error: Connection reset by peer]
Inline has joined #ruby
<regedit>
HTTPrb question: how can i debug/output the raw HTTP request that gets sent?
jrich523 has quit [Read error: Connection reset by peer]
jrich523 has joined #ruby
desperek has quit [Quit: xoxo]
ShekharReddy has quit []
dionysus69 has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mike11 has quit [Ping timeout: 245 seconds]
LiftLeft2 is now known as LiftLeft
Dbugger has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
Guest58115 has joined #ruby
eckhardt has joined #ruby
jottr has joined #ruby
dbz_ has quit [Remote host closed the connection]
dbz has joined #ruby
Guest58115 has quit [Ping timeout: 272 seconds]
jottr has quit [Ping timeout: 272 seconds]
hays_ has joined #ruby
<hays_>
If I wanted to use map to generate a hash, is the clearest/best way to go about this to use to_h? I find end.to_h to be .. disturbing
<hays_>
Hash[] also seems weird, encasing a block like that. is this something I should just get over
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<elomatreb>
Probably, yes. It's not considered particularly bad style
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MyMind has joined #ruby
duderonomy has joined #ruby
Caeso has joined #ruby
raz has quit [Excess Flood]
bmurt has joined #ruby
salasrod has quit [Read error: Connection reset by peer]
tty has quit [Ping timeout: 252 seconds]
raz has joined #ruby
tty has joined #ruby
salasrod has joined #ruby
lenqbit has quit [Ping timeout: 246 seconds]
Sembei has quit [Ping timeout: 252 seconds]
<hays_>
is there a way to have ruby be associated more strongly with the directory I am in? right now I am using rbenv and basically if I have a shared directory among different users, each one needs to have a certain ruby installation and associated gems
<hays_>
it would be cool if there was a way to just have a ruby that is in that directory somehow, and it is picked up when someone cds into the directory.
<havenwood>
hays_: I know how to do that with chruby, but I'm not quite sure with rbenv.
<havenwood>
hays_: Does rbenv allow arbitrary Ruby locations even?
<hays_>
not sure
<havenwood>
hays_: Yeah, looks pretty hardcoded to $RBENV_ROOT/versions, glancing at this.
<havenwood>
hays_: Ready to switch to chruby? ;-)
illuzion has joined #ruby
<havenwood>
hays_: In chruby, you can just: RUBIES+=(/your/app/rubies/*)
<havenwood>
hays_: Then switch to it by putting the name of * in your .ruby-version file.
<havenwood>
(Assuming your app is in ~/my/app and you made a directory ~/my/app/rubies with Ruby in ruby-2.5.1-my-app/ dir.)
<havenwood>
hays_: Or just use /opt/rubies for all your users.
<havenwood>
rbenv could probably also do that? I assume you can make RBENV_ROOT a system-wide location.
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has quit [Ping timeout: 246 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
I don't know how a user would rehash though, with an rbenv root installation.
<havenwood>
<3 chruby
eckhardt has joined #ruby
<hays_>
im using rbenv because it is what others on my team use
eckhardt has quit [Client Quit]
<Caeso>
So I'm making a connect four game, and have a Board class. This class includes the following code: https://gist.github.com/Caeso-Lucilius/020f6676e405061daef4bf02dff957d1. However, it returns an error on the first play complaining how there is no defined "push" method for Nil class.
solocshaw has joined #ruby
xuanrui has joined #ruby
<Caeso>
The "whose_tile?" method just checks to see if the tile is taken.
<elomatreb>
You have variables named player_1 in the play method, and variables named player_one in the initialize
<Caeso>
Wow I'm dumb. Thanks.
clorisu has joined #ruby
solocshaw has quit [Quit: solocshaw]
v01d4lph4 has joined #ruby
lomex has joined #ruby
Azure has quit [Read error: Connection reset by peer]
v01d4lph4 has quit [Ping timeout: 245 seconds]
nima_m has quit [Quit: Connection closed for inactivity]
<clorisu>
is there a way to use sleep as a condition in an if branch? eg `if sleep(10) == true puts "true" else puts "false"`?
Azure has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
sameerynho has quit [Ping timeout: 252 seconds]
thejs has joined #ruby
magellanicloud has quit [Quit: Leaving]
<havenwood>
clorisu: sleep(10) #=> 10
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
<havenwood>
clorisu: 10 is truthy though, so you can just: if sleep(10)
<havenwood>
clorisu: What do you expect to interrupt the sleep?
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
bmurt has quit [Ping timeout: 252 seconds]
<hays_>
is there a nice way to merge two keys into a single key so that it is usable in a Hash?
<aesthetikx>
[a, b].hash possibly
<hays_>
interesting. thats a number, which I guess is OK
<hays_>
maybe better than a sting
<havenwood>
hays_: Plain 'ole `[a, b]` can be used as a key too. What's the context?
<hays_>
i was thinking that, but it seems like using a mutable as a key is asking for problems
<hays_>
the context is.. a lot like the situation where you have ip and tcp. except they are :syms
<hays_>
trying to figure out reasonable way to be able to store those.. was thinking nested dicts isn't too bad
teej has quit [Quit: Connection closed for inactivity]
bmurt has joined #ruby
bmurt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
noidedsuper has quit [Quit: Leaving]
srruby has joined #ruby
<srruby>
I just started a project that is still on ruby 1.9.3. I'm running the latest debian (Buster) and was unable to install ruby 1.9.3p551 I do have a server that is running debian wheezy and I am able to install ruby 1.9.3 on my server. Anyone know how to get 1.9.3 on my debian buster machine? I guess I can create a docker image if I need to...