SeepingN has quit [Quit: The system is going down for reboot NOW!]
dasher00 has joined #ruby
binaryplease has joined #ruby
<justizin>
i'm trying to write some code that forcibly disconnects my kafka client, for the purpose of verifying some retry logic works. looks like it is running Socket.close(), but the sockets still show up in netstat / lsof as ESTABLISHED.
<justizin>
doing my best to grok the actual implementation, but i can't find where close() is defined ... i know that when i forced a disconnect using gdb, i had to run 'shutdown' instead of 'close' on the fd.
<justizin>
ruby socket doesn't seem to have the differentiation, i want to assume it does the Right Thing(tm), but struggling to see that.
<justizin>
anyone know anything about this sorta problem? :)
jenrzzz has quit [Ping timeout: 268 seconds]
war_pigs has quit [Quit: later... computer is sleeping]
StoneCypher has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
charliesome has joined #ruby
cagomez has joined #ruby
<darix>
justizin: tcpkill
<bdonnahue>
hey guys. im trying to use rvm to install the bundler gem... i tried "rvm gem install bundler" but see the error: Please note that `rvm gem ...` was removed, try `gem install bundler` or `rvm all do gem install bundler` instead. ( see: 'rvm usage' )
<bdonnahue>
i then tried "gem install bundler" and i get a 127 command not fonud
<Radar>
bdonnahue: Follow the READMEs and set those up. You'll be better for it :) Remember to "rvm implode --force" first to delete RVM.
jenrzzz has quit [Ping timeout: 245 seconds]
mooser has joined #ruby
marxarelli is now known as marxarelli|afk
FoX_77 has joined #ruby
cerulean has joined #ruby
<cerulean>
does anyone use the tweet stream gem?
<cerulean>
its totally broke for me
webopsx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
outreachdan has quit [Read error: Connection reset by peer]
<Radar>
?didntwork
<ruby[bot]>
What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
<FoX_77>
def hi_everyone ; puts "all good?" ; end
outreachdan has joined #ruby
<Radar>
FoX_77: did you say something?
hndk has joined #ruby
brent__ has quit [Remote host closed the connection]
<FoX_77>
radar.split("") yes y e s
<FoX_77>
:-)
jenrzzz has joined #ruby
brent__ has joined #ruby
<Radar>
undefined local variable or method radar
<FoX_77>
LOL
<cerulean>
undefined method `configure' for TweetStream:Module
<cerulean>
is the error i get
<cerulean>
the gem does require, and the module itself is a constant, but nothing inside is accessible
<bdonnahue>
<Radar> getting them installed thanks
jgt4 has joined #ruby
<Radar>
cerulean: Which version of the gem are you using?
chrisgopher has quit [Remote host closed the connection]
brendan- has joined #ruby
amclain has quit [Quit: Leaving]
esObe has quit [Ping timeout: 260 seconds]
war_pigs has joined #ruby
charliesome has joined #ruby
gusrub has quit []
<bdonnahue>
<cerulean> i get that error if I run make as well
skweek has quit [Remote host closed the connection]
sumobob has quit [Ping timeout: 252 seconds]
skweek has joined #ruby
Silthias has joined #ruby
war_pigs has quit [Quit: later... computer is sleeping]
jenrzzz has quit [Ping timeout: 260 seconds]
<cerulean>
em-twitter doesn't work either Radar
<cerulean>
lol
<cerulean>
bdonnahue: ./configure
<cerulean>
then make
<cerulean>
then make install
outreachdan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JoshS has joined #ruby
johnzorn has quit [Remote host closed the connection]
Lord_of_Life has joined #ruby
jrafanie has joined #ruby
jgt4 has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
duderono_ has joined #ruby
duderono_ has quit [Client Quit]
ElderFain has quit [Ping timeout: 260 seconds]
Karunamon has quit [Ping timeout: 255 seconds]
sonne_ has quit [Ping timeout: 260 seconds]
duderonomy has quit [Ping timeout: 245 seconds]
zeroDivisible has quit [Ping timeout: 268 seconds]
sysanthrope has quit [Ping timeout: 245 seconds]
claudevandort has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
johnzorn has joined #ruby
dagelf has quit [Ping timeout: 268 seconds]
badeball has quit [Ping timeout: 268 seconds]
jameser has joined #ruby
johnzorn has quit [Client Quit]
mim1k has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
johnzorn has joined #ruby
badeball has joined #ruby
Karunamon has joined #ruby
ElderFain has joined #ruby
johnzorn has quit [Client Quit]
johnzorn has joined #ruby
sonne has joined #ruby
sysanthrope has joined #ruby
zeroDivisible has joined #ruby
dagelf has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
Silthias has quit [Ping timeout: 268 seconds]
<bdonnahue>
<cerulean> got the make working. On a separate docker container i am instlaling ruby with rvm. the rvm complains that things like awk, head, tail, sort are not installed
<bdonnahue>
no idea why
<bdonnahue>
which awk shows its in /usr/bin
<bdonnahue>
anyone got an idea?
ztkz has quit [Read error: Connection reset by peer]
ztkz has joined #ruby
ztkz has joined #ruby
ztkz has quit [Changing host]
binaryplease has quit [Ping timeout: 260 seconds]
sleetdrop has quit [Quit: Computer has gone to sleep.]
claudevandort has joined #ruby
johnzorn has quit [Quit: Ciao]
johnzorn has joined #ruby
Silthias has joined #ruby
Sammichmaker has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Remote host closed the connection]
spicerack has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
enterprisey_ has joined #ruby
enterprisey has quit [Ping timeout: 260 seconds]
enterprisey_ has quit [Read error: Connection reset by peer]
Coldblackice has joined #ruby
ElSif has quit [Read error: Connection reset by peer]
hutch34_ has quit [Ping timeout: 240 seconds]
Silthias has quit [Ping timeout: 260 seconds]
safetypin has joined #ruby
s2013 has joined #ruby
ozcanesen has joined #ruby
s2013 has quit [Client Quit]
safetypin has quit [Read error: Connection reset by peer]
Miron has quit [Ping timeout: 264 seconds]
chouhoul_ has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
Channel6 has joined #ruby
libastral has quit [Ping timeout: 255 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
Silthias has joined #ruby
sumobob has joined #ruby
libastral has joined #ruby
alan_w has quit [Quit: WeeChat 1.4]
claudevandort has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
ericmathison has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
Miron has joined #ruby
apeiros has quit [Ping timeout: 260 seconds]
elifoster has joined #ruby
JeanCarloMachado has joined #ruby
apeiros has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
mooser has quit [Remote host closed the connection]
Silthias has joined #ruby
mooser has joined #ruby
sumobob has quit [Ping timeout: 255 seconds]
pilne has quit [Quit: Quitting!]
Silthias has quit [Ping timeout: 260 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bonhoeffer has joined #ruby
mzo has quit [Ping timeout: 260 seconds]
rakm has joined #ruby
cagomez has joined #ruby
brent__ has joined #ruby
Silthias has joined #ruby
Rodya_ has joined #ruby
djbkd has quit [Remote host closed the connection]
cagomez has quit [Read error: Connection reset by peer]
sumobob has joined #ruby
cagomez has joined #ruby
duderonomy has joined #ruby
brent__ has quit [Ping timeout: 268 seconds]
johnzorn has quit [Ping timeout: 240 seconds]
GodFather has quit [Ping timeout: 252 seconds]
Rodya_ has quit [Ping timeout: 240 seconds]
ericmathison has quit [Quit: leaving]
ericmathison has joined #ruby
nankyokusei has joined #ruby
johnzorn has joined #ruby
Silthias has quit [Ping timeout: 260 seconds]
<cerulean>
yo Radar
<cerulean>
i got em-twitter to work
<Radar>
i again.
<cerulean>
with cinch
<Radar>
hi again*
<cerulean>
hey
Silthias has joined #ruby
<cerulean>
i figured most of the undocumented stream crap out myself and then found another bot called cogbot that solved my problems with EM and cinch
cfec0b8d has joined #ruby
ski7777 has quit [Remote host closed the connection]
<cerulean>
i definitely do not recommend tweetstream but em-twitter can be made to work
hndk has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 245 seconds]
sleetdrop has joined #ruby
johnzorn has quit [Ping timeout: 252 seconds]
esObe has joined #ruby
BTRE has quit [Quit: Leaving]
Bock has joined #ruby
Bock has quit [Max SendQ exceeded]
StoneCypher has joined #ruby
BTRE has joined #ruby
esObe has quit [Ping timeout: 252 seconds]
StoneCypher has quit [Ping timeout: 245 seconds]
Cohedrin has quit [Read error: Connection reset by peer]
<bdonnahue>
Using /usr/local/rvm/gems/ruby-2.3.1
<bdonnahue>
"/usr/local/rvm/scripts/functions/support: line 517: cat: command not found"
<bdonnahue>
i get that error when trying to set the default ruby with rvm
<adam12>
Odd.
<Radar>
very odd.
<adam12>
What platform are you on?
Cohedrin has joined #ruby
__Yiota has joined #ruby
<bdonnahue>
centos 7
<bdonnahue>
im in a dockerfile though
<adam12>
Maybe you have no PATH?
<allisio>
Deep.
<bdonnahue>
if i echo path i get "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
<adam12>
what about `which cat`
<adam12>
(inside docker instance)
Channel6 has quit [Quit: Leaving]
harfangk has joined #ruby
<allisio>
Fluffy.
<adam12>
heh
<bdonnahue>
"/usr/bin/cat"
Silthias has quit [Ping timeout: 260 seconds]
<adam12>
Maybe there is some sort of PATH unsetting in rvm
<bdonnahue>
no idea how or why... not sure what to do now
Bock has joined #ruby
shakes has joined #ruby
Silthias has joined #ruby
<cerulean>
add cat to the path again
dviola has quit [Quit: WeeChat 1.7]
StoneCypher has joined #ruby
jenrzzz has joined #ruby
BSAlb has joined #ruby
DWSR has quit [Ping timeout: 260 seconds]
BSaboia has quit [Ping timeout: 240 seconds]
StoneCypher has quit [Ping timeout: 260 seconds]
Silthias has quit [Ping timeout: 240 seconds]
AndBobsYourUncle has quit [Quit: Textual IRC Client: www.textualapp.com]
bonhoeffer has quit [Ping timeout: 252 seconds]
mim1k has joined #ruby
__Yiota has quit [Read error: Connection reset by peer]
<bdonnahue>
what do you mean add it to the path again
bkxd has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 260 seconds]
minimalism has joined #ruby
yokel has quit [Ping timeout: 268 seconds]
<bdonnahue>
<cerulean>?
yokel has joined #ruby
Silthias has joined #ruby
__Yiota has joined #ruby
bkxd has quit [Ping timeout: 268 seconds]
pwnd_nsfw` has joined #ruby
ztkz has quit []
sneakerhax has joined #ruby
Robtop__ has quit [Ping timeout: 240 seconds]
dmarr has quit [Quit: Goodbye]
Silthias has quit [Ping timeout: 268 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ozcanesen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claw has quit [Ping timeout: 252 seconds]
jdm has quit [Remote host closed the connection]
<cerulean>
bdonnahue: the $PATH variable
<cerulean>
locate cat
<cerulean>
and add the directory back
<cerulean>
with export PATH=$PATH:/path
shakes has quit [Ping timeout: 260 seconds]
<nchambers>
what do you guys normally use for command line parsing?
dmarr has joined #ruby
BSaboia has joined #ruby
<cerulean>
nchambers: idk have you checked out commander
<Nilium>
blah.each do |q| case q when /^--foooooooobar/ etc. etc.
<Nilium>
Rolling your own makes the code surprisingly predictable and easy to work with compared to figuring out what horrors lie in someone else's library
<baweaver>
optparser just slurps from ARGV
<baweaver>
the rest are left on ARGV
<Nilium>
That seems reasonable
<baweaver>
y'know, there's a dirty secret about those libraries
Silthias has joined #ruby
<baweaver>
they rely on people being annoyed to submit patches to fix things
<baweaver>
instead of rewriting everything again and seeing how close they can get to the LISP curse
hndk has joined #ruby
sagax has quit [Read error: Connection reset by peer]
<baweaver>
TL;DR LISP curse: everyone makes their own version which only ever solves their own problems, no complete solutions or even well tested ones exist because of it.
<baweaver>
Javascript is one of the closest popular modern language to hitting that.
<baweaver>
Clojure hit it hard, but has Java to fall back on for libs.
rakm has joined #ruby
Cohedrin has joined #ruby
mazeinmaze_ has joined #ruby
enterprisey has joined #ruby
<Nilium>
Maybe what we need is some more standards
<Nilium>
Also free burritos
<Nilium>
Brought that up in a standards meeting at work and nobody took it seriously
<elomatreb>
bob_n00b: You give attr_* the name of the instance variable you want it to create methods for. It has no method of knowing that it's a boolean value or that you want a predicate method
charliesome has quit [Client Quit]
cagomez has joined #ruby
ski7777 has joined #ruby
<bob_n00b>
elomatreb: So apart from my comments, the code there makes sense/doesn't duplicate unnescessary or follow bad habits? :)
patarr has joined #ruby
<elomatreb>
You could use alias_method if you really wanted, but I don't think explicitely defining the method is frowned upon (https://eval.in/775738)
<elomatreb>
bob_n00b: ^
cagomez has quit [Ping timeout: 260 seconds]
patarr has quit [Ping timeout: 268 seconds]
griff has joined #ruby
<bob_n00b>
Ooh, eval.in was nice :) So, this should make sense, then: https://eval.in/775744
<bob_n00b>
eh, minus the extra fluff ;)
griff has quit [Client Quit]
<elomatreb>
Well, now you're overwriting the method defined by method_alias with your own
<elomatreb>
Yep, keep in mind though that you now have both YourClass#done and YourClass#done?
jgt has joined #ruby
<bob_n00b>
elomatreb: yes, I understand that, but what's worst? :) Maybe explicitly defining just done? is better ... (I'm just trying to learn ... Ruby is fascinating)
jhack has quit [Quit: Leaving]
<elomatreb>
Matter of preference, I'd say. I'm pretty sure ActiveSupport (the utility library of Rails) defines something like attr_* for predicate methods, and explicitely defining completely trivial methods may be something people dislike too
<bob_n00b>
Rails seems to do quite a lot of stuff ... :) Was thinking I should get some more basic Ruby understanding before looking too much into frameworks
jgt has quit [Ping timeout: 260 seconds]
__Yiota has joined #ruby
vali has quit [Quit: vali]
User458764 has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
centrx has quit [Remote host closed the connection]
impermanence has joined #ruby
vali has joined #ruby
balo has quit [Quit: leaving]
balo has joined #ruby
impermanence has quit [Client Quit]
ldnunes has joined #ruby
bkxd has joined #ruby
psychicist__ has joined #ruby
jamesaxl has joined #ruby
rgr_ has quit [Ping timeout: 255 seconds]
<Verity>
bob_n00b, yes, thats very important (imo)
mooser has joined #ruby
binaryplease has quit [Ping timeout: 260 seconds]
shinnya has joined #ruby
aknagi has joined #ruby
xenops has joined #ruby
houhoulis has joined #ruby
cagomez has joined #ruby
mooser has quit [Ping timeout: 252 seconds]
jgt has joined #ruby
bob_n00b has quit [Quit: bbl]
pickle_ has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
cagomez has quit [Ping timeout: 252 seconds]
StoneCypher has joined #ruby
nadir has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
jamesaxl has quit [Client Quit]
jamesaxl has joined #ruby
Suslov has joined #ruby
StoneCypher has quit [Ping timeout: 245 seconds]
claudevandort has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
Suslov has quit [Ping timeout: 240 seconds]
StoneCypher has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
StoneCypher has quit [Ping timeout: 268 seconds]
aryaching has joined #ruby
pupsicle has joined #ruby
claudevandort has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
minimalism has quit [Read error: Connection reset by peer]
rprimus has quit [Quit: Lost terminal]
cagomez has joined #ruby
vali has quit [Quit: vali]
minimalism has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
cagomez has quit [Ping timeout: 255 seconds]
jamesaxl has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jtperreault has joined #ruby
pickle_ has quit [Read error: Connection reset by peer]
pickle_ has joined #ruby
enterprisey has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hutch34_ has joined #ruby
jrafanie has joined #ruby
t-recx has joined #ruby
hutch34_ has quit [Ping timeout: 252 seconds]
anisha has quit [Quit: This computer has gone to sleep]
Rodya_ has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
houhoulis has quit [Remote host closed the connection]
nankyokusei has joined #ruby
jamesaxl has joined #ruby
CallumJ has quit [Remote host closed the connection]
cagomez has joined #ruby
Guest96 has quit [Remote host closed the connection]
mooser has joined #ruby
Rodya_ has quit [Ping timeout: 260 seconds]
MrBusiness has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
Guest96 has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
jamesaxl has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
ramortegui has joined #ruby
grh has joined #ruby
agit0 has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
millerti has joined #ruby
pickle_ has quit [Remote host closed the connection]
jamesaxl has joined #ruby
mooser has quit [Remote host closed the connection]
hutch34_ has joined #ruby
Pumukel has quit [Remote host closed the connection]
Pumukel has joined #ruby
Pumukel has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
minimalism has quit [Quit: minimalism]
Pumukel has quit [Ping timeout: 260 seconds]
impermanence has joined #ruby
rgiscard has joined #ruby
impermanence has quit [Client Quit]
User458764 has joined #ruby
rgiscard has quit [Client Quit]
GodFather has quit [Ping timeout: 252 seconds]
Pumukel has joined #ruby
mnaqii has quit [Remote host closed the connection]
jameser has joined #ruby
rgiscard has joined #ruby
GodFather has joined #ruby
rgiscard has quit [Client Quit]
cagomez has joined #ruby
aryaching has quit [Remote host closed the connection]
shakes has quit [Quit: Leaving]
synthroi_ has joined #ruby
cagomez has quit [Ping timeout: 260 seconds]
synthro__ has joined #ruby
DLSteve has joined #ruby
al2o3-cr has joined #ruby
synthroid has quit [Ping timeout: 240 seconds]
kratec has quit [Quit: WeeChat 1.7]
synthroi_ has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
Ken has joined #ruby
Ken is now known as Guest65926
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agit0 has quit [Read error: Connection reset by peer]
jameser has joined #ruby
cagomez has joined #ruby
yeticry_ has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
cagomez has quit [Ping timeout: 240 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
Snickers has quit [Quit: Snickers]
__Yiota has joined #ruby
AgentVenom has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
jamesaxl has joined #ruby
minimalism has joined #ruby
enterprisey has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Rodya_ has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: Closing time!]
claudevandort has joined #ruby
Burgestrand has joined #ruby
rotty_ has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Nicmavr has joined #ruby
Nicmavr is now known as Guest13641
Kestrel-029 has quit [Ping timeout: 240 seconds]
blackwind_123 has quit [Quit: Live long and prosper \v//]
mooser has joined #ruby
hutch34_ has quit [Ping timeout: 252 seconds]
TomyWork has joined #ruby
Hates_ has left #ruby [#ruby]
mooser_ has joined #ruby
herzog_ernst has joined #ruby
mooser has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
mooser_ has quit [Remote host closed the connection]
war_pigs has joined #ruby
mooser has joined #ruby
ozcanesen has joined #ruby
harfangk has joined #ruby
jonjitsu has joined #ruby
chouhoulis has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 260 seconds]
antgel has quit [Ping timeout: 240 seconds]
skweek has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
t-recx has quit [Quit: t-recx]
shinnya has quit [Ping timeout: 240 seconds]
gnufied has quit [Read error: Connection reset by peer]
millerti has joined #ruby
dhollin3 is now known as dhollinger
workmad3 has joined #ruby
zapata has quit [Ping timeout: 240 seconds]
jonjits[m] has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
beawesomeinstead has quit []
beawesomeinstead has joined #ruby
jonjitsu has quit [Quit: Leaving]
jamesaxl has quit [Ping timeout: 240 seconds]
millerti has joined #ruby
jamesaxl has joined #ruby
sleetdrop has joined #ruby
iMadper has joined #ruby
iMadper has joined #ruby
iMadper has quit [Changing host]
rakm has joined #ruby
war_pigs has quit [Quit: laters.. I'm out.]
grh has quit [Ping timeout: 260 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
cdg has joined #ruby
jamesaxl has joined #ruby
Guest65926 is now known as kspencer
herzog_ernst has quit [Remote host closed the connection]
herzog_ernst has joined #ruby
aupadhye has quit [Ping timeout: 255 seconds]
cfec0b8d has quit [Ping timeout: 252 seconds]
gnufied has joined #ruby
herzog_ernst has quit [Remote host closed the connection]
zapata has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
<snockerton>
i have a top-level method (log()) defined that uses a top-level instance variable, but when i call log() from within a class block, the instance variable is undefined - how can i get around this since attr_reader doesn't work at the top-level object?
davidmichaelkarr has joined #ruby
jgnagy has quit [Remote host closed the connection]
Jayson_Virissimo has joined #ruby
PaulePan1er is now known as PaulePanter
jgnagy has joined #ruby
ltem has joined #ruby
tvw has quit [Remote host closed the connection]
ec_ has quit [Excess Flood]
maattdd has quit [Ping timeout: 240 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
ec_ has joined #ruby
jamesaxl has joined #ruby
<toretore>
?code snockerton
<ruby[bot]>
snockerton: We can't help you without your code, please post it to https://gist.github.com
Win7XP has left #ruby [#ruby]
workmad3 has quit [Ping timeout: 255 seconds]
VladGh has quit [Ping timeout: 260 seconds]
rizonz_ has quit [Ping timeout: 260 seconds]
rizonz has joined #ruby
VladGh has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_aeris_ has quit [Ping timeout: 240 seconds]
hays has joined #ruby
hays has quit [Read error: Connection reset by peer]
dhollinger has quit [Ping timeout: 240 seconds]
aglorei has joined #ruby
maattdd has joined #ruby
hays has joined #ruby
cam27 has quit [Quit: cam27]
TomyWork has quit [Remote host closed the connection]
<hays>
I am constantly finding myself in situations where I want to derive from a standard Ruby class like "Hash"
djbkd has joined #ruby
cam27 has joined #ruby
_aeris_ has joined #ruby
<hays>
Is there an alternative that's not kind of a pain in the rear? I find that composition for example is a bit of a pain, because you would have to define a bunch of pass thru functions
patarr has joined #ruby
hutch34_ has joined #ruby
<elomatreb>
Have you looked at refinements?
<matthewd>
hays: It rather depends what you want your new class to do
<hays>
It seems like inheritance is a good way to essentially 'wrap' a Hash
<hays>
elomatreb: I have not
StoneCypher has joined #ruby
<elomatreb>
Basically scoped monkey patching, may be what you want if you only want to add/change some methods
cagomez has joined #ruby
cagomez has quit [Read error: Connection reset by peer]
<matthewd>
If you want something that's Hash-like but with additional semantics, you may find yourself needing to define all of those pass-through methods anyway, to apply said semantics
cagomez has joined #ruby
<matthewd>
(e.g. ActiveSupport's HashWithIndifferentAccess, which does inherit Hash)
cagomez has quit [Remote host closed the connection]
<hays>
elomatreb: hmm. interesting.. not sure that captures the semantics I want
<hays>
matthewd: A lot of what I am doing is loading in a JSON file with a specific structure, and I want to add domain-specific operations to that structure, while still being able to access it and use it like a Hash
maattdd has quit [Ping timeout: 240 seconds]
cagomez has joined #ruby
<hays>
I could get most of it, probably, by just passing through the [] methods... but to me its pretty safe to just extend the hash
<matthewd>
Sounds more like a struct than a hash to me
Satyajit has joined #ruby
<hays>
well. JSON.parse loads into a hash
brent__ has joined #ruby
<hays>
.. i mean... at least the way this JSON is structured it does
<cerulean>
z4phod: in the first one you pass nothing to when_visible (no object), in the second you pass a block starting with do and ending with end.
<LyndsySimon>
I'd also be interested in any suggestions for improvement.
<ljarvis>
LyndsySimon: why define the class variables in addition to class instance methods?
<z4phod>
cerulean, same if i do ...when_visible() do |b| ?
millerti has joined #ruby
<cerulean>
z4phod: just because you put () doesnt meant it doesnt pass the block. it does.
<LyndsySimon>
ljarvis: Heh - I'm going back over my notes on how class instance variables work right now. I think that's an oversight, and they should be instance variables on the class.
<cerulean>
@instance_variable - for when you want a variable inside an object instance
marcdel has quit [Ping timeout: 240 seconds]
<cerulean>
@@class_variable - when you want a variable thats global to the class definitoon
<z4phod>
ty very much cerulean
<ljarvis>
LyndsySimon: ah ok, yeah I would avoid class_variable_set and avoid @@
<cerulean>
local_variable - local and dies with scope like any other variable
<cerulean>
np z4phod
jgt has quit [Quit: WeeChat 1.4]
<cerulean>
$global_variable - never goes out of scope or dies until you set it to nil
<LyndsySimon>
ljarvis: Yep, they should be instance variables of the class. I was focusing on the structure of the module instead of what I was trying to accomplish :P
domgetter has quit [Ping timeout: 255 seconds]
Rodya_ has quit [Remote host closed the connection]
User458764 has joined #ruby
<z4phod>
(i throught that function() and function() do ... end was same), so i can only use do with 'good' function like each ?)
<cerulean>
class_variable isnt used much in most ruby but it can be used and i have used it before
<elomatreb>
It behaves a little unintuitive wrt inheritance
<cerulean>
z4phod: just go with what works
<cerulean>
function() != function(block)
<LyndsySimon>
ljarvis: Updated.
Rodya_ has joined #ruby
<cerulean>
LyndsySimon: i think you're doing it wrong. there's no reason not to use class variables
<LyndsySimon>
cerulean: Sure there is - class variables are not inherited.
<cerulean>
i dont get why what you're trying to do can't be solved by standard ruby methods
<cerulean>
that code is gonna give a nightmare to whoever discovers it and has to work on it, no offense
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cerulean>
i prefer to avoid metaprogramming when possible
<LyndsySimon>
Of course. I've found myself having to implement this pattern several times now, and I always screw it up the first couple of times. I'm wrapping it into a module so I can write and test it once, and not have to revisit it in the future.
username1 has joined #ruby
<cerulean>
i don't get what you are using this pattern for? i've been programming ruby for years and never needed stuff like this. what does this save you from?
<herwin>
class << self; attr_accessor :foo; end
<cerulean>
why do i have to put attr_accessor in :class self? you're setting values on objects BEFORE you create them? i dont get why you would do this
<cerulean>
why not just create the object and set them the normal way?
mooser has joined #ruby
dionysus69 has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
<ljarvis>
LyndsySimon: To truly simplify it, you only need to use attribute methods Ruby already provides: https://gist.github.com/leejarvis/5d8514287ed5e757b967e5bd4917774e -- note that you need to handle default values for the instance method also, which means you need to return that value in the getter
skweek has quit [Ping timeout: 260 seconds]
<cerulean>
i'd like an explanation immediately of this pattern
<ljarvis>
cerulean: calm down
<ljarvis>
cerulean: I would also just write it manually, but it's pretty clear LyndsySimon is doing this for learning purposes
<cerulean>
oic
<cerulean>
i should have thought of that
BTRE has quit [Ping timeout: 245 seconds]
<ljarvis>
so who cares what it's for and if it's an unusual pattern
<cerulean>
my bad
<LyndsySimon>
I provided a link above to one explanation of why it's useful.
<cerulean>
nah don't me stop you, it's not that it's bad, i was just curious and bit freaked out by it, and wanted to promote proper ruby usage
<ljarvis>
LyndsySimon: it's definitely useful, just writing helpers for it often leaves you with more confusing code, because the methods are inherently complex
<LyndsySimon>
cerulean: That makes sense :) Ruby variables work fine for 99% of cases. The places where I need this are when I'm implementing something that needs to inherit class-level attributes in a specific way.
linetrac1 has joined #ruby
<LyndsySimon>
ljarvis: I couldn't agree more.
StoneCyp1er has joined #ruby
<ljarvis>
LyndsySimon: in general, you would just write them out yourself. ActiveSupport does have a similar class_attribute implementation, which is useful, but equally complex
<LyndsySimon>
ljarvis: Yeah, I'm purposefully not using ActiveSupport, because I'd prefer this module be usable outside of Rails.
ged_ has joined #ruby
mrbobbytables_ has joined #ruby
knowtheory_ has joined #ruby
<ljarvis>
sure, activesupport is also usable outside of rails though :)
lancetw_ has joined #ruby
peteretep_ has joined #ruby
lele` has joined #ruby
pskosinski_ has quit [Changing host]
pskosinski_ has joined #ruby
pskosinski_ has joined #ruby
nadir_ has joined #ruby
gusrub has joined #ruby
armando1 has joined #ruby
bestie has quit [Ping timeout: 252 seconds]
alphor has quit [Ping timeout: 252 seconds]
darthvorik_ has quit [Ping timeout: 252 seconds]
Guest13641 has quit [Ping timeout: 252 seconds]
johnzorn has quit [Ping timeout: 252 seconds]
Karunamon has quit [Ping timeout: 252 seconds]
NightMonkey has quit [Ping timeout: 252 seconds]
electrostat has quit [Quit: uwotm8]
Olipro has quit [Ping timeout: 252 seconds]
nadir has quit [Read error: Connection reset by peer]
pskosinski has quit [Read error: Connection reset by peer]
linetrace has quit [Read error: Connection reset by peer]
contradictioned has quit [Read error: Connection reset by peer]
mrbobbytables has quit [Ping timeout: 252 seconds]
peteretep has quit [Ping timeout: 252 seconds]
knowtheory has quit [Ping timeout: 252 seconds]
HashNuke has quit [Ping timeout: 252 seconds]
lancetw has quit [Ping timeout: 252 seconds]
Guest70698 has quit [Ping timeout: 252 seconds]
ironcamel has quit [Ping timeout: 252 seconds]
lele has quit [Ping timeout: 252 seconds]
armando has quit [Ping timeout: 252 seconds]
jokester has quit [Ping timeout: 252 seconds]
tristanp has quit [Ping timeout: 252 seconds]
spectra has quit [Ping timeout: 252 seconds]
ged has quit [Read error: Connection reset by peer]
Silthias has quit [Ping timeout: 252 seconds]
Miron has quit [Ping timeout: 252 seconds]
angseus has quit [Ping timeout: 252 seconds]
eblip has quit [Ping timeout: 252 seconds]
hxegon_afk has quit [Ping timeout: 252 seconds]
alamar has quit [Ping timeout: 252 seconds]
silverdust has quit [Ping timeout: 252 seconds]
HashNuke_ has joined #ruby
ged_ is now known as ged
angseus_ has joined #ruby
silverdust has joined #ruby
j_ has joined #ruby
hxegon_a1k has joined #ruby
pskosinski_ is now known as pskosinski
StoneCypher has quit [Ping timeout: 240 seconds]
Alina-malina has quit [Excess Flood]
contradictioned has joined #ruby
TomyLobo has quit [Ping timeout: 252 seconds]
pwnd_nsfw has quit [Ping timeout: 252 seconds]
leah2 has quit [Ping timeout: 252 seconds]
nishiki has quit [Ping timeout: 252 seconds]
silverdust is now known as Guest2763
HashNuke_ is now known as HashNuke
nishiki has joined #ruby
Nicmavr has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
peteretep_ is now known as peteretep
Karunamon has joined #ruby
nadir_ is now known as nadir
alphor has joined #ruby
ironcamel has joined #ruby
jokester has joined #ruby
knowtheory_ is now known as knowtheory
Nicmavr is now known as Guest80111
lancetw_ is now known as lancetw
johnzorn has joined #ruby
mrbobbytables_ is now known as mrbobbytables
Alina-malina has joined #ruby
Olipro has joined #ruby
fusta has joined #ruby
yeticry_ has quit [Ping timeout: 240 seconds]
darthvorik_ has joined #ruby
eblip has joined #ruby
SteenJobs_ has joined #ruby
NightMonkey has joined #ruby
leah2 has joined #ruby
<ljarvis>
in answer to "should i release this?" as a gem? I would say no. The behaviour it adds is likely just going to be added manually to most projects, and anything more is likely to pull in parts of active support. That's just my advice though, if you want to release it then go for it
<LyndsySimon>
AFK a bit, gotta do meatspace things. I'll check back though.
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ljarvis>
using class ivars over class vars is a very well known pattern, it's more a question of "why create additional methods for supporting this"
yurikoles_ has joined #ruby
arne_ has joined #ruby
yurikoles has quit [Ping timeout: 260 seconds]
Burgestrand has quit [Quit: Closing time!]
nettoweb has joined #ruby
fusta has quit [Ping timeout: 240 seconds]
brent__ has quit []
<havenwood>
LyndsySimon: You can ditch `def self.included(base ...` with `module ClassMethods` and just `extend` your module instead of `include`ing it.
<havenwood>
LyndsySimon: It's not a class instance variable (@) that you're defining, it's a class variable (@@).
<havenwood>
"instance variable" is short for "class instance variable"
<ljarvis>
havenwood: you're way behind :D
* havenwood
reads scrollback
tvw has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
ggherdov has quit []
sepp2k has quit [Ping timeout: 260 seconds]
ggherdov has joined #ruby
nitric has joined #ruby
cagomez has quit [Read error: Connection reset by peer]
cagomez has joined #ruby
safetypin has joined #ruby
impermanence has joined #ruby
<impermanence>
So if I want to create a file I have to use FileUtils? There does not seem to be a touch method in File, Kernel, (Object for that matter) or IO. Am I overthinking this?
<impermanence>
And it seems that open will not create a file automatically...
maattdd has joined #ruby
bob_n00b has joined #ruby
HashNuke has quit []
HashNuke has joined #ruby
sneakerhax has quit [Ping timeout: 260 seconds]
duderonomy has quit [Ping timeout: 260 seconds]
safetypin has quit [Quit: ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bob_n00b>
Any hints/input on how you would populate an array in a setting like this (without reading from external file): https://eval.in/776176 ? (Tried various options, hashes, multiline string etc, all had various issues, well, I had, being n00b) ;)
StoneCyp1er is now known as StoneCypher
<impermanence>
havenwood: k. I guess I was myopically looking for a method called "touch" since I discovered that a couple of days ago in FileUtils and have been using it since.
<impermanence>
havenwood: I don't see IO.open(). I see kernel.open()...
<impermanence>
nvm
arne_ has quit [Ping timeout: 258 seconds]
<impermanence>
I guess it's not listed in the method list on the left side of the doc because it's a synonym for IO.new()...
gusrub has quit [Remote host closed the connection]
<impermanence>
although neither is IO.new(). hm.
<matthewd>
impermanence: It's there.
gusrub has joined #ruby
kies has quit [Ping timeout: 268 seconds]
arne_ has joined #ruby
<impermanence>
matthewd: you're right. so :: means: I'm overridden from some other class (in this case kernel)?
<matthewd>
No
nettoweb has quit [Read error: Connection reset by peer]
<impermanence>
matthewd: regarding the core docs: what is the significance of :: vs # when describing a method?
<matthewd>
:: is a class method, # is an instance method
__Yiota has joined #ruby
colstrom has joined #ruby
justizin has joined #ruby
seanh has joined #ruby
<impermanence>
that helps.
Iacobus has joined #ruby
<matthewd>
IO.open; some_io_instance.close
BSAlb has joined #ruby
Guest96 has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
__Yiota has quit [Client Quit]
mim1k has joined #ruby
<impermanence>
matthewd: ahh...basic OOP question here then: when I call IO.open(my_file) it creates an instance of IO? I'm asking because you then wrote "some_io_instance.close"...
gusrub has quit [Ping timeout: 260 seconds]
<matthewd>
bob_n00b: Unclear what you're looking for.. what do you dislike about the current arrangement?
<matthewd>
impermanence: Correct
<impermanence>
kk
BSaboia has quit [Ping timeout: 260 seconds]
ozcanesen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gregf_ has quit [Ping timeout: 260 seconds]
ozcanesen has joined #ruby
grh has quit [Ping timeout: 260 seconds]
ldnunes has quit [Ping timeout: 268 seconds]
<bob_n00b>
matthewd: In a shell script I would often just include larger block of text (var = <EOT ... EOT), but if I tried that here I ended up with lots of quotes and no real refs to true/false, it seemed. Tried stripping " etc. Repeating a command for every line works for a few lines, but I'm trying to figure out what a rubyist would do :)
brent__ has quit [Read error: Connection reset by peer]
Pumukel has quit [Remote host closed the connection]
<matthewd>
Seems pretty fine to me as is. It's not the sort of pattern one sees a lot, but I think that's just because it's fairly rare to have a blob of data embedded in your code.
gusrub has joined #ruby
Pumukel has joined #ruby
renchan has quit [Quit: Leaving...]
cfec0b8d has joined #ruby
<bob_n00b>
next phase is to read from file, I guess yaml or something would be easy
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xall has quit [Ping timeout: 240 seconds]
LastWhisper____ has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
Cohedrin has joined #ruby
Guest80111 has quit [Ping timeout: 258 seconds]
<cerulean>
Hnununununu
<cerulean>
- the official word of ruby
<cerulean>
if you say this in an interview, you will get the job because only elite ruby hackers know it
ferr1 has quit [Quit: WeeChat 1.7]
<hays>
matthewd: hmm.. yeah I think its not that simple. that is cool though. Structure of the data is that it is a hash of arrays of hashes, and that can be recursive. so you might have a hash of an array with another hash of hashes under that
ramfjord has joined #ruby
ozcanesen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millerti has joined #ruby
Miah_ has quit []
ldnunes has quit [Ping timeout: 240 seconds]
Miah_ has joined #ruby
* baweaver
writes that on his list of disqualifiers
Nicmavr has joined #ruby
duderonomy has joined #ruby
Nicmavr is now known as Guest36607
Snickers has quit [Quit: Snickers]
Snickers has joined #ruby
aryaching has joined #ruby
safetypin has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
SteenJobs_ has quit [Quit: SteenJobs_]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Snickers has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Snickers has quit [Client Quit]
Bock has quit [Read error: Connection reset by peer]
Snickers has joined #ruby
xall has joined #ruby
ddffg has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
BigShip has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
<BigShip>
I'm having an issue with rbenv. After running 'rbenv install 2.4.1' and setting rbenv local and rbenv global to 2.4.1, I'm still missing 'gem' and 'ruby' commands. Any idea what's wrong?
mim1k has quit [Ping timeout: 260 seconds]
Snickers has joined #ruby
<BigShip>
Also 'type rbenv' returns 'rbenv is hashed'
<baweaver>
BigShip: try `which ruby` and `ruby -v`
<baweaver>
see if it's in PATH and if it's setting the right version
<baweaver>
could be something borked your PATH
<baweaver>
You could also try opening a new shell and seeing it that issue persists
ldnunes has joined #ruby
hays has quit [Remote host closed the connection]
<baweaver>
Does this happen with any other versions? You might try installing another one and see if it does the same thing
<BigShip>
which ruby comes up blank and ruby -v returns 'ruby: command not found'
<cerulean>
have you tried rvm?
<cerulean>
i think it works better than rbenv. thats just me
<baweaver>
Path issue it is.
<cerulean>
on the server i don't use any rbenv or rvm
<cerulean>
just bundler + local + system gemsets
<BigShip>
I also have 'export PATH="$HOME/.rbenv/bin:$PATH"' in my .bashrc
<baweaver>
are you using Bash?
<BigShip>
yeah
<baweaver>
some use ZSH and forget to change that
<baweaver>
`echo $PATH`
<matthewd>
BigShip: Is this a new setup, or just a new ruby version?
<BigShip>
I just installed it, so it's not a new issue
<BigShip>
matthewd: new setup
<baweaver>
it's possible you blitzed it later in the script
<BigShip>
baweaver: /home/user/.rbenv/bin is in my path after 'echo $PATH'
<baweaver>
and user is correct?
<BigShip>
there's nothing in .rbenv/bin other than rbenv bin though?
<BigShip>
yeah, user is correct
<BigShip>
*other than rbenv
<LastWhisper____>
hey guys what's the general consensus with open source PRs? I opened a PR implementing a new feature with tests, and the sole maintainer pasted my code, changed some variables and refactored then merged it himself... don't people usually ask for changes/open a PR to my branch then merge in ?
<matthewd>
Yeah, that's not the path entry you need
<matthewd>
(it needs to be there, but it's not the one used for ruby)
__Yiota has joined #ruby
<baweaver>
LastWhisper____: depends on the project
<LastWhisper____>
the readme says to open PR's with tests :(
<matthewd>
LastWhisper____: Up to the individual. Often the maintainer will avoid asking for trivial changes because it seems ungrateful to the person who's already done the real work.
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<BigShip>
I'm confused then, because the directions say to export .rbenv/bin to path. So, should I actually be exporting .rbenv/shims to path then?
<matthewd>
BigShip: You should be using rbenv init
<LastWhisper____>
matthewd i guess i was just a bit offended since now my name won't be on the changes, and i did all that work
<baweaver>
That's what I got from the README at least. Not sure how rbenv works
<baweaver>
LastWhisper____: then you should take that up with the owner
<baweaver>
there's not much of anything we can do about it
<BigShip>
matthewd: yeah, I have eval "(rbenv init -)" at the end of my .bashrc
<LastWhisper____>
yeah i'm not starting to stir up crap I'm just wondering if that was convention
<baweaver>
Not really
<matthewd>
BigShip: Do you just need to open a new shell after installing?
<BigShip>
matthewd: I've tried 'source .bashrc' logging out and logging back in, and restarting the machine. No luck on any of those
<baweaver>
Typically: New issue describing feature -> Ok, we want -> New PR -> Review -> Changes -> Review -> Merge
<baweaver>
of course that trivializes some of it, but that's the general idea
<matthewd>
LastWhisper____: You could send them an email asking if they would've preferred you do something differently
<matthewd>
BigShip: That should be adding shims to your path :/
<BigShip>
wowww I'm and idiot. Also, the directions need to be clearer
<matthewd>
Oh
<matthewd>
You're missing a $
<BigShip>
I didn't realize you needed to export the output of rbenv init - to your .bashrc and not the command itself
<LastWhisper____>
alright guys thank you for the advice I'll reach out to him privately.
<BigShip>
matthewd oh derp
maattdd has quit [Ping timeout: 260 seconds]
<BigShip>
matthewd yeah that worked >_<
<BigShip>
thanks!!!!
<matthewd>
LastWhisper____: Newer maintainers, especially, may just be inexperienced on tooling, and just trying to make do
lxsameer has quit [Quit: WeeChat 1.5]
surrounder has quit [Quit: WeeChat 1.7]
<LastWhisper____>
that makes sense, our company is very strict on opening PRs and following those guidelines so I might have just prematurely expected that, the guy is in fact a new maintainer for an older gem
Yxhuvud has quit [Read error: Connection reset by peer]
haylon has quit [Remote host closed the connection]
ldnunes has quit [Read error: Connection reset by peer]
yeticry has quit [Ping timeout: 240 seconds]
Yxhuvud has joined #ruby
yeticry has joined #ruby
fusta has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
milardovich has quit [Ping timeout: 260 seconds]
Silthias has joined #ruby
rgtk has joined #ruby
Silthias1 has quit [Ping timeout: 240 seconds]
User458764 has joined #ruby
milardovich has joined #ruby
bob_newb has joined #ruby
<bob_newb>
One of you probably see why .each comes as undefined method here(?): https://eval.in/776192 (output to file went well)
Cohedrin has joined #ruby
<bob_newb>
oh, since the structure is preserved in the yaml, I can just load it plainly: YAML.load_file(file)
saulod2 has joined #ruby
Guest96 has joined #ruby
saulod2 has quit [Client Quit]
ldnunes has joined #ruby
lupine_ is now known as lupine
milardovich has quit [Ping timeout: 255 seconds]
saulod2 has joined #ruby
lele` is now known as lele
BigShip has left #ruby [#ruby]
Robtop__ has joined #ruby
<bob_newb>
no, that doesn't load the values back into my array
Brak____________ has quit []
Brak____________ has joined #ruby
cdg has quit [Remote host closed the connection]
pwnd_nsfw` has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
Rutix has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
rakm has joined #ruby
SteenJobs_ has joined #ruby
SteenJobs_ has quit [Client Quit]
maattdd has joined #ruby
pilne has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maattdd has quit [Ping timeout: 240 seconds]
StoneCypher has quit [Ping timeout: 260 seconds]
muelleme_ has joined #ruby
chouhoul_ has joined #ruby
bob_newb has quit [Ping timeout: 260 seconds]
chouhou__ has joined #ruby
tdy has quit [Read error: Connection reset by peer]
llua has quit [Quit: Your ideas are intriguing to me, and I wish to subscribe to your newsletter.]
aryaching has quit [Ping timeout: 255 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
<snockerton>
how come puts inside of a class method doesn't go to stdout when i call it from top-level?
nofxx has joined #ruby
chouhoul_ has quit [Ping timeout: 258 seconds]
<toretore>
?code snockerton
<ruby[bot]>
snockerton: We can't help you without your code, please post it to https://gist.github.com
sepp2k has quit [Read error: Connection reset by peer]
<cerulean>
hey guys
<cerulean>
if Taylor Swift was a ruby programmer
<cerulean>
what do you think would be her first gem
Rodya_ has quit [Remote host closed the connection]
pupsicle has joined #ruby
StoneCypher has joined #ruby
steelbird has joined #ruby
muelleme_ has joined #ruby
ozcanesen has joined #ruby
karapetyan has joined #ruby
enterprisey has joined #ruby
milardovich has quit [Remote host closed the connection]
crankharder has joined #ruby
muelleme_ has quit [Ping timeout: 258 seconds]
gusrub has quit [Remote host closed the connection]
mrconfused has joined #ruby
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
moogumbo has quit []
moogumbo has joined #ruby
<crankharder>
trying to migrate my scrypt-based user-auth scheme to google firebase. They need a 'hash-key' in order to import the list of users and hashes... does anyone know what scrypt uses for that?
gusrub has joined #ruby
llua has quit [Quit: Your ideas are intriguing to me, and I wish to subscribe to your newsletter.]
<crankharder>
they also seem to require 'rounds' and 'mem-cost' - which aren't immediately obvious either
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
<crankharder>
as far as I can tell, when you SCrypt::Password.create('foo') you get back "#{salt}$#{hash}" -- where/what are the other things google needs to decrypt?
daxroc has quit []
daxroc has joined #ruby
maattdd has joined #ruby
milardovich has quit [Ping timeout: 258 seconds]
cagomez has joined #ruby
ineb has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
saulod2 has quit [Quit: Leaving]
milardovich has joined #ruby
__Yiota has quit [Ping timeout: 258 seconds]
maattdd has quit [Ping timeout: 260 seconds]
paolo_ has joined #ruby
llua has joined #ruby
mrconfused has quit [Ping timeout: 258 seconds]
nemish has joined #ruby
<nemish>
I'm trying to disable a task called from another task in my Rakefile
<nemish>
I've tried Rake::Task['release_checks'].enhance do Rake::Task['check:symlinks].delete end
<nemish>
but no luck
<nemish>
does anyone know how to disable a subtask?
pwnd_nsfw` has joined #ruby
<patarr>
Does anyone know of a utility I can use to enter a ruby expression, and it will generate parentheses for me to indicate the order of evaluation?
<nemish>
these are called in from a rake_tasks as part of another gem
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<nemish>
so i can't modify the original release_checks task
<nemish>
and I'd rather not create a wrapper ;)
ghornet has joined #ruby
paolo_ has quit [Quit: paolo_]
paolo_ has joined #ruby
Robtop__ has quit [Ping timeout: 252 seconds]
Silthias1 has quit [Ping timeout: 240 seconds]
Silthias has joined #ruby
pwnd_nsfw has joined #ruby
Rodya_ has joined #ruby
mrconfused has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 252 seconds]
outreachdan has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has quit [Quit: Leaving]
chichou has quit [Ping timeout: 260 seconds]
zapata has quit [Ping timeout: 255 seconds]
zapata has joined #ruby
millerti has joined #ruby
<cerulean>
nemish: fork the gem and modify it and then use your version in your Gemfile
paolo_ has quit [Remote host closed the connection]
chouhou__ has quit [Remote host closed the connection]
paolo_ has joined #ruby
chouhoulis has joined #ruby
paolo_ has quit [Client Quit]
cdg has joined #ruby
Silthias has quit [Read error: Connection reset by peer]
milardovich has quit [Remote host closed the connection]
Bob8989|2 has joined #ruby
milardovich has joined #ruby
ec_ has quit []
Silthias has joined #ruby
<nemish>
cerulean: yeah that won't happen :)
<nemish>
I would expect some way to disable the task with some sort of syntax like above
<nemish>
i tried .clear instead of delete but still ran
ec_ has joined #ruby
darthvorik_ has quit []
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
darthvorik_ has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<matthewd>
nemish: clear seems to be what you want. Perhaps it's running before you do the clear?
sagax has quit [Quit: Konversation terminated!]
tolerablyjake has joined #ruby
<nemish>
well i thought enhance was setting pre-reqs on the release_checks task... so you'd think it would run first
<matthewd>
Before release_checks, sure.. but not necessarily before other pre-reqs
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
outreachdan has quit [Read error: Connection reset by peer]
outreach_ has joined #ruby
Silthias1 has joined #ruby
xall has quit [Ping timeout: 255 seconds]
ec_ is now known as ec
ec has quit []
karapetyan has quit [Remote host closed the connection]
Silthias has quit [Ping timeout: 260 seconds]
ec has joined #ruby
karapetyan has joined #ruby
muelleme_ has joined #ruby
millerti has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jackneill has joined #ruby
<balo>
de #ruby #erlang #elixir-lang #jruby
karapetyan has quit [Ping timeout: 260 seconds]
skweek has quit [Ping timeout: 260 seconds]
<balo>
wrong window sry
muelleme_ has quit [Ping timeout: 252 seconds]
<nemish>
matthewd: yeah but when i run a bundle exec rake release_checks at the end it still fails on check:symlinks
<nemish>
so it's still being run during that task
pytuger has joined #ruby
pytuger has quit [Changing host]
pytuger has joined #ruby
Eleeleth has quit []
Eleeleth has joined #ruby
Rodya_ has quit [Remote host closed the connection]
mooser has joined #ruby
vifino has quit [Quit: Who turned this off?! D:<]
maattdd has joined #ruby
binaryplease has joined #ruby
binaryplease has quit [Client Quit]
psychicist__ has quit [Quit: Lost terminal]
stomar has quit [Quit: Konversation terminated!]
__Yiota has joined #ruby
maattdd has quit [Ping timeout: 260 seconds]
Guest36607 has quit [Read error: Connection reset by peer]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
cdg has joined #ruby
Jayson_Virissimo has joined #ruby
jdm has quit [Remote host closed the connection]
cfec0b8d has quit [Ping timeout: 260 seconds]
ericmathison has quit [Ping timeout: 252 seconds]
patarr_ has joined #ruby
patrick99e99 has joined #ruby
__Yiota has joined #ruby
patarr has quit [Ping timeout: 258 seconds]
Guest2763 is now known as silverdust
silverdust has quit [Changing host]
silverdust has joined #ruby
<patrick99e99>
Hi everyone.. I have a recurring rather annoying problem that I run into every 3-6 months, and it makes me insane every time it happens.. basically, the problem is, I get test failures that say: expected: String:1988-06-18T01:23:45.678+00:00 .. got: String:1988-06-18T08:23:45.678Z ... Where I am comparing two dates that have had .iso8601(3) called on them.
<patrick99e99>
I don't understand why sometimes Z is there, and other times +00:00 is there
<patrick99e99>
does anyone have any idea about why this happens and how to make it stop forever?
<patrick99e99>
omg............. nevermind so sorry.. I thought the times were the same, but I see the problem!
sonOfRa has quit [Quit: Bye!]
<flips>
For saving small amounts of data in an plaintext based format, just go with yaml? Or consider other options? (xml, json, haml or something?)
govg has quit [Ping timeout: 260 seconds]
muelleme_ has quit [Ping timeout: 260 seconds]
<flips>
s/ an / a /
govg has joined #ruby
andrewhl has joined #ruby
andrewhl has quit [Remote host closed the connection]
Rodya_ has quit [Ping timeout: 258 seconds]
andrewhl has joined #ruby
ghornet has quit [Ping timeout: 252 seconds]
sonOfRa has joined #ruby
govg has quit [Client Quit]
jdm has joined #ruby
JeanCarloMachado has joined #ruby
blaisebool has joined #ruby
<blaisebool>
hello, I'm new in ruby, I have this code : OPTIONS_DEFAULT = { flags: [], date: nil } and Rubocop complains "Freeze mutable objects assigned to constants [style/MutableConstan]"
<Jayson_Virissimo>
Now, if I tried to OPTIONS_DEFAULT[:flags] << flag, it would throw an error.
cagomez has quit [Remote host closed the connection]
<blaisebool>
but I need to change value later, I don't want to freeze them
cdg has quit [Remote host closed the connection]
bdonnahue has quit [Ping timeout: 258 seconds]
cagomez has joined #ruby
<elomatreb>
Then you probably shouldn't assign it to a constant (all uppercase variable), since that implies that it won't be changed
<blaisebool>
mmmm I see
<Jayson_Virissimo>
You know what they say about Ruby: constants aren't, variables don't.
binaryplease has joined #ruby
<blaisebool>
Jayson_Virissimo what it means ?
<Jayson_Virissimo>
You can change a constant.
woodruffw has quit [Ping timeout: 245 seconds]
<blaisebool>
I just put it in lower case
<elomatreb>
Constants aren't very strictly enforced, even if you reassign it it only warns you, it doesn't stop you
milardovich has quit [Ping timeout: 258 seconds]
<blaisebool>
yes , I noticed that.
<blaisebool>
very weird. In C language constant won't change at all
<blaisebool>
now I got it
<blaisebool>
thanks dude
<blaisebool>
A rapid and effective response. I really appreciate it
<blaisebool>
:-)
govg has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
SeepingN_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
yurikoles_ has quit [Remote host closed the connection]
woodruffw has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Changing host]
SeepingN has joined #ruby
synthroid has quit []
millerti has joined #ruby
mooser has quit [Remote host closed the connection]
chichou has joined #ruby
maattdd has joined #ruby
jdm has joined #ruby
b3l914n_ has joined #ruby
andrewhl has quit []
pupsicle has quit [Quit: pupsicle]
gusrub has quit [Remote host closed the connection]
maattdd has quit [Ping timeout: 258 seconds]
rvaiya has joined #ruby
cagomez has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
gusrub has joined #ruby
fusta has quit [Quit: Leaving]
grh has joined #ruby
woodruffw has quit [Quit: And then he took off.]
mephistophocles has quit []
woodruffw has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Changing host]
Cohedrin has quit [Read error: Connection reset by peer]
slima has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<slima>
Hello, How setup timeout in this gem? https://github.com/abates/ruby_expect/ I do something like: exp = RubyExpect::Expect.spawn("/usr/bin/ssh #{se600login}@#{se600host}", :debug => true, :timeout => 1) but is is doesnt work I think.
Cohedrin has joined #ruby
<slima>
Ah, I see exp.timeout = 10 == 10 secs timeout
<SeepingN>
what, you can't log in within 1 second?
FoX_77 has joined #ruby
<FoX_77>
hi guys
<FoX_77>
so i have a answer to a qustion
<SeepingN>
oh, so do I! "No"
<FoX_77>
rails g controller Pages home about
Nicmavr has joined #ruby
* baweaver
raises eyebrow
elsevero has joined #ruby
<FoX_77>
this was the error Try: gem pristine bindex --version 0.5.0
<FoX_77>
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find nokogiri-1.7.1 in any of the sources (Bundler::GemNotFound)
Nicmavr is now known as Guest82161
<FoX_77>
crazy
<FoX_77>
you have to rbenv rehash
elsevero has quit [Client Quit]
<SeepingN>
nokogiri always seems to be a pain. why is it so "special"?
hutch34_ has quit [Ping timeout: 240 seconds]
<FoX_77>
i guess it thinks you dont have a bundle or it will always say error 2 hours later .... rbenv rehash worked
Guest3228 has quit [Read error: Connection reset by peer]
pifon has joined #ruby
<FoX_77>
so yea
<FoX_77>
:-)
nemish has quit [Quit: nemish]
electrostat has quit [Quit: uwotm8]
electrostat has joined #ruby
impermanence has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
grh has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
jhack has joined #ruby
Talok has joined #ruby
<Talok>
hi everyone
chichou has quit [Ping timeout: 260 seconds]
outreach_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
polishdub has quit [Quit: Leaving]
Talok has left #ruby [#ruby]
toretore has quit [Ping timeout: 268 seconds]
Rodya_ has quit [Ping timeout: 258 seconds]
outreachdan has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 258 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
JeanCarloMachado has quit [Ping timeout: 258 seconds]
enterprisey has quit [Remote host closed the connection]
mooser has joined #ruby
esObe has quit [Remote host closed the connection]
esObe has joined #ruby
mazeinmaze_ has joined #ruby
maattdd has joined #ruby
jane_booty_doe has joined #ruby
Slinky_Pete has joined #ruby
bdonnahue has joined #ruby
marr has quit [Ping timeout: 260 seconds]
maattdd has quit [Ping timeout: 240 seconds]
claudevandort has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jayson_Virissimo has quit []
FoX_77 has quit [Quit: Leaving...]
LastWhisper____ has quit [Ping timeout: 258 seconds]
Slinky_Pete is now known as cgibsonmm
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
patarr has joined #ruby
<cgibsonmm>
I have a question about a feature test. line in question= "expect(page.current_path).to eq(post_path(post))" rspec is returning undefined local variable or method `post' for #<RSpec::ExampleGroups::CanViewIndividulPosts:0x007ffb137468a8
aglorei has joined #ruby
<baweaver>
well where is post defined?
<baweaver>
is there an @post perhaps?
bkxd has quit [Ping timeout: 252 seconds]
<cgibsonmm>
I have it defined in my controller, i am going from index to show page, and both are defined in the controller
<baweaver>
I'm going to venture a guess that's not correct - "undefined local variable or method `post'"
aglorei has quit [Client Quit]
<cgibsonmm>
When i run the server everything works lol