havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.7.0-preview1: 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!
tvw has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 245 seconds]
leitz has quit [Quit: Leaving]
lucasb has quit [Quit: Connection closed for inactivity]
ramfjord has joined #ruby
defn has joined #ruby
defn has quit [Client Quit]
defn has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
Snowy has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
fphilipe has joined #ruby
<defn> does anyone IRC in this community anymore?
henninb has quit [Quit: Lost terminal]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
defn has quit [Quit: b]
rafadc has quit [Ping timeout: 272 seconds]
ramfjord has quit [Ping timeout: 245 seconds]
ixti has quit [Ping timeout: 245 seconds]
drnerdius has joined #ruby
Esa_ has quit []
sylario has quit [Quit: Connection closed for inactivity]
DaRock has joined #ruby
rafadc has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> &>> "IRC".next
<rubydoc> # => "IRD" (https://carc.in/#/r/791g)
jenrzzz has joined #ruby
kaiser has joined #ruby
kaiser0 has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
AndreYuhai has quit [Remote host closed the connection]
AndreYuhai has joined #ruby
fphilipe has quit [Ping timeout: 258 seconds]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
exmortus has joined #ruby
ur5us has joined #ruby
staticx has joined #ruby
exmortus has quit [Ping timeout: 246 seconds]
ur5us has quit [Ping timeout: 250 seconds]
AndreYuhai has quit [Remote host closed the connection]
AndreYuhai has joined #ruby
ur5us has joined #ruby
<havenwood> mynameisdebian: With `Array.new 42, {}`, you're saying "I want an Array with the same Hash as all 42 elements.
<havenwood> "
<havenwood> mynameisdebian: They'll each have the same #object_id, since there's just one Hash.
<havenwood> mynameisdebian: With `Array.new(42) { {} }`, you're saying "I want an Array with a fresh result of this block as all 42 elements."
<havenwood> The block yield a fresh Hash for each of the 42 elements of the Array.
oetjenj has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
fphilipe has joined #ruby
AndreYuhai has quit [Remote host closed the connection]
_dbugger has joined #ruby
AndreYuhai has joined #ruby
dbugger has quit [Ping timeout: 264 seconds]
rshetty has joined #ruby
rshetty has quit [Ping timeout: 276 seconds]
misterioso_ has quit []
AndreYuhai has quit [Remote host closed the connection]
AndreYuhai has joined #ruby
Snowy has joined #ruby
_whitelogger has joined #ruby
Technodrome has joined #ruby
queip has quit [Ping timeout: 272 seconds]
mynameisdebian has quit [Ping timeout: 248 seconds]
fphilipe has quit [Ping timeout: 245 seconds]
AJA4350 has quit [Remote host closed the connection]
queip has joined #ruby
kaiser has quit [Ping timeout: 272 seconds]
ramfjord has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
iNs has quit [Quit: bubye]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
ramfjord has quit [Ping timeout: 272 seconds]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
iNs has joined #ruby
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
Snowy has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
fphilipe has joined #ruby
chalkmonster has joined #ruby
drnerdius has quit [Ping timeout: 245 seconds]
r3m has quit [Quit: WeeChat 2.6-dev]
r3m has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
jenrzzz has joined #ruby
r3m has quit [Quit: WeeChat 2.6-dev]
r3m has joined #ruby
fphilipe has quit [Ping timeout: 246 seconds]
bga57 has quit [Quit: Leaving.]
Freshnuts has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
orbyt_ has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
tdy has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.5]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
mynameisdebian has joined #ruby
jenrzzz has joined #ruby
mynameisdebian has quit [Remote host closed the connection]
mynameisdebian has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
Tempesta_ has joined #ruby
duderonomy has joined #ruby
brool has quit [Ping timeout: 276 seconds]
sgen has joined #ruby
gb_away has quit [Ping timeout: 245 seconds]
Tempesta has quit [Ping timeout: 245 seconds]
Freshnuts has quit [Ping timeout: 245 seconds]
Freshnuts has joined #ruby
gb_away has joined #ruby
jenrzzz has joined #ruby
fphilipe has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
rshetty has joined #ruby
Snowy has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
_whitelogger has joined #ruby
_rshetty_ has joined #ruby
kaiser has joined #ruby
rshetty has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
Snowy has quit [Ping timeout: 245 seconds]
selckin has left #ruby [#ruby]
ramfjord_ has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
Inline has quit [Quit: Leaving]
zapata has quit [Quit: WeeChat 2.5]
_rshetty_ has quit [Remote host closed the connection]
Tuor has quit [Ping timeout: 272 seconds]
rshetty has joined #ruby
sgen has quit [Ping timeout: 276 seconds]
_whitelogger has joined #ruby
mynameisdebian has quit [Read error: Connection reset by peer]
mynameisdebian has joined #ruby
AndreYuhaii has joined #ruby
AndroidKitKat has quit [Ping timeout: 245 seconds]
cornfeedhobo has quit [Ping timeout: 245 seconds]
shtirlic has quit [Ping timeout: 245 seconds]
Jello_Raptor has quit [Ping timeout: 245 seconds]
Jello_Raptor has joined #ruby
AndreYuhai has quit [Read error: Connection reset by peer]
oz has quit [Ping timeout: 245 seconds]
AndroidKitKat has joined #ruby
shtirlic has joined #ruby
oz has joined #ruby
guardian has quit [Ping timeout: 245 seconds]
guardian has joined #ruby
shaman42 has quit [Ping timeout: 245 seconds]
vdl has quit [Ping timeout: 245 seconds]
shaman42 has joined #ruby
absolutejam has joined #ruby
vdl has joined #ruby
ascarter has joined #ruby
rshetty has quit []
DTZUZO has quit [Ping timeout: 248 seconds]
sauvin has joined #ruby
kaiser has quit [Read error: Connection reset by peer]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
davor has quit [Ping timeout: 244 seconds]
davor has joined #ruby
bga57 has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
oetjenj has joined #ruby
quarters has quit [Ping timeout: 276 seconds]
quarters has joined #ruby
cornfeedhobo has joined #ruby
sphenxes has joined #ruby
za1b1tsu has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
jenrzzz has joined #ruby
asio has joined #ruby
quarters has quit [Ping timeout: 250 seconds]
priodev has quit [Ping timeout: 245 seconds]
cd has quit [Quit: cd]
quarters has joined #ruby
andikr has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
Snowy has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
troulouliou_div2 has joined #ruby
chalkmonster has joined #ruby
Nicmavr has joined #ruby
absolutejam has quit [Ping timeout: 258 seconds]
vondruch has joined #ruby
priodev has joined #ruby
ramfjord_ has quit [Ping timeout: 248 seconds]
Tempesta_ has left #ruby ["Closing Channel, bye."]
Tempesta has joined #ruby
gix- has quit [Ping timeout: 272 seconds]
Tuor has joined #ruby
Tuor has quit [Changing host]
Tuor has joined #ruby
Tuor has quit [Client Quit]
lxsameer has joined #ruby
TomyWork has joined #ruby
moei has joined #ruby
DTZUZO has joined #ruby
prestorium has joined #ruby
akem-hp has quit [Quit: Leaving]
DTZUZO has quit [Ping timeout: 248 seconds]
absolutejam has joined #ruby
schne1der has joined #ruby
ellcs has joined #ruby
queip has quit [Ping timeout: 245 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has joined #ruby
aupadhye has joined #ruby
quarters has quit [Ping timeout: 250 seconds]
troulouliou_div2 has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 244 seconds]
quarters has joined #ruby
mynameisdebian has quit [Remote host closed the connection]
mynameisdebian has joined #ruby
prestorium has quit [Quit: prestorium]
ellcs has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
gwilkes has joined #ruby
themsay has quit [Ping timeout: 246 seconds]
chalkmonster has quit [Quit: WeeChat 2.5]
ZAJDAN has joined #ruby
ddffg has joined #ruby
sphenxes has quit [Remote host closed the connection]
deepreds1 has joined #ruby
absolutejam has quit [Read error: Connection reset by peer]
absolutejam2 has joined #ruby
ddffg has quit [Remote host closed the connection]
Snowy has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
quarters has quit [Ping timeout: 252 seconds]
themsay has joined #ruby
quarters has joined #ruby
drnerdius has joined #ruby
Snowy has joined #ruby
mynameisdebian has quit [Ping timeout: 258 seconds]
<m17> "The eql? method returns true if obj and other refer to the same hash key."
<m17> Can someone help me understand what "has key" means here?
<ytti> [1] pry(main)> 1.object_id
<ytti> => 3
<ytti> [2] pry(main)> "moi".object_id
<ytti> => 70185495898120
<ytti> object1.object_id == object2.object_id
mynameisdebian has joined #ruby
<ytti> actually, scratch that, eql? is not about object_id
<ytti> eql? is usually just ==, i.e. object dependent what it does
<ytti> in which object do you see this documentation?
Obats has joined #ruby
<Bish> when doing http requests with Net::HTTP.start(..) { .. } will the http connection be persistent for the requests done inside that block?
mynameisdebian has quit [Ping timeout: 246 seconds]
ZAJDAN has quit [Quit: Konversation terminated!]
ZAJDAN has joined #ruby
<Obats> How do I access the 2nd level element in a hash? ctx[:subscr][:res]? Periods inbetween?
<ytti> that is fine
<ytti> more specifically, no periods
Snowy has quit [Quit: ragequit]
<Bish> wasn't there a cool method for doing that navigation safe?
<Bish> .dig or something?
<ytti> yup
<Bish> &> {:a=>{:b=>1}}.dig(:a,:b)
<rubydoc> parser error at position 0 around `>'
<Bish> > {:a=>{:b=>1}}.dig(:a,:b)
<Bish> >> {:a=>{:b=>1}}.dig(:a,:b)
<Bish> :(
<ruby[bot]> Bish: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<ytti> &> {:a=>{:b=>1}}.dig(:a,:b)
<rubydoc> parser error at position 0 around `>'
<Bish> & {:a=>{:b=>1}}.dig(:a,:b)
<rubydoc> parser error at position 0 around ` '
<Bish> thefuq
<Bish> &help
<rubydoc> parser error at position 0 around `h'
<ytti> &>> {:a=>{:b=>1}}.dig(:a,:b)
<rubydoc> # => 1 (https://carc.in/#/r/792p)
<ytti> there we go
ellcs has joined #ruby
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
jinie has joined #ruby
<Obats> Ah. Nice :). Not sure I understand all of it though. Is the &>> required? Or is it for the bot here?
<Bish> it's just so the bot knows "here comes ruby code"
<Bish> so &>> isn't a part of ruby
<Bish> it's designed to look like the begin of a repl
sylario has joined #ruby
fphilipe has quit [Ping timeout: 244 seconds]
fphilipe has joined #ruby
<Obats> I don't get it. When I do file.puts ctx[:subscr] I get {:title=>"", :results=>[{:ad_image_url=>"https... Shouldn't it be possible to do ctx[:subscr][:results].each ? I get Unknown error (class: TypeError): no implicit conversion of Symbol into Integer
<Obats> ('[' in Ruby means Array, right?)
<ytti> as far as i can see, basd on what you tell, this should work
<ytti> perhaps write simple example of failing code in some playground
<ytti> the error implies you are actually accessing Array, not Hash
<ytti> so could it be you're omitting that :subscr actually contains an array?
<ytti> perhaps you need ctx[:subscr].first[:results]
Abhijit has joined #ruby
<Abhijit> Hi
<Abhijit> how can I kill ruby script using ctrl + c when this script is waiting for user input on gets.chomp?
<ytti> that should work
<ytti> unless you trap it and handle it
<Abhijit> but when script is on gets.chomp line it won't proceed unless input is entered?
<ytti> if you press ctrl+c it should just abort the execution of the rugby
<ytti> ruby also
<ytti> sometimes rugby
<ytti> do you want to abort reading user input and continue executing the ruby?
<Abhijit> no. complete exit.
<Abhijit> i got one reference from one SE page! it works now.
howdoi has joined #ruby
<ytti> it should work without doing anything :>
bijan_ has joined #ruby
queip has quit [Ping timeout: 272 seconds]
stan has quit [Ping timeout: 244 seconds]
Freshnuts has quit [Quit: Leaving]
queip has joined #ruby
bitwinery has quit [Ping timeout: 244 seconds]
DTZUZO has joined #ruby
jenrzzz has joined #ruby
absolutejam2 has quit [Ping timeout: 245 seconds]
Obats has quit [Ping timeout: 260 seconds]
za1b1tsu has quit [Remote host closed the connection]
absolutejam2 has joined #ruby
<m17> Either the script was trapping the exit signal or something else was trapping it :D
AndreYuhaii has quit [Quit: Leaving]
bijan_ has quit [Remote host closed the connection]
bijan_ has joined #ruby
bijan_ has quit [Remote host closed the connection]
akem-lnvo has quit [Ping timeout: 246 seconds]
queip has quit [Ping timeout: 244 seconds]
andikr has quit [Ping timeout: 245 seconds]
bijan_ has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
rokra has quit [Ping timeout: 268 seconds]
fphilipe has quit [Ping timeout: 245 seconds]
queip has joined #ruby
bijan_ has quit [Remote host closed the connection]
bijan_ has joined #ruby
fphilipe has joined #ruby
bijan_ has quit [Remote host closed the connection]
bijan_ has joined #ruby
bijan_ has quit [Remote host closed the connection]
Abhijit_ has joined #ruby
bijan_ has joined #ruby
andikr has joined #ruby
bijan_ has quit [Remote host closed the connection]
Abhijit has quit [Ping timeout: 245 seconds]
bijan_ has joined #ruby
Ring0` has joined #ruby
<Ring0`> Hi. I'm trying to get my head around enumerators (generators?) and I tried to yield numbers in a loop and put them into an array by appending them on each iteration, however I can't figure out how to include an object into the block. What I've tried: https://wandbox.org/permlink/xMui0GR7Qk0gXf4g
<voker57> I'd have a look at your link but it does not work without js, please paste to https://dpaste.de
gregf_ has joined #ruby
HendrikPeter has joined #ruby
<HendrikPeter> o/
<Ring0`> Sure thing! https://dpaste.de/rcze
HendrikPeter has left #ruby [#ruby]
<voker57> with_object is a method of Enumerator, you are calling it on a result of calling foo
drnerdius has quit [Quit: Konversation terminated!]
drnerdius has joined #ruby
drnerdius has quit [Client Quit]
drnerdius has joined #ruby
drnerdius has quit [Client Quit]
drnerdius has joined #ruby
<voker57> i'm not sure what you are trying to accomplish with this code
<Ring0`> The result should be the same as if I did (0..5).to_a, but since I'm trying to understand how yielding works, I create some overengineered scenarios like this one here
andikr has quit [Remote host closed the connection]
<Ring0`> so having a method that returns multiple values, I would like to yield them there and immediatelly wrap in an array, without having to declare empty array before calling foo
<Ring0`> tacit-style :)
gregf_ has quit [Remote host closed the connection]
<voker57> you should return a Enumerator from method https://dpaste.de/WLgG
<voker57> if you yield, further transformations are difficult
<voker57> coz you have to supply block directly to that method
<Ring0`> Hmm.. and this block cannot really provide any additional arguments to the block? Darn. The example you returned is obviously OK, but assume such scenario: https://dpaste.de/Qqqc
fphilipe has quit [Ping timeout: 248 seconds]
<Ring0`> As I see it, declaring an empty array, appending during iteration and then returning it seems inevitable providing that I insist on using yield
bijan_ has quit [Remote host closed the connection]
fphilipe has joined #ruby
bijan_ has joined #ruby
<Ring0`> which in such case I could just return the array as-is
bijan_ has quit [Remote host closed the connection]
bijan_ has joined #ruby
bijan_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<leftylink> `foo.whatever` acts on whatever `foo` returned. whereas `foo { some_block }` gives a block to `foo`, which `foo` might or might not choose to `yield` things to. expecting `whatever` to be able to affect `some_block` before `foo` can `yield` to it seems to imply time travel
bijan_ has joined #ruby
<leftylink> if it must be a one-liner (well, I'm not going to judge, maybe there is a code golf contest going on, or maybe the widescreen monitor is broken and there's just 1 very very long line and you wouldn't be able to see the program if it was on two lines)
<leftylink> then I guess you can do some shit with ||=
<leftylink> &>> def foo; (1..5).each { |i| yield i } end; foo { |i| @argh ||= [] << i }; @argh
<rubydoc> # => [1] (https://carc.in/#/r/7965)
<leftylink> we'll ignore the fact that you would get yelled at if you actually wrote that code in a code review
<leftylink> excuse my bad language
<leftylink> the thought of the code I was about to write to demonstrate got me putting too low effort into my words
x0f has quit [Ping timeout: 250 seconds]
<ZAJDAN> do sombody has experiences mine data from SAP B1 ...?
<Ring0`> Thought about that one :)) I'm working in PHP on every day basis so you must understand my thrive for one-liners. I have to maintain the balance between writing abominable at work and relaxing oneliners at home
x0f has joined #ruby
bijan_ has quit [Ping timeout: 276 seconds]
<leftylink> ... also I forgot parentheses
<leftylink> &>> def foo; (1..5).each { |i| yield i } end; foo { |i| (@argh ||= []) << i }; @argh
<rubydoc> # => [1, 2, 3, 4, 5] (https://carc.in/#/r/7966)
<voker57> Ring0`: https://dpaste.de/vbD3
<leftylink> may strike `.each`, `with_object` already accepts block
<Ring0`> yeah but uhhh
AJA4350 has joined #ruby
davor_ has joined #ruby
<Ring0`> lemme try this funny rubydoc
<Ring0`> &>> def foo; Enumerator.new { |y| (0..5).each { |i| y << i} } end; foo.to_a
<rubydoc> # => [0, 1, 2, 3, 4, 5] (https://carc.in/#/r/7967)
<Ring0`> lol.
davor has quit [Ping timeout: 272 seconds]
davor_ is now known as davor
<Ring0`> but I can't explain why
<Ring0`> how did "y" got a value?
<voker57> value?
<Ring0`> I mean
<Ring0`> initial argument
<voker57> y is an argument to a block
<voker57> it is supplied by Enumerator.new
<Ring0`> so to_a passes an empty array to a block?
<voker57> no, y is not an array
<voker57> it's an "yielder object"
<leftylink> &ri Enumerator#new
<rubydoc> Found no entry that matches class Enumerator instance method new
<leftylink> oops
<leftylink> &ri Enumerator::new
<rubydoc> Found no entry that matches class Enumerator::new
<leftylink> &ri Enumerator.new
<leftylink> finally
<Ring0`> I see, so it's like accumulator when reducing array, correct?
<voker57> it has #yield which adds object to enumeration
<voker57> that's all you supposed to know
<voker57> (aka <<)
<Ring0`> ohh
<Ring0`> magic
<voker57> it might not even be the same object on every loop
<Ring0`> I see it now. I read too quickly and missed the part where it says that << is just an alias within enumerator block
<Ring0`> not neccesairly "push value to an array"
brahmana has joined #ruby
<brahmana> Hi all.. Is there a way for me to disable Net::HTTP from doing retries on connect or read timeouts?
AJA4351 has joined #ruby
<brahmana> I am actually using the HTTParty gem, which internally uses Net::HTTP
jenrzzz_ has joined #ruby
<voker57> maybe httparty does retries for you?
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
jenrzzz has quit [Ping timeout: 245 seconds]
andikr has joined #ruby
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Changing host]
troulouliou_div2 has joined #ruby
bijan_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 258 seconds]
troulouliou_div2 has quit [Excess Flood]
bijan_ has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
bijan_ has joined #ruby
andikr has quit [Ping timeout: 248 seconds]
bijan_ has quit [Remote host closed the connection]
<brahmana> voker57 : No, I had done this investigation some time back also. I quite clearly remember it is Net::HTTP which does the retries
DTZUZO has quit [Ping timeout: 245 seconds]
AJA4350 has quit [Ping timeout: 272 seconds]
DTZUZO has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
AJA4350 has joined #ruby
yalue has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has joined #ruby
<brahmana> voker57 : Thank you. Sadly that is a recent feature and I am currently stuck on an older version of Ruby.. :-)
bijan_ has joined #ruby
Abhijit_ has quit [Quit: Leaving]
Inline has joined #ruby
jenrzzz has joined #ruby
Swyper has joined #ruby
DTZUZO has quit [Ping timeout: 258 seconds]
SidepocketNeo has quit [Remote host closed the connection]
SidepocketNeo has joined #ruby
cd has joined #ruby
chalkmonster has joined #ruby
brahmana has quit [Ping timeout: 260 seconds]
ogres has joined #ruby
bijan_ has quit [Ping timeout: 264 seconds]
jcalla has joined #ruby
QCF has joined #ruby
QCF has quit [Client Quit]
jenrzzz has quit [Ping timeout: 258 seconds]
DTZUZO has joined #ruby
bijan_ has joined #ruby
DTZUZO has quit [Ping timeout: 244 seconds]
fphilipe has quit [Ping timeout: 248 seconds]
involans has joined #ruby
Snowy has joined #ruby
involans has quit [Read error: Connection reset by peer]
TomyWork has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
Swyper has quit [Remote host closed the connection]
jefffrails35 has joined #ruby
fphilipe has joined #ruby
schne1der has quit [Ping timeout: 245 seconds]
deepreds1 has quit [Ping timeout: 245 seconds]
Dr_MDMA_MD has joined #ruby
jenrzzz has joined #ruby
BH23 has joined #ruby
Esa_ has joined #ruby
matheusmoreira has quit [Remote host closed the connection]
matheusmoreira has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
bijan_ has quit [Remote host closed the connection]
bijan_ has joined #ruby
fphilipe has quit [Ping timeout: 258 seconds]
schne1der has joined #ruby
bijan_ has quit [Ping timeout: 250 seconds]
lucasb has joined #ruby
absolutejam2 has quit [Read error: Connection reset by peer]
absolutejam2 has joined #ruby
leitz has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
milkohol has joined #ruby
awebdev has joined #ruby
absolutejam2 has quit [Ping timeout: 245 seconds]
awebdev has quit [Ping timeout: 248 seconds]
drnerdius has quit [Ping timeout: 258 seconds]
BH23 has quit [Ping timeout: 248 seconds]
bijan_ has joined #ruby
skryking has joined #ruby
face has joined #ruby
facest has quit [Ping timeout: 245 seconds]
mynameisdebian has joined #ruby
Fraeon has quit [Remote host closed the connection]
noobineer has quit [Ping timeout: 250 seconds]
DaRock has quit [Ping timeout: 246 seconds]
bijan_ has quit [Remote host closed the connection]
bijan_ has joined #ruby
englishm has quit [Excess Flood]
englishm has joined #ruby
englishm has quit [Excess Flood]
englishm has joined #ruby
englishm has quit [Excess Flood]
aupadhye has quit [Remote host closed the connection]
englishm has joined #ruby
englishm has quit [Excess Flood]
noobineer has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.5]
englishm has joined #ruby
mynameisdebian has quit [Ping timeout: 244 seconds]
bijan_ has quit []
SeepingN has joined #ruby
oetjenj has joined #ruby
Technodrome has joined #ruby
henninb has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
teardown has quit [Ping timeout: 258 seconds]
jefffrails35 has quit [Quit: Leaving]
ixti has joined #ruby
ellcs has quit [Remote host closed the connection]
ogres has quit [Quit: Connection closed for inactivity]
madprogrammer has joined #ruby
fphilipe has joined #ruby
henninb has quit [Quit: leaving]
chamunks has quit [Ping timeout: 246 seconds]
tdy has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
orbyt_ has joined #ruby
jenrzzz has joined #ruby
chamunks has joined #ruby
BH23 has joined #ruby
Snowy has quit [Remote host closed the connection]
henninb has joined #ruby
fphilipe has quit [Ping timeout: 245 seconds]
duderonomy has joined #ruby
ramfjord has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
lxsameer has quit [Quit: out]
ixti has quit [Ping timeout: 245 seconds]
BH23 has quit [Ping timeout: 246 seconds]
rafadc_ has joined #ruby
rafadc has quit [Ping timeout: 246 seconds]
fphilipe has joined #ruby
themsay has quit [Read error: Connection reset by peer]
henninb has quit [Quit: leaving]
themsay has joined #ruby
Dr_MDMA_MD has quit []
ua_ has quit [Ping timeout: 244 seconds]
themsay has quit [Ping timeout: 268 seconds]
themsay has joined #ruby
absolutejam2 has joined #ruby
mkaito has left #ruby ["WeeChat 2.5"]
georgie has joined #ruby
Snowy has joined #ruby
georgie has quit [Client Quit]
themsay has quit [Ping timeout: 248 seconds]
involans has joined #ruby
Dr_MDMA_MD has joined #ruby
fphilipe has quit [Ping timeout: 245 seconds]
ixti has joined #ruby
sauvin has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
xco has quit [Quit: xco]
jtdowney has quit [Quit: jtdowney]
jtdowney has joined #ruby
ua has joined #ruby
Snowy has quit [Ping timeout: 246 seconds]
themsay has joined #ruby
mlt- has joined #ruby
<mlt-> Hi! Noob is here. I'm trying to prepend a module to wrap a method, but my wrapper does not get called. Any suggestion? https://dpaste.de/0EmL
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
sameerynho has joined #ruby
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
<havenwood> mlt-: You're equivocating between include/included and prepend/prepended, which are different things.
<havenwood> mlt-: Do you want to include or prepend it?
<mlt-> havenwood: I just resolved the issue... I had to prepend to another class which in turn includes what I had initially
<mlt-> ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.include SchemaAwareness did the trick
<havenwood> mlt-: `self.included(mod)` or `ReferentialIntegrity.prepend`
<havenwood> mlt-: Ah
duckpuppy has joined #ruby
alem0lars has joined #ruby
xco has joined #ruby
amrx has joined #ruby
involans has quit [Quit: involans]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teardown has joined #ruby
<jidar> is there a Regexp append of some sort, like I want to match on a list of items? I saw it mentioned here a while back but grep/search is failing me
amrx has quit [Ping timeout: 244 seconds]
<leftylink> is that Regexp.union ?
<jidar> yea I think so
<jidar> let me try it out
tdy has quit [Remote host closed the connection]
madprogrammer has quit [Remote host closed the connection]
Snowy has joined #ruby
gix has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
oetjenj has joined #ruby
Snowy has quit [Ping timeout: 248 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
vjacob has joined #ruby
<jidar> leftylink:yep, worked. Thanks!
involans has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zave has joined #ruby
<zave> hi all, is this a good place to ask a question about installing and compiling ruby with rbenv/ruby-build?
<Eiam> zave: ask yer question
guest6788 has joined #ruby
glosoli has joined #ruby
<glosoli> Hey, any reasons why would anyone prefer doing `gem install rake` vs `bundle install rake` ?
skryking has quit [Quit: WeeChat 2.4]
<zave> Eiam: thank you, i'm using them both on a server that is offline, no internet connection, that is...so i've scp'd and uncompressed a tar file to ~/.rbenv/cache and am attempting to do 'rbenv install 2.5.1', but i'm getting an error that starts with what appears to be an attempt to find the ruby on the internet.
<Eiam> glosoli: yes those are totally different commands? =0
<Eiam> glosoli: in one, you are using your bundle file to manage the dependencies and in the other you are just installing a gem
<glosoli> Eiam sorry just getting started with ruby, kind of confused about the right ways to install dependencies, it seems one can just edit Gemfile and run bundle install
<zave> so how do i force ruby-build / rbenv to install and compile the ruby i have in ~/.rbenv/cache?
<glosoli> just installing gem means adding it to the ruby level deps ?
<Eiam> glosoli: right, which gives you a lockfile to help deploy your dependencies
<glosoli> Eiam so could I prefer bundle for most of the things ?
<glosoli> should I"
<Eiam> glosoli: you should read up on what bundler does (https://bundler.io) so you understand what its designed to do and then you can make an informed decision about which command is appropriate to use in your specific situations.
bga57 has quit [Ping timeout: 248 seconds]
<Eiam> "Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed."
georgie has joined #ruby
reber has joined #ruby
<Eiam> `gem install rake` == give me whatever shit is out there
<Eiam> `bundle install rake` == give me the shit defined in my bundle file
ramfjord has joined #ruby
<Eiam> (bundle install <gem> doesn't really make sense)
<Eiam> since the gemfile specifies the gems
<glosoli> Eiam sorry for my ignorance, just realised that `bundle install gem-name` does nothing
<Eiam> yeah i also realized i just mentally short handed that into 'bundle install' (gem file contains gem 'rake' ) which wouldn't help you understand the problem lol
<Eiam> yeah =)
<Eiam> glosoli: right =)
<glosoli> Eiam basically my ignorance is based on the other languages I am used to, do I understand correctly that ruby has no concept of dev dependencies ?
<glosoli> i.e. `rake` is as equal gem as any other library
<havenwood> glosoli: It's a bit confusing, for historical reasons. The `bundle` commands are for installing a project's dependencies. The `gem` commands install gems ad hoc.
<Eiam> not quite sure I follow that one, you can specify in your bundle file a development grouping of dependencies
<glosoli> Eiam this kind of answers my question, thanks
<Eiam> glosoli: rake is just another gem, yes. as is bundle for that mater.
<Eiam> matter
<Eiam> glosoli: you can specify group dependencies in bundler, https://bundler.io/v1.12/groups.html
<havenwood> glosoli: There are three types of gems. Normal ones you install. Then "default gems" and "bundled gems" that ship with Ruby. This site covers the difference: https://stdgems.org/
<havenwood> glosoli: Rake is a bbundled gem.
<havenwood> (No relation to bundler >.>)
<havenwood> We need to use more words for these things...
<glosoli> so bundled gem comes together with Ruby ?
<havenwood> glosoli: Yes, bundled and default gems ship with Ruby.
<havenwood> glosoli: When you install Ruby, you already have gems.
<glosoli> (again sorry if my questions are too stupid, just trying to get the wording right so I can carry on googling things)
guest6788 has left #ruby [#ruby]
<havenwood> glosoli: The Ruby standard library is in the process of being extracted into gems that ship with Ruby.
<havenwood> glosoli: Your questions aren't stupid at all. This is confusing for historical reasons.
<Eiam> havenwood: seems weird, why pull them into gems? just to make the core smaller?
<Eiam> out of band revs?
<glosoli> havenwood so in that regard, it does not make much sense to have rake in Gemfile, since it comes together with Ruby ?
<havenwood> Eiam: A couple reasons. One is to be able to update a gem for security reasons without shipping a new Ruby. (Ala the bigdecimal CVEs.)
<havenwood> glosoli: You'd put it in the Gemfile to get a more recent version than the one that ships with Ruby.
<Eiam> glosoli: rake can be uninstalled.
<havenwood> And that ^
<Eiam> if your product needs it, you should declare it
<havenwood> Default gems can't be uninstalled, but Bundled gems can.
<glosoli> damn in these several minutes I learned more than googling around without understanding the wording, thanks a lot
<Eiam> i.e. bundler will be there if ruby is there. rake may not be there if ruby is there.
<havenwood> Eiam: Also, for some it's a step towards removal from stdlib, like tk, curses, etc.
<Eiam> havenwood: yeah, fair.
<glosoli> if someone with lots years of experience on other languages would ask you for a quick intro into the language itself, is there some particular thing such as blog, articles, or books that one would suggest ?
bitwinery has joined #ruby
<Eiam> glosoli: its in the topic
<Eiam> Books: https://goo.gl/wpGhoQ |
<glosoli> got it, thanks!
<havenwood> We should move those books to the ruby-community.com page at some point.
* havenwood is lazy.
<havenwood> havenwood.lazy.take(10)
Prira has quit [Quit: No Ping reply in 180 seconds.]
<havenwood> I was glad to see a proposal for #eager: https://bugs.ruby-lang.org/issues/15901
_dbugger is now known as dbugger
Prira has joined #ruby
<Eiam> but can it be applied to the Human object?
fphilipe has joined #ruby
<Eiam> glosoli: of course =)
involans has quit [Ping timeout: 245 seconds]
psmolen has quit [Ping timeout: 245 seconds]
reber has quit [Remote host closed the connection]
psmolen has joined #ruby
yalue has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
involans has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
glosoli has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
deepreds1 has joined #ruby
fphilipe has quit [Ping timeout: 248 seconds]
postmodern has quit [Quit: Leaving]
Fernando-Basso has joined #ruby
hexdroid has joined #ruby
hexdroid has quit [Client Quit]
DTZUZO has joined #ruby
Technodrome has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
Technodrome has quit [Remote host closed the connection]
milkohol has quit [Ping timeout: 244 seconds]
unreal has joined #ruby
fphilipe has joined #ruby
jenrzzz has joined #ruby
joast has quit [Quit: Leaving.]
ramfjord has quit [Ping timeout: 268 seconds]
deepreds1 has quit [Ping timeout: 268 seconds]
SidepocketNeo has quit [Ping timeout: 260 seconds]
joast has joined #ruby
<mlt-> How do I define a method that takes any arguments to be passed into parent with plain super? I want to wrap something but arguments might change in the future though I don't care about args at this moment
<mlt-> def mymethod(*arg1, **arg2) ?
ramfjord has joined #ruby
sameerynho has quit [Ping timeout: 246 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bitwinery has quit [Quit: Leaving]
fphilipe has quit [Ping timeout: 258 seconds]
<havenwood> mlt-: `super` will pass both arguments and block, while `super(&nil)` will pass neither argument nor block.
<havenwood> mlt-: `super()` will pass just the block, and `super(*args, &nil)` will pass just the arguments.
<mlt-> and how do I pass arguments and a block?
<havenwood> mlt-: just plain: super
<mlt-> the problem with super is that I get an error:
<mlt-> ArgumentError: wrong number of arguments (given 3, expected 1..2)
jenrzzz has quit [Ping timeout: 258 seconds]
<mlt-> I need to somehow unsplat things or soemthing
<havenwood> mlt-: `super` simply passes the arguments and blocks along, as they are
<havenwood> mlt-: it works perfectly for that ^, but doesn't do anything else
<mlt-> havenwood: well for that I need to def method as it is in a super... that is what I don't want to do
<havenwood> mlt-: if you want to change the shape of the arguments, that's up to you to do
orbyt_ has joined #ruby
<mlt-> def reset_pk_sequence!(*_arg1, **_arg2) # instead of (table, pk = nil, sequence = nil)
<havenwood> mlt-: you're not using the arguments?
<mlt-> no, I do not
<havenwood> mlt-: why the double splat?
<havenwood> mlt-: We might be able to suggest solutions if you can show your code?
<mlt-> I think this method signature changed between versions I don't want conditional... I don't know if kw args will be there in a future
<mlt-> hold on
<havenwood> mlt-: A single splat covers kwargs.
alem0lars has quit [Remote host closed the connection]
agent_white has joined #ruby
bambanx has joined #ruby
xco has quit [Quit: xco]
ascarter has joined #ruby
<mlt-> hm...okay... let me try
<mlt-> havenwood: nice! indeed just a single splat in definition and plain super. All works!
<mlt-> Thanks!
cybcypha_ has joined #ruby
<cybcypha_> Hello what best resource material to knowing everything on ruby
<cybcypha_> esp active records
cybcypha_ has left #ruby ["Leaving"]
moei has quit [Quit: Leaving...]
<havenwood> cyb, I'd start with the Active Record docs, then the Active Record code.
DTZUZO has joined #ruby
vjacob has quit [Ping timeout: 258 seconds]
involans has quit [Quit: involans]
absolutejam2 has quit [Ping timeout: 248 seconds]
bambanx has quit [Read error: Connection reset by peer]
bambanx has joined #ruby
vjacob has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
_dbugger has joined #ruby
oncall-pokemon has quit [Quit: Connection closed for inactivity]
dbugger has quit [Ping timeout: 264 seconds]
georgie has quit [Remote host closed the connection]
schne1der has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
DaRock has joined #ruby
Swyper has quit [Remote host closed the connection]
agent_white has quit [Ping timeout: 246 seconds]
fphilipe has joined #ruby
agent_white has joined #ruby