havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.1, 2.5.3, 2.4.5: 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!
SeepingN_ is now known as SeepingN
cisco has joined #ruby
wilbert has quit [Ping timeout: 245 seconds]
cisco has quit [Quit: bye]
armyriad has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
tdy2 has quit [Read error: Connection reset by peer]
tdy2 has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
mangold has joined #ruby
renich has joined #ruby
jobewan has quit [Quit: jobewan]
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
axsuul has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4350 has joined #ruby
crankharder has quit [Ping timeout: 245 seconds]
AJA4350 has quit [Remote host closed the connection]
AJA4350 has joined #ruby
jmcgnh has quit [Excess Flood]
jmcgnh has joined #ruby
r3m has quit [Quit: WeeChat 2.5-dev]
r3m has joined #ruby
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
AJA4350 has quit [Ping timeout: 246 seconds]
sylario has quit [Quit: Connection closed for inactivity]
AJA4350 has joined #ruby
ramfjord has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
wilbert has joined #ruby
doitliao has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
tdy2 has quit [Ping timeout: 246 seconds]
renich_ has joined #ruby
renich has quit [Ping timeout: 268 seconds]
agent_white has quit [Quit: brb]
agent_white has joined #ruby
spacesuitdiver has joined #ruby
gix has quit [Ping timeout: 246 seconds]
bruul has joined #ruby
SeepingN has quit [Ping timeout: 245 seconds]
eb0t_ has quit [Read error: Connection reset by peer]
CrazyEddy has quit [Ping timeout: 255 seconds]
eb0t_ has joined #ruby
wilbert has quit [Ping timeout: 245 seconds]
T3RM1N41 has joined #ruby
T3RM1N41 has quit [Read error: Connection reset by peer]
Xiti has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
SuperL4g is now known as SuperLag
blackmesa has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
Xiti has joined #ruby
doitliao has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 258 seconds]
SuperLag has quit [Quit: reboot]
ramfjord has quit [Ping timeout: 246 seconds]
AJA4350 has quit [Quit: AJA4350]
CrazyEddy has joined #ruby
darix has quit [Quit: may the packets be with you...]
darix has joined #ruby
orbyt_ has joined #ruby
Swyper has joined #ruby
Swyper has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
t0xik has quit [Quit: Connection closed for inactivity]
ramfjord has quit [Ping timeout: 255 seconds]
SeepingN has joined #ruby
wolfshappen has quit [Ping timeout: 268 seconds]
wolfshappen_ has joined #ruby
braincrash has quit [Quit: bye bye]
bruul has quit [Ping timeout: 250 seconds]
bruul has joined #ruby
braincrash has joined #ruby
tdy2 has joined #ruby
agent_white has quit [Quit: leaving]
dellavg__ has joined #ruby
salasrod has quit [Remote host closed the connection]
salasrod has joined #ruby
cnsvc_ has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
hagebake has joined #ruby
t0xik has joined #ruby
tdy2 has quit [Ping timeout: 255 seconds]
v01d4lph4 has joined #ruby
v01d4lph4 has quit [Remote host closed the connection]
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has joined #ruby
reber has joined #ruby
wilbert has joined #ruby
dellavg__ has quit [Ping timeout: 250 seconds]
SuperLag has joined #ruby
tdy2 has joined #ruby
ByronJohnson has quit [Ping timeout: 250 seconds]
rippa has joined #ruby
mozzarella has quit [Ping timeout: 246 seconds]
shakes has joined #ruby
conta has joined #ruby
mozzarella has joined #ruby
xrexeon has joined #ruby
xrexeon has quit [Remote host closed the connection]
gix has quit [Ping timeout: 255 seconds]
marz_d`ghostman has quit [Ping timeout: 256 seconds]
bruul has quit [Ping timeout: 255 seconds]
ged has quit [Read error: Connection reset by peer]
mahlon has quit [Read error: Connection reset by peer]
ged has joined #ruby
ged has quit [Ping timeout: 255 seconds]
aupadhye has joined #ruby
ByronJohnson has joined #ruby
reber has quit [Remote host closed the connection]
tdy2 has quit [Ping timeout: 255 seconds]
ged has joined #ruby
ByronJohnson has quit [Ping timeout: 246 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ByronJohnson has joined #ruby
tdy2 has joined #ruby
sagax has quit [Ping timeout: 245 seconds]
_whitelogger has joined #ruby
ramfjord has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
ramfjord has quit [Ping timeout: 250 seconds]
sagax has joined #ruby
nowhere_man has quit [Ping timeout: 258 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
xrexeon has joined #ruby
fluxAeon has quit [Ping timeout: 245 seconds]
Dbugger has joined #ruby
clemens3 has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.4]
t0xik has quit [Quit: Connection closed for inactivity]
aufi has joined #ruby
lxsameer has joined #ruby
alem0lars has joined #ruby
aufi_ has joined #ruby
blackmesa has joined #ruby
aufi has quit [Ping timeout: 250 seconds]
mangold has joined #ruby
xrexeon has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.4]
al2o3-cr has joined #ruby
blaguvest has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
alem0lars has quit [Ping timeout: 255 seconds]
maufart__ has joined #ruby
aufi_ has quit [Ping timeout: 246 seconds]
cd has quit [Quit: cd]
wilbert has quit [Ping timeout: 246 seconds]
Pisuke has joined #ruby
MyMind has quit [Ping timeout: 245 seconds]
Tuor has joined #ruby
ericboehs1 has joined #ruby
flips has quit [Quit: bbl ...]
flips_ has joined #ruby
akem has quit [Remote host closed the connection]
helpa-bot has joined #ruby
helpa has quit [Read error: Connection reset by peer]
akem has joined #ruby
flips_ is now known as flips
nchambers has joined #ruby
helpa has joined #ruby
irdr_ has joined #ruby
th1nkpad has joined #ruby
leftylin1 has joined #ruby
rafadc has quit [Quit: ZNC 1.7.1 - https://znc.in]
uplime has quit [Ping timeout: 245 seconds]
thinkpad has quit [Ping timeout: 245 seconds]
Nicmavr has quit [Ping timeout: 245 seconds]
helpa-bot has quit [Remote host closed the connection]
irdr has quit [Remote host closed the connection]
leftylink has quit [Ping timeout: 245 seconds]
ghormoon has quit [Ping timeout: 245 seconds]
Bish has quit [Ping timeout: 245 seconds]
ericboehs has quit [Ping timeout: 245 seconds]
nchambers is now known as uplime
th1nkpad is now known as thinkpad
lxsameer has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
ghormoon has joined #ruby
m27frogy has joined #ruby
adgtl has quit [Ping timeout: 255 seconds]
dinfuehr has quit [Ping timeout: 255 seconds]
mangold has quit [Ping timeout: 245 seconds]
<al2o3-cr> &>> 26 ** 8 #### so a 26 character keyspace repeated permutations of 8 ####
<rubydoc> # => 208827064576 (https://carc.in/#/r/6dbm)
ellcs has joined #ruby
tdy2 has quit [Read error: Connection reset by peer]
<al2o3-cr> hmmm, wonder how long this will take to find my PSK lol ;)
badeball_ has joined #ruby
dinfuehr has joined #ruby
badeball has quit [Ping timeout: 245 seconds]
Zarthus has quit [Ping timeout: 245 seconds]
spiette has quit [Ping timeout: 245 seconds]
jmosco has quit [Ping timeout: 245 seconds]
AKPWD has quit [Ping timeout: 245 seconds]
m27frogy_ has quit [Ping timeout: 245 seconds]
cats has quit [Ping timeout: 245 seconds]
obiwahn has quit [Ping timeout: 245 seconds]
ricer2 has quit [Ping timeout: 245 seconds]
Rudd0 has quit [Ping timeout: 245 seconds]
tdy2 has joined #ruby
APK has joined #ruby
harmaahylje has quit [Ping timeout: 245 seconds]
druonysus has quit [Ping timeout: 245 seconds]
adgtl has joined #ruby
Zarthus has joined #ruby
harmaahylje has joined #ruby
cats has joined #ruby
ricer2 has joined #ruby
Rudd0 has joined #ruby
obiwahn has joined #ruby
spiette has joined #ruby
sagax has quit [Read error: Connection reset by peer]
anothertorusr has quit [Ping timeout: 245 seconds]
Nicmavr has quit [Quit: ZNC 1.7.0 - https://znc.in]
blackmesa has quit [Ping timeout: 250 seconds]
tdy2 has quit [Ping timeout: 245 seconds]
lxsameer has joined #ruby
blackmesa has joined #ruby
crankharder has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.4]
wolfshappen_ has quit [Ping timeout: 255 seconds]
dhollin3 has joined #ruby
wolfshappen has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
dhollinger has quit [Ping timeout: 250 seconds]
Ai9zO5AP has joined #ruby
al2o3-cr has joined #ruby
volkov has joined #ruby
tdy2 has joined #ruby
status402 has joined #ruby
cnsvc_ has quit [Ping timeout: 256 seconds]
bruce_lee has joined #ruby
akem has quit [Ping timeout: 255 seconds]
Inline has quit [Read error: Connection reset by peer]
Inline has joined #ruby
conta has quit [Ping timeout: 246 seconds]
Inline has quit [Client Quit]
cisco has joined #ruby
akem has joined #ruby
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 244 seconds]
d^sh_ has joined #ruby
mangold has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
sagax has joined #ruby
blackmesa has joined #ruby
TvL2386 has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 264 seconds]
abrausch has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
conta has joined #ruby
mangold has joined #ruby
abrausch has quit []
ramfjord has joined #ruby
cisco has quit [Ping timeout: 250 seconds]
ramfjord has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
akem has quit [Quit: Leaving]
akem has joined #ruby
volkov has quit [Quit: volkov]
jmosco has joined #ruby
Dbugger has quit [Ping timeout: 252 seconds]
donofrio_ has joined #ruby
shakes_ has joined #ruby
Azure|dc has joined #ruby
akem__ has joined #ruby
tdy3 has joined #ruby
mikecmpbll has joined #ruby
clemens3_ has joined #ruby
Xeago_ has joined #ruby
mozzarel1 has joined #ruby
MuffinPimp_ has joined #ruby
stooj_ has joined #ruby
duckpupp- has joined #ruby
AndroidKK has joined #ruby
tdy4 has joined #ruby
wolfshappen_ has joined #ruby
arooni has joined #ruby
fluxAeon has joined #ruby
mikecmpb_ has quit [Ping timeout: 246 seconds]
akosednar has quit [Ping timeout: 246 seconds]
stooj has quit [Ping timeout: 246 seconds]
manakanapa1 has quit [Ping timeout: 246 seconds]
arooni_team_b has quit [Ping timeout: 246 seconds]
crankharder has quit [Ping timeout: 246 seconds]
bga57 has quit [Ping timeout: 246 seconds]
mozzarella has quit [Ping timeout: 246 seconds]
foxxx0 has quit [Ping timeout: 246 seconds]
c-c has quit [Ping timeout: 246 seconds]
linuus has quit [Ping timeout: 246 seconds]
rprimus has quit [Ping timeout: 246 seconds]
MuffinPimp has quit [Ping timeout: 246 seconds]
b6b has quit [Ping timeout: 246 seconds]
status402 has quit [Ping timeout: 246 seconds]
tdy2 has quit [Ping timeout: 246 seconds]
eb0t_ has quit [Ping timeout: 246 seconds]
jcalla has quit [Ping timeout: 246 seconds]
cgfbee has quit [Ping timeout: 246 seconds]
ua has quit [Ping timeout: 246 seconds]
dante has quit [Ping timeout: 246 seconds]
Tempesta has quit [Ping timeout: 246 seconds]
Azure has quit [Ping timeout: 246 seconds]
MuffinPimp_ is now known as MuffinPimp
mozzarel1 is now known as mozzarella
sagax_ has joined #ruby
duckpuppy has quit [Ping timeout: 255 seconds]
CrazyEddy has quit [Ping timeout: 255 seconds]
adgtl has quit [Ping timeout: 255 seconds]
ellcs has quit [Ping timeout: 255 seconds]
AndroidKitKat has quit [Ping timeout: 255 seconds]
ujjain has quit [Ping timeout: 255 seconds]
Xeago has quit [Ping timeout: 255 seconds]
rubydoc has quit [Ping timeout: 255 seconds]
wolfshappen has quit [Ping timeout: 255 seconds]
sagax has quit [Ping timeout: 255 seconds]
clemens3 has quit [Ping timeout: 255 seconds]
shakes has quit [Ping timeout: 255 seconds]
rippa has quit [Ping timeout: 255 seconds]
ryouba has quit [Ping timeout: 255 seconds]
fribmendes has quit [Ping timeout: 255 seconds]
lightstalker has quit [Ping timeout: 255 seconds]
akem has quit [Ping timeout: 255 seconds]
ricer2 has quit [Ping timeout: 255 seconds]
badeball_ has quit [Ping timeout: 255 seconds]
ByronJohnson has quit [Ping timeout: 255 seconds]
renich_ has quit [Ping timeout: 255 seconds]
noboruma has quit [Ping timeout: 255 seconds]
donofrio has quit [Ping timeout: 255 seconds]
Emmanuel_Chanel has quit [Ping timeout: 255 seconds]
noobineer has quit [Ping timeout: 255 seconds]
csaunders has quit [Ping timeout: 255 seconds]
Xeago_ is now known as Xeago
renich has joined #ruby
bairyn has joined #ruby
csaunders has joined #ruby
sagax_ is now known as sagax
lghtstkr has joined #ruby
badeball has joined #ruby
b6b has joined #ruby
adgtl has joined #ruby
fribmendes has joined #ruby
linuus has joined #ruby
Emmanuel_Chanel has joined #ruby
manakanapa1 has joined #ruby
dante has joined #ruby
ua has joined #ruby
cgfbee has joined #ruby
tdy3 has quit [Ping timeout: 268 seconds]
crankharder has joined #ruby
ellcs has joined #ruby
tdy4 has quit [Read error: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac]
foxxx0 has joined #ruby
akosednar has joined #ruby
ujjain has joined #ruby
noobineer has joined #ruby
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
mikecmpbll has quit [Ping timeout: 244 seconds]
lucasb has joined #ruby
Cthulu201 has joined #ruby
nowhere_man has joined #ruby
mikecmpbll has joined #ruby
apparition has joined #ruby
dhollin3 is now known as dhollinger
xrexeon has joined #ruby
Onwarion has joined #ruby
ropeney has quit [Quit: ZNC 1.6.5+deb1 - http://znc.in]
ropeney has joined #ruby
ropeney has quit [Client Quit]
ropeney has joined #ruby
AJA4350 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
nowhere_man has quit [Ping timeout: 250 seconds]
Inline has joined #ruby
ctp has joined #ruby
<ctp> hi folks. I struggle a little bit with a sort of i guess easy to solve issue. i have the following array:
<ctp> ["{ \"type\": \"INFO_INTEGRITYCHECK_BEGIN\", \"data\": {}}\n", "{ \"type\": \"INFO_INTEGRITYCHECK_FINISHED\", \"data\": {\"conflicting\": 0}}\n\n"]
<ctp> and need to transform it into an array of hashmaps
<ctp> the other thing is to remove all the newlines
<ctp> which i hoped to get rid of with something like foo.each { |line| line.gsub(/\n/ !~ line) }
<tbuehlmann> are the array elements supposed to be json?
<ctp> yes, they are. the thing is, later i want to filter e.g. for specific type etc
<ctp> hm. you mean JSON.parse maybe?
<tbuehlmann> have you tried this? array.map { |element| JSON.parse(element) }
blackmesa has joined #ruby
<ctp> tbuehlmann: you're my hero :) i just tried to parse the entire thing in one :)
laaron has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
<tbuehlmann> great. why isn't the whole thing json in the first place?
Tuor has quit [Ping timeout: 245 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
aupadhye has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
shakes_ has quit [Remote host closed the connection]
prestorium has joined #ruby
<ctp> tbuehlmann: it goes through a series of transformations incl. multiline fields etc.but i managed it to be as json'ish as possible :D
blackmesa has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
apparition has quit [Quit: Bye]
ramfjord has quit [Ping timeout: 255 seconds]
conta has quit [Ping timeout: 250 seconds]
mangold has joined #ruby
Rapture has joined #ruby
akem__ has quit [Read error: Connection reset by peer]
akem__ has joined #ruby
bruul has joined #ruby
crankharder has quit [Ping timeout: 272 seconds]
minimal_life has joined #ruby
spacesuitdiver has joined #ruby
conta has joined #ruby
donofrio_ has quit [Quit: Leaving]
donofrio_ has joined #ruby
donofrio_ has quit [Remote host closed the connection]
donofrio_ has joined #ruby
conta has quit [Ping timeout: 255 seconds]
minimal_life has quit [Quit: I am functioning within established parameters.]
skryking has joined #ruby
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wrkrcoop has joined #ruby
crankharder has joined #ruby
<wrkrcoop> what tools do you use that you wouldn’t want to dev without?
DTZUZO has joined #ruby
<mozzarella> my text editor
aupadhye has joined #ruby
dviola has joined #ruby
maufart__ has quit [Ping timeout: 245 seconds]
wolfshappen_ has quit [Ping timeout: 268 seconds]
wolfshappen has joined #ruby
v01d4lph4 has joined #ruby
hiroaki_ has joined #ruby
scapegoatee has joined #ruby
<scapegoatee> hi
<scapegoatee> Anyone alive?
<tbuehlmann> probably
<scapegoatee> Hi, it is my first day. I was expecting heavy ruby discussions :p
<scapegoatee> Overexcited I guess.
tdy4 has joined #ruby
<Net> scapegoatee: hi :)
orbyt_ has joined #ruby
<scapegoatee> Hey @Net
<scapegoatee> #Net
<scapegoatee> I'm glad Ifound this place
<scapegoatee> love you all, if you exist :p
<havenwood> scapegoatee: we exist
prestorium has quit [Ping timeout: 240 seconds]
<scapegoatee> hehe :) I will eventually be active here, hopefully.
v01d4lph4 has quit [Ping timeout: 244 seconds]
cisco has joined #ruby
scapegoatee has left #ruby ["Leaving..."]
prestorium has joined #ruby
dviola has quit [Quit: WeeChat 2.4]
prestorium has quit [Quit: prestorium]
aupadhye has quit [Remote host closed the connection]
APK is now known as AKPWD
nowhere_man has joined #ruby
<Net> Is Random::DEFAULT seeded from /dev/urandom when Ruby starts?
<Net> Or should I call srand on load?
mahlon has joined #ruby
nowhere_man has quit [Ping timeout: 257 seconds]
<elomatreb> Net: If you want high-quality random numbers, use the SecureRandom API
<Net> elomatreb: no crypto, just user surveying
<elomatreb> There isn't really a downside to it, I assume the regular rand is seeded from something like microtime (it's not a static seed at least)
<Net> the downside is I'd have to find somewhere to put srand
[Butch] has joined #ruby
lxsameer has quit [Quit: out]
\void has joined #ruby
<Net> elomatreb: I think the seed is generated in the same way as srand https://github.com/ruby/ruby/blob/c84a25e14882a356bc37647a2acf1b6a9127283b/random.c#L1468-L1479
<Net> could anyone with familiarity with the ruby source confirm?
<elomatreb> May I ask why you want to use srand in the first place? It shouldn't be necessary with either API unless you really want the repeatable results behavior, and even then the default doesn't matter to you
TechIsCool has joined #ruby
<Net> you're right
<TechIsCool> is there a way to install latest version of bundler 1
<TechIsCool> vs pinning a version to a specific release
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gnufied has joined #ruby
renich has quit [Ping timeout: 246 seconds]
nowhere_man has joined #ruby
<Net> I want to hash one integer to a fraction such that the hashes of an even distribution of integers will be an even distribution of fractions between 0 and 1.
<Net> What's the best way to do this?
<Net> Random.new(integer).rand?
conta has joined #ruby
conta has quit [Ping timeout: 258 seconds]
skryking has quit [Quit: Leaving]
orbyt_ has joined #ruby
orbyt_ has quit [Ping timeout: 250 seconds]
orbyt_ has joined #ruby
szulak_ has joined #ruby
blackmesa has joined #ruby
bruul has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
jcarl43 has joined #ruby
wrkrcoop has left #ruby [#ruby]
ricer2 has joined #ruby
bmurt has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
conta has joined #ruby
sameerynho has joined #ruby
clemens3_ has quit [Ping timeout: 250 seconds]
NightMonkey has joined #ruby
orbyt_ has quit [Remote host closed the connection]
am0123 has joined #ruby
polishdub has joined #ruby
<am0123> hell o
<szulak_> ruby -e 'puts "hello"'
blackmesa has quit [Ping timeout: 250 seconds]
<szulak_> ruby[bot] puts "hello"
<szulak_> meh, how do I eval it?
<szulak_> export AA=1; ruby -e 'sleep 3; p ENV["AA"]' &; AA=2
<szulak_> :(
<am0123> Oo
yebyen has quit [Quit: later]
<am0123> I'm learning rails, I noticed the use of expressions like "validates or assert " that are used outside methods .... are these functions calls ?
Dbugger has joined #ruby
<am0123> I mean How can they call a method outside other methods
<szulak_> during class definition init
conta2 has joined #ruby
cisco has quit [Ping timeout: 255 seconds]
hiroaki_ has quit [Ping timeout: 258 seconds]
<am0123> ??
conta2 has quit [Ping timeout: 255 seconds]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
<am0123> but how can they become available in this way ?
<am0123> is that the metaprogramming
<szulak_> have a look
<szulak_> I could think of these ways
KeyJoo has joined #ruby
<szulak_> but the is_arg_valid2? throws an error
renich has joined #ruby
<szulak_> it could work if it would be class method
<szulak_> but yea, I would also like to know how Rails does it
hiroaki_ has joined #ruby
renich has quit [Remote host closed the connection]
<am0123> thanks :)
<am0123> I'll try with class method
<am0123> attr_accessor is self.attr_accessor
<szulak_> yeah, that's it :)
szulak_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cd has joined #ruby
<leftylin1> note that no matter how many times `Foo.new` appear in that code (even if it's 0 times), you will still only get "validating => arg_1" once
leftylin1 is now known as leftylink
<am0123> leftylin1 +1
ramfjord has joined #ruby
reber has joined #ruby
reber__ has joined #ruby
KeyJoo has quit [Ping timeout: 250 seconds]
adgtl- has joined #ruby
b6b has quit [Ping timeout: 246 seconds]
b6b has joined #ruby
TechIsCool has quit [Ping timeout: 255 seconds]
adgtl has quit [Ping timeout: 255 seconds]
Rapture has quit [Ping timeout: 255 seconds]
linuus has quit [Ping timeout: 255 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
csaunders has quit [Ping timeout: 255 seconds]
jcarl43 has quit [Max SendQ exceeded]
linuus has joined #ruby
jcarl43 has joined #ruby
ua has quit [Excess Flood]
ua has joined #ruby
eb0t has joined #ruby
agent_white has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
wilbert has joined #ruby
wilbert has quit [Client Quit]
spacesuitdiver has joined #ruby
prestorium has joined #ruby
naught-fowl has joined #ruby
conta1 has joined #ruby
<naught-fowl> Hi how can I replace ' in a string with \' ? I am trying str.gsub("'", "\\'") but it gives me a weird result
bairyn is now known as ByronJohnson
<mozzarella> describe "weird result"
<mozzarella> or define
<naught-fowl> &>> str = "foo'bar'baz"; str.gsub("'", "\\'")
conta1 has quit [Ping timeout: 240 seconds]
<naught-fowl> I dont know how to eval in here
<naught-fowl> here I get "foobar'bazbarbazbaz"
<mozzarella> >> str = "foo'bar'baz"; str.gsub("'", "\\'")
<ruby[bot]> mozzarella: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
<naught-fowl> >> "foo'bar'baz".gsub("'", "\\'")
<ruby[bot]> naught-fowl: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<naught-fowl> >> RUBY_VERSION
<ruby[bot]> naught-fowl: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
SeepingN has joined #ruby
am0123 has quit [Ping timeout: 245 seconds]
Tempesta has joined #ruby
<naught-fowl> the bot must be broken
<havenwood> &>> str = "foo'bar'baz"; str.gsub("'", "\\'")
<mozzarella> anyway
<mozzarella> you need 4 slashes
<mozzarella> "foo'bar'baz".gsub("'", "\\\\'")
<naught-fowl> ahh
<naught-fowl> thank you very much, cheese
<leftylink> well, today I learned about https://ruby-doc.org/core-2.5.1/Regexp.html#class-Regexp-label-Special+global+variables . so thanks for that
<mozzarella> when in doubt, always add more slashes
<havenwood> leftylink: #match? is so fast because it doesn't set those. I tend to avoid them since these days there are usually explicit alternatives.
<havenwood> why have 4 when you can have 5!?: '\\\\\''
rubydoc has joined #ruby
prestorium has quit [Quit: prestorium]
conta has quit [Quit: conta]
TechIsCool has joined #ruby
mikecmpbll has quit [Ping timeout: 244 seconds]
mikecmpbll has joined #ruby
Xiti has quit [Ping timeout: 258 seconds]
helpa has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
nwradio4 has joined #ruby
nwradio4 is now known as nwradio
tdy has joined #ruby
tdy4 has quit [Ping timeout: 250 seconds]
hanmac has joined #ruby
scapegoatee has joined #ruby
scapegoatee has quit [Client Quit]
<Radar> Any German speakers online? If you were to write out the words for "5,65" would you use "Punkt" for the "," or "Komma"?
<Radar> This would be the :en equiv of 5.65, so "five point six five"
reber__ has quit [Remote host closed the connection]
reber has quit [Read error: Connection reset by peer]
helpa has joined #ruby
am0123 has joined #ruby
tdy has quit [Ping timeout: 244 seconds]
Xiti has joined #ruby
Ai9zO5AP has quit [Quit: WeeChat 2.3]
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
wolfshappen has quit [Ping timeout: 240 seconds]
wolfshappen_ has joined #ruby
yokel has quit [Remote host closed the connection]
yokel has joined #ruby
cnsvc_ has joined #ruby
am0123 has quit [Ping timeout: 250 seconds]
tdy has joined #ruby
naught-fowl has quit [Quit: Page closed]
naught-fowl has joined #ruby
am0123 has joined #ruby
Dbugger has quit [Remote host closed the connection]
Dbugger has joined #ruby
Dbugger has quit [Remote host closed the connection]
<vdl> what is the bash equivalent of ruby's ARGF ?
hiroaki_ has quit [Ping timeout: 240 seconds]
<havenwood> vdl: a `|` for piping or a `$(<FILENAME)` for reading a file into a command. You might want to ask #bash, telling them which part you care about.
<havenwood> vdl: Show what you have so far?
<havenwood> vdl: Which part do you care about?
polishdub has quit [Quit: leaving]
naught-fowl has quit [Quit: This computer has gone to sleep]
hightower3 has joined #ruby
<hightower3> Hey what's a preferred gem for splitting strings on whitespace but honoring quotes? shellwords, or?
<baweaver> Probably shellwords.
am0123_ has joined #ruby
<lupine> hard problems #3, after cache invalidation and naming things
<vdl> havenwood: hum nevermind. ARGF reads the content of the given filenames as arguments, or, the content of a file piped through stdin. I was looking for simply merging words from either $@ or stdin.
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
powerbit has quit [Ping timeout: 268 seconds]
am0123 has quit [Ping timeout: 250 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
orbyt_ has joined #ruby
<hightower3> thank baweaver
hightower3 has left #ruby ["Leaving"]
AndroidKK has quit [Quit: バイバイ〜!]
AndroidKitKat has joined #ruby
sagax has quit [Ping timeout: 272 seconds]
sameerynho has quit [Ping timeout: 245 seconds]
spacesuitdiver has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
def_jam has joined #ruby
am0123_ has quit [Ping timeout: 255 seconds]
eb0t has quit [Ping timeout: 244 seconds]
blackmesa has joined #ruby
jyaworski has joined #ruby
spacesuitdiver has joined #ruby
johnny56_ has quit [Quit: johnny56_]