havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.3, 2.4.5, 2.3.8, 2.6.0-rc1: 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!
ur5us has joined #ruby
weaksauce has joined #ruby
stooj has quit [Ping timeout: 250 seconds]
BTRE has joined #ruby
dinfuehr has quit [Ping timeout: 268 seconds]
dinfuehr_ has joined #ruby
cnsvc_ has quit [Ping timeout: 256 seconds]
awkwords has joined #ruby
ElFerna has quit [Ping timeout: 268 seconds]
<Radar> Ookma-Kyi: imgur.com too please.
<Radar> tinypic has lots of ads / cruft
<Ookma-Kyi> I'll try when i can. I'm beta testing a cloud platform and their console doesn't allow me to copy/paste :(
cnsvc_ has joined #ruby
<Radar> Maybe time to not do that
mikecmpbll has quit [Quit: inabit. zz.]
orbyt_ has joined #ruby
ElFerna has joined #ruby
stooj has joined #ruby
ElFerna has quit [Client Quit]
gix has quit [Ping timeout: 250 seconds]
stooj_ has joined #ruby
stooj has quit [Ping timeout: 246 seconds]
Xiti has quit [Quit: Xiti]
themsay has quit [Ping timeout: 246 seconds]
cnsvc_ has quit [Ping timeout: 256 seconds]
Xiti has joined #ruby
evdubs has quit [Quit: Leaving]
phaul has quit [Quit: bye]
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
evdubs has joined #ruby
cow[moo] is now known as cow[away]
cow[away] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has joined #ruby
hutch has joined #ruby
Sigfrid has quit [Remote host closed the connection]
dviola has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch has quit [Ping timeout: 268 seconds]
AJA4350 has quit [Quit: AJA4350]
gr33n7007h has joined #ruby
al2o3-cr has quit [Ping timeout: 246 seconds]
millerti has quit [Quit: Textual IRC Client: www.textualapp.com]
Xenosine has joined #ruby
DTZUZO has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eb0t has quit [Quit: WeeChat 2.2]
dmitch has quit [Quit: Textual IRC Client: www.textualapp.com]
serard_ has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
segy has quit [Quit: ZNC - http://znc.in]
krawchyk has quit [Quit: krawchyk]
SeepingN has quit [Ping timeout: 268 seconds]
segy has joined #ruby
cthulchu_ has quit [Ping timeout: 250 seconds]
kapil____ has joined #ruby
cpruitt has quit [Remote host closed the connection]
Autolycus has joined #ruby
DTZUZO has joined #ruby
Autolycus has quit [Client Quit]
chouhoulis has joined #ruby
Puffball has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
Puffball has joined #ruby
cow[moo] has quit [Quit: Textual IRC Client: www.textualapp.com]
cow[moo] has joined #ruby
Xenosine has quit [Ping timeout: 250 seconds]
DTZUZO has quit [Ping timeout: 244 seconds]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidepocket has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackswan has joined #ruby
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
serard_ has quit [Remote host closed the connection]
serard_ has joined #ruby
def_jam has joined #ruby
eblip has quit [Ping timeout: 272 seconds]
darix has quit [Ping timeout: 264 seconds]
hutch has joined #ruby
foxxx0 has quit [Ping timeout: 250 seconds]
AlHafoudh has quit [Ping timeout: 272 seconds]
serard_ has quit [Ping timeout: 250 seconds]
darix has joined #ruby
foxxx0 has joined #ruby
hutch has quit [Ping timeout: 240 seconds]
AlHafoudh has joined #ruby
cpruitt has joined #ruby
bak1an has joined #ruby
bak1an has quit [Client Quit]
cpruitt has quit [Ping timeout: 244 seconds]
marz_d`ghostman has quit [*.net *.split]
gregf_ has quit [*.net *.split]
jhaig has quit [*.net *.split]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crankharder has joined #ruby
cnsvc_ has quit [Ping timeout: 256 seconds]
crankharder has quit [Ping timeout: 250 seconds]
orbyt_ has joined #ruby
_whitelogger has joined #ruby
chouhoulis has quit [Remote host closed the connection]
segy has quit [Quit: ZNC - http://znc.in]
awkwords has quit [Quit: sleepy time]
ur5us has quit [Remote host closed the connection]
cpruitt has joined #ruby
segy has joined #ruby
horst_ has quit [Ping timeout: 250 seconds]
cnsvc_ has joined #ruby
sidepocket_ has joined #ruby
arescorpio has joined #ruby
arescorpio has quit [Max SendQ exceeded]
sidepocket_ has quit [Client Quit]
sidepocket has quit [Ping timeout: 256 seconds]
cpruitt has quit [Ping timeout: 246 seconds]
beef_erikson has quit [Quit: WeeChat 1.9.1]
Puffball has quit [Remote host closed the connection]
ujjain has quit [Ping timeout: 246 seconds]
horst has joined #ruby
braincrash has quit [Quit: bye bye]
shadeslayer has quit [Ping timeout: 272 seconds]
code_zombie has quit [Quit: Leaving]
beef_erikson has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
braincrash has joined #ruby
kloeri has quit [Ping timeout: 600 seconds]
shadeslayer has joined #ruby
ujjain has joined #ruby
kloeri has joined #ruby
darkhanb has joined #ruby
raul782 has joined #ruby
cpruitt has joined #ruby
xall has joined #ruby
raulp has quit [Ping timeout: 272 seconds]
cpruitt has quit [Ping timeout: 250 seconds]
nchambers has joined #ruby
tfitts has joined #ruby
cnsvc_ has quit [Ping timeout: 256 seconds]
raul782 has quit []
arescorpio has quit [Remote host closed the connection]
xall has quit [Ping timeout: 250 seconds]
heyimwill has quit [Ping timeout: 252 seconds]
arescorpio has joined #ruby
heyimwill has joined #ruby
sauvin has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
<beef_erikson> ?rails
<ruby[bot]> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
arescorpio has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
xall has joined #ruby
xall has quit [Client Quit]
cnsvc_ has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
cpruitt has joined #ruby
StarLord__ has quit [Quit: Leaving]
sonofentropy has joined #ruby
cpruitt has quit [Ping timeout: 244 seconds]
Ookma-Kyi has quit [Quit: Quit]
cpruitt has joined #ruby
xall has joined #ruby
cpruitt has quit [Ping timeout: 268 seconds]
paranoicsan has joined #ruby
venmx has joined #ruby
reber has joined #ruby
nchambers has quit [Ping timeout: 240 seconds]
reber has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
tag has quit [Quit: Connection closed for inactivity]
graphene has joined #ruby
paranoicsan has quit [Quit: paranoicsan]
KeyJoo has joined #ruby
roshanavand has joined #ruby
coderphive has quit [Ping timeout: 268 seconds]
coderphive has joined #ruby
profetes has joined #ruby
aupadhye has joined #ruby
za1b1tsu has joined #ruby
maufart__ has joined #ruby
roshanavand has quit [Quit: Gone planting!]
sonofentropy has quit [Quit: sonofentropy]
sonofentropy has joined #ruby
sonofentropy has quit [Client Quit]
Inline has quit [Quit: Leaving]
sonofentropy has joined #ruby
maufart__ has quit [Ping timeout: 250 seconds]
tbuehlmann has joined #ruby
coderphive has quit [Ping timeout: 246 seconds]
coderphive has joined #ruby
maufart__ has joined #ruby
neuraload has joined #ruby
tfitts has quit [Quit: Connection closed for inactivity]
horst has quit [Quit: horst]
coderphive has quit [Remote host closed the connection]
coderphive has joined #ruby
cnsvc_ has quit [Ping timeout: 256 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
akaiiro has quit [Ping timeout: 268 seconds]
horst has joined #ruby
conta has joined #ruby
clemens3 has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
dviola has quit [Quit: WeeChat 2.3]
nickjj has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
clemens3 has quit [Ping timeout: 250 seconds]
ur5us has quit [Remote host closed the connection]
yasserhussain111 has joined #ruby
d^sh has quit [Ping timeout: 244 seconds]
d^sh has joined #ruby
sonofentropy has quit [Quit: sonofentropy]
nchambers has joined #ruby
serard_ has joined #ruby
sonofentropy has joined #ruby
xuyuheng has joined #ruby
mikecmpbll has joined #ruby
lightstalker has quit [Ping timeout: 250 seconds]
xuyuheng has quit [Quit: Quit: My MacBook Pro has gone to sleep. ZZZzzz?]
clemens3 has joined #ruby
PasNox_ is now known as PasNox
xall has quit [Quit: xall]
serard_ has quit [Read error: Connection reset by peer]
vovs03 has joined #ruby
yasserhussain111 has left #ruby [#ruby]
kapil____ has joined #ruby
Freshnuts has quit [Quit: Leaving]
KeyJoo has quit [Ping timeout: 250 seconds]
clemens3 has quit [Ping timeout: 250 seconds]
sonofentropy has quit [Quit: sonofentropy]
phaul has joined #ruby
graphene has quit [Remote host closed the connection]
lightstalker has joined #ruby
graphene has joined #ruby
paranoicsan has joined #ruby
Guest61854 has joined #ruby
profetes_ has joined #ruby
profetes has quit [Ping timeout: 252 seconds]
sonofentropy has joined #ruby
roshanavand has joined #ruby
nicolasb has quit [Quit: ZNC 1.7.1 - https://znc.in]
nicolasb has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
adlerdias has joined #ruby
keden has joined #ruby
sonofentropy has quit [Quit: sonofentropy]
nchambers has quit [Quit: WeeChat 2.2]
pistachio has quit [Quit: WeeChat 2.1]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
ua has quit [Ping timeout: 250 seconds]
venmx has quit [Ping timeout: 250 seconds]
BH23 has joined #ruby
_Joes_ has joined #ruby
ua has joined #ruby
sonofentropy has joined #ruby
ams__ has joined #ruby
conta has quit [Ping timeout: 268 seconds]
lanky_leguan has joined #ruby
Burgestrand has quit [Quit: Closing time!]
Burgestrand has joined #ruby
Xenosine has joined #ruby
blackmesa has joined #ruby
Renich has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Closing time!]
<lanky_leguan> why do I get "warning: character class has duplicated range: /##[a-zA-z]+##/" for https://dpaste.de/WnCi ?
<lanky_leguan> removing the "duplicate" range changes the results
<lanky_leguan> ruby 2.3.3p222
<phaul> [a-zA-Z] ?
aupadhye has quit [Ping timeout: 245 seconds]
<phaul> A-z includes a-z if it follows ascii
<phaul> &>> /A-z/.match?('q')
<rubydoc> # => false (https://carc.in/#/r/5s33)
<lanky_leguan> they are overlapping, and contrary to gut feeling A < a?
<canton7> A comes before a in ascii
keden has quit [Ping timeout: 272 seconds]
<phaul> hm. maybe not. I don't know
<canton7> &>> /[A-z]/.match?('q')
<rubydoc> # => true (https://carc.in/#/r/5s36)
<phaul> pff canton7 good catch :)
<lanky_leguan> thank you
beef_erikson has quit [Quit: WeeChat 1.9.1]
<canton7> &>> /A-z/.match?('[')
nowhere_man has quit [Ping timeout: 252 seconds]
<rubydoc> # => false (https://carc.in/#/r/5s37)
<canton7> &>> /[A-z]/.match?('[')
<rubydoc> # => true (https://carc.in/#/r/5s38)
<canton7> ^ note that A-z also catches a bunch of other characters
<lanky_leguan> my original was to check for '_' too, I just noticed it's inbetween
beef_erikson has joined #ruby
<beef_erikson> #cplusplus.com
<beef_erikson> er lol sorry
<beef_erikson> forgot /join :P
<beef_erikson> really need to set up autojoin on this sometime :P
nicolasb has quit [Ping timeout: 246 seconds]
<lanky_leguan> omfg, the second z was wrong case, I intended it as uppercase, and *read* it as such too, thus the confusion
beef_erikson has quit [Client Quit]
paranoicsan is now known as paranoicsan[Away
lanky_leguan has quit [Quit: pro quo, confusion dispersed]
keden has joined #ruby
p0s1x has joined #ruby
p0s1x has quit [Client Quit]
nchambers has joined #ruby
conta has joined #ruby
aupadhye has joined #ruby
beef_erikson has joined #ruby
profetes_ has quit [Quit: Leaving]
aupadhye_ has joined #ruby
aupadhye has quit [Ping timeout: 250 seconds]
ua has quit [Excess Flood]
ua has joined #ruby
cpruitt has joined #ruby
cpruitt has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
cpruitt has quit [Ping timeout: 250 seconds]
lucasb has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
fredmorcos has joined #ruby
paranoicsan[Away is now known as paranoicsan
Burgestrand has joined #ruby
nchambers has quit [Ping timeout: 250 seconds]
fredmorcos has quit [Remote host closed the connection]
fredmorcos has joined #ruby
fredmorcos has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 252 seconds]
cow[moo] has joined #ruby
brandonkal has quit [Ping timeout: 244 seconds]
AJA4350 has joined #ruby
bak1an has joined #ruby
sonofentropy has left #ruby [#ruby]
dellavg_ has joined #ruby
nickjj has joined #ruby
clemens3 has joined #ruby
ams__ has quit [Quit: Connection closed for inactivity]
cpruitt has joined #ruby
gr33n7007h has quit [Ping timeout: 246 seconds]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
HailTheRobots has joined #ruby
Some-body_ has joined #ruby
cpruitt has quit [Ping timeout: 250 seconds]
nchambers has joined #ruby
DarthGandalf has quit [Ping timeout: 252 seconds]
Some-body_ is now known as DarthGandalf
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest61854 has quit [Ping timeout: 246 seconds]
nchambers has quit [Ping timeout: 240 seconds]
Guest61854 has joined #ruby
keden has quit [Ping timeout: 268 seconds]
keden has joined #ruby
ua has quit [Excess Flood]
ua has joined #ruby
Guest61854 has quit [Ping timeout: 244 seconds]
zapata has quit [Read error: Connection reset by peer]
keden has quit [Ping timeout: 250 seconds]
zapata has joined #ruby
mostlybadfly has joined #ruby
keden has joined #ruby
nowhere_man has joined #ruby
ElFerna has joined #ruby
blackmesa has joined #ruby
vovs03 has quit [Quit: vovs03]
Guest61854 has joined #ruby
crankharder has joined #ruby
blackmesa has quit [Quit: WeeChat 2.3]
conta has quit [Ping timeout: 250 seconds]
conta has joined #ruby
al2o3-cr has joined #ruby
conta has quit [Ping timeout: 245 seconds]
def_jam is now known as eblip
cpruitt has joined #ruby
cpruitt has quit [Ping timeout: 268 seconds]
al2o3-cr has quit [Ping timeout: 246 seconds]
cow[moo] has joined #ruby
cow[moo] has quit [Client Quit]
cpruitt has joined #ruby
al2o3-cr has joined #ruby
ElFerna has quit [Ping timeout: 250 seconds]
aupadhye_ has quit [Remote host closed the connection]
rawrg has quit [Ping timeout: 246 seconds]
cpruitt has quit [Ping timeout: 250 seconds]
marz_d`ghostman has joined #ruby
<marz_d`ghostman> What's the best practice when defining module variables so that I can refer to it in its methods? Am I doing this right? https://gist.github.com/marzdgzmn/c5f855eeb616c5ffff7801b99d91fdd7
conta has joined #ruby
reber has joined #ruby
<Iambchop> &>> module Foo; @foo='42'; p [self, @foo]; def bar; p [self, @foo]; end; end; class Baz; include Foo; end; qux=Baz.new; qux.bar; [Foo.instance_variable_get(:@foo), qux.instance_variable_get(:@foo)]
<rubydoc> # => [Foo, "42"] ...check link for more (https://carc.in/#/r/5s4m)
awkwords has joined #ruby
<Iambchop> marz_d`ghostman: ^ @db in the module definition is not the same as @db in the method definitions; [Foo.instance_variable_get(:@foo), qux.instance_variable_get(:@foo)] => ["42", nil]; note the different "self" in each location
Xenosine has quit [Quit: Leaving]
venmx has joined #ruby
millerti has joined #ruby
SeepingN has joined #ruby
<marz_d`ghostman> Iambchop: Even though @db will only be dealt with by the module methods?
<marz_d`ghostman> Iambchop: If so, can you recommend a good pattern on how to tackle this one.
<marz_d`ghostman> Please disregard my first question, I see that @db will not be reachable from the instance that included the module. :)
polishdub has joined #ruby
blackswan has quit [Quit: Leaving.]
agent_white has joined #ruby
fredmorcos has joined #ruby
krawchyk has joined #ruby
Inline has joined #ruby
nowhere_man has quit [Ping timeout: 268 seconds]
keden has quit [Ping timeout: 272 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
rippa has joined #ruby
keden has joined #ruby
ElFerna has joined #ruby
conta has quit [Ping timeout: 268 seconds]
cd has quit [Quit: cd]
hutch has joined #ruby
prestorium has joined #ruby
ElFerna has quit [Ping timeout: 250 seconds]
neuraload has quit [Quit: This computer has gone to sleep]
BH23 has quit [Ping timeout: 240 seconds]
_Joes_ has quit [Ping timeout: 245 seconds]
krawchyk has quit [Quit: krawchyk]
Burgestrand has quit [Quit: Closing time!]
krawchyk has joined #ruby
conta has joined #ruby
dbz has joined #ruby
krawchyk has quit [Client Quit]
GodFather has quit [Ping timeout: 250 seconds]
maufart__ has quit [Remote host closed the connection]
paranoicsan is now known as paranoicsan[Away
paranoicsan[Away has quit [Quit: paranoicsan[Away]
TomyWork has joined #ruby
Fr4n has quit [Ping timeout: 272 seconds]
ElFerna has joined #ruby
marz_d`ghostman has quit [Quit: Page closed]
<TomyWork> hi, I'm trying to use redis-rb to listen to a pubsub channel. my program crashes with an exception whenever there's a connection loss. I notice there's a with_reconnect method in there, but I can't figure out whether it solves my issue because I don't know if I'm using it correctly
<TomyWork> redis = Redis.new(host: redis_host); redis.with_reconnect do redis.subscribe(channel) do ...
<TomyWork> should I just catch the exception and reconnect or is there a way for the library to do this for me?
paranoicsan has joined #ruby
ElFerna has quit [Client Quit]
ElFerna has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nchambers has joined #ruby
conta has quit [Quit: conta]
Fr4n has joined #ruby
nchambers has quit [Ping timeout: 245 seconds]
fredmorcos has quit [Remote host closed the connection]
clemens3 has quit [Ping timeout: 250 seconds]
blackswan has joined #ruby
krawchyk has joined #ruby
graphene has quit [Remote host closed the connection]
clemens3 has joined #ruby
graphene has joined #ruby
weaksauce has quit [Ping timeout: 272 seconds]
maryo has joined #ruby
darkhanb has joined #ruby
reber has quit [Remote host closed the connection]
Pascal is now known as r3m
ged has quit [Read error: Connection reset by peer]
fran__ has joined #ruby
Fr4n has quit [Ping timeout: 246 seconds]
ged has joined #ruby
lunarkitty7 has quit [Ping timeout: 268 seconds]
raulp has joined #ruby
cthulchu has joined #ruby
dbz has quit [Remote host closed the connection]
syndikate has quit [Ping timeout: 252 seconds]
syndikate has joined #ruby
ElFerna has quit [Ping timeout: 250 seconds]
Guest61854 has quit [Ping timeout: 246 seconds]
Guest61854 has joined #ruby
mikecmpb_ has quit [Quit: inabit. zz.]
Guest61854 has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
paranoicsan has quit [Quit: paranoicsan]
ur5us has quit [Ping timeout: 250 seconds]
lunarkitty7 has joined #ruby
<cthulchu> hey folks, I have a stupid question
<cthulchu> I want to be able to require a file where I have a method described
keden has quit [Quit: WeeChat 2.3]
<cthulchu> but I want to call this method without a need to reference it's class
<cthulchu> I guess....
<cthulchu> for that I'd have to define it as a global?
<cthulchu> in that file
<cthulchu> crap
<cthulchu> I just don't want to use the class...
<cthulchu> it's gonna be awkward and unneded
prestorium has quit [Ping timeout: 250 seconds]
TomyWork has quit [Ping timeout: 246 seconds]
ogres has joined #ruby
<cthulchu> oh! I know!
<cthulchu> Module Methods!
<cthulchu> right folks?
<cthulchu> still have to reference the method name thoufh
eckhardt has joined #ruby
<cthulchu> well I think I can do the same
<cthulchu> in classes: create class (static) methods instead of instance ones
<cthulchu> yeah, there are a few awkward methods to make static methods, I find def self.putz the most elegant
blackswan has quit [Ping timeout: 250 seconds]
HailTheRobots has quit [Read error: Connection reset by peer]
maryo has quit [Ping timeout: 246 seconds]
HailTheRobots has joined #ruby
Puffball has joined #ruby
HailTheRobots has quit [Read error: Connection reset by peer]
weaksauce has joined #ruby
maryo has joined #ruby
blackswan has joined #ruby
maryo has quit [Ping timeout: 250 seconds]
hutch has quit [Ping timeout: 250 seconds]
hutch has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
sauvin has quit [Remote host closed the connection]
code_zombie has joined #ruby
dbz has joined #ruby
venmx has joined #ruby
dbz has quit [Remote host closed the connection]
<phaul> uhm
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
mikecmpbll has joined #ruby
dellavg_ has quit [Ping timeout: 250 seconds]
lxsameer has joined #ruby
venmx has quit [Ping timeout: 246 seconds]
adlerdias has quit [Quit: adlerdias]
awkwords has quit [Quit: sleepy time]
Guest61854 has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
Aqo has joined #ruby
andrewray has joined #ruby
<andrewray> I'm trying to put a nested gem in my project (subfolder with a gemspec), and i'm trying to run specs from the root of the project
<andrewray> when i run the specs in the gem folder from root, rspec starts, but it complains when I try to provide a config option that comes from another rspec plugin gem
<andrewray> and i'm not sure why it's not loading the rspec plugin when I run rspec from the root
hutch has quit [Ping timeout: 250 seconds]
<andrewray> it's loading the .rspec file from the root, and executing the root's gemfile
mostlybadfly has quit [Quit: Connection closed for inactivity]
hutch has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
Hobbyboy has joined #ruby
Hobbyboy|BNC has quit [Read error: Connection reset by peer]
CrazyEddy has quit [Remote host closed the connection]
carbone5 has joined #ruby
conta has joined #ruby
desperek has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
Guest61854 has quit [Ping timeout: 250 seconds]
Guest61854 has joined #ruby
dviola has joined #ruby
Guest61854 has quit [Ping timeout: 250 seconds]
reber has joined #ruby
blackswan has quit [Ping timeout: 245 seconds]
carbone5 has quit [Ping timeout: 240 seconds]
andrewray has quit [Ping timeout: 256 seconds]
cow[moo] has joined #ruby
thither has joined #ruby
awkwords has joined #ruby
eckhardt has joined #ruby
ur5us has joined #ruby
andrewray has joined #ruby
venmx has joined #ruby
thither has quit [Ping timeout: 268 seconds]
SeepingN has joined #ruby
Guest61854 has joined #ruby
<andrewray> test
<havenwood> andrewray: #!> ArgumentError: wrong number of arguments (given 0, expected 2..3)
<cthulchu> I have a weird case. would appreciate help
<havenwood> cthulchu: What is it?
<cthulchu> LParser.log_processor(log: comment, platform: @platofrm) at this point I'm sure the @platform is set and has value. I'm printing it
<cthulchu> but inside log_processor, It becomes ""
<havenwood> cthulchu: @platofrm?
donofrio has quit [Remote host closed the connection]
<havenwood> platonic forms, I presume? :P
<cthulchu> LParser.log_processor(log: comment, platform: @platofrm)
<havenwood> cthulchu: It's a typo...
<cthulchu> I checked!
<cthulchu> do you see a typo?
<cthulchu> omg
<havenwood> cthulchu: @platofrm
<cthulchu> omfg
<cthulchu> thanks
<havenwood> haha
<cthulchu> hell man
ryandv has joined #ruby
<ryandv> hello - does there exist a parsing library for ruby with native extensions?
conta has quit [Quit: conta]
<havenwood> ryandv: You're looking for a PEG-based parser library that has C-exts?
<havenwood> ryandv: Why C-exts? Speed?
<havenwood> ryandv: Or you want a Ruby parser?
<ryandv> havenwood: I'm looking for a fast Ruby parser that can accept source text and output an AST
<havenwood> ryandv: Ruby ships with RubyVM::InstructionSequence and Ripper.
awkwords has quit [Quit: sleepy time]
<ryandv> havenwood: interesting, I'll check those out. thanks!
<havenwood> &>> require 'ripper'; Ripper.sexp 'puts :ryandv'
<rubydoc> # => [:program, [[:command, [:@ident, "puts", [1, 0]], [:args_add_block, [[:symbol_literal, [:symbol, [:@ ...check link for more (https://carc.in/#/r/5s9v)
<havenwood> &>> RubyVM::InstructionSequence.compile('puts :ryadv').to_a.last
<rubydoc> # => [1, :RUBY_EVENT_LINE, [:putself], [:putobject, :ryadv], [:opt_send_without_block, {:mid=>:puts, :fla ...check link for more (https://carc.in/#/r/5s9w)
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<havenwood> ryandv: no prob, you're welcome!
<andrewray> I have a root level gems/ folder which contains gem source codes, including gemname.gemspec files
<andrewray> when I try to run specs inside those folders, from the root level of the project (with rspec) - rspec executes, but an rspec dependency defined in the *root* level gemfile does not load
serard has joined #ruby
<andrewray> and the rspec config fails to fully execute, blocking the test run. Does executing a spec (with bundle exec rspec gems/project/spec/my_spec.rb) from outside that folder, do something with gem context?
<andrewray> the root level Gemfile is getting executed, including the `gem 'rspec-dependnecy'` line
<andrewray> does having the child folder Gemfile do something different?
<havenwood> andrewray: Typically a Gemfile in a gem will have a `gemspec` line, so a `bundle` will install deps from the gemspec. But the gemspec will not install deps from a Gemfile.
<cthulchu> what's AST?
<havenwood> andrewray: To resolve and install deps from the Gemfile, either `gem install -g /path/to/Gemfile` or use Bundler.
<havenwood> cthulchu: Abstract Syntax Tree
<cthulchu> wow
<cthulchu> is it a data structure?
<cthulchu> ah
<cthulchu> I know what it is. Just forgot the name
<havenwood> cthulchu: Languages often have an intermediary representation (IR) that can be something like an abstract syntax tree (AST) or a register transfer language (RTL) or a sea of nodes (OMGWTFBBQ).
<cthulchu> ahahahahah
<havenwood> cthulchu: TruffleRuby uses a sea of nodes. There's actually a fork of Ruby that Makarov is working on that changes the YARV AST to instead be RTL.
<andrewray> havenwood: if my top level project has a Gemfile (but no gemspec) - can I execute code in a subfolder that has subfolder/Gemfile and subfolder/project.gemspec ?
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
ryandv has quit [Ping timeout: 240 seconds]
<havenwood> andrewray: You can have Gemfile deps to local gems if you use the `path:` keyword for the `gem` directive. Like: gem 'rails', path: '/path/to/gemspec/dir'
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> andrewray: Normally a gem's Gemfile is limited to developer niceties for folk working on the gem.
<havenwood> The gem's actual deps should be in the gemspec.
<andrewray> havenwood: that's what i'm doing in my root Gemfile, i'm calling gem 'myproject', path: './myproject' and that part seems to be working
<havenwood> andrewray: same issue with the full path instead of relative path?
<andrewray> havenwood: i'm using the full path for the path. my root level Gemfile has 'rspec' and 'rspec-retry', and when it gets into the spec itself in the nested folder, it tries to do Rspec.configure |c| c.retry_key = true
<andrewray> and fails because the retry_key provided by rspec-retry doesn't seem to be getting loaded
nopolitica has joined #ruby
nopolitica has quit [Client Quit]
Guest61854 has quit [Ping timeout: 250 seconds]
venmx has quit [Ping timeout: 250 seconds]
<andrewray> hmmm, when it executes the child folder's project.gemspec file, it doesn't have Rspec in there, at least I can't run rspec.configure
<andrewray> I'm trying to follow this pattern https://medium.com/@dan_manges/the-modular-monolith-rails-architecture-fb1023826fc4 but don't understand how they have the tests set up
bak1an has joined #ruby
s3nd1v0g1us has joined #ruby
Guest61854 has joined #ruby
Guest61854 has quit [Ping timeout: 250 seconds]
polishdub has quit [Remote host closed the connection]
reber has quit [Remote host closed the connection]
<andrewray> ah, my sub gem spec run isn't loading rails's boot.rb
<andrewray> which does some magic garbo
jcalla has quit [Remote host closed the connection]
SeepingN has quit [Ping timeout: 250 seconds]
Ookma-Kyi has joined #ruby
SeepingN has joined #ruby
graphene has quit [Remote host closed the connection]
fran__ has quit [Read error: Connection reset by peer]
graphene has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<andrewray> oh, maybe it's not boot.rb
Puffball has quit [Remote host closed the connection]
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tag has joined #ruby
bambanx has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
<zenspider> what's the cheapest checksum function we have? I'd use #hash but it is seeded on ever run now and blows out caching.
crankharder has quit [Ping timeout: 250 seconds]
agent_white has quit [Quit: later]
krawchyk has quit [Quit: krawchyk]
desperek has quit [Quit: xoxo]
serard has quit [Ping timeout: 252 seconds]
blackswan has joined #ruby
nowhere_man has joined #ruby
<Aqo> have you tried fnv1a
<SeepingN> a large farva?
thunderbirdtr has quit [Quit: ZNC 1.7.1 - https://znc.in]
brandonkal has joined #ruby
bambanx has quit [Read error: Connection reset by peer]
SCHAPiE has quit [Quit: ZNC - https://znc.in]
thunderbirdtr has joined #ruby
M4xP0w3r has joined #ruby
SCHAPiE has joined #ruby
Puffball has joined #ruby
davidw has joined #ruby
<davidw> ["a", "b", "c"].map { |x| x == "a" ? ["a", "a'"] : x }.flatten - is there a more elegant (no flatten) way to do that?
<havenwood> davidw: #flat_map
<havenwood> davidw: it's like a `map` followed by `flatten(1)`
<davidw> ah, perfect, thanks havenwood
hutch has quit [Ping timeout: 250 seconds]
Puffball has quit [Remote host closed the connection]
<havenwood> zenspider: checksumming strings?
Puffball has joined #ruby
code_zombie has quit [Quit: Leaving]
clemens3 has quit [Ping timeout: 246 seconds]
Ookma-Kyi has quit [Quit: Quit]
<havenwood> zenspider: It's kinda a shame that the SipHash implementation used for Hash isn't exposed via Digest.
<havenwood> zenspider: From stdlib I'd say Digest::SHA1.
GodFather has joined #ruby
M4xP0w3r has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby