havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 2.7.2, 2.6.6, 3.0.0-preview1: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3 | Can't talk? Register/identify with NickServ
<al2o3-cr> havenwood: shit happens.
<havenwood> al2o3-cr: Just don't have 10,000+ things? Too many.
<al2o3-cr> ?
chouhoulis has quit [Remote host closed the connection]
<apotheon> What if 10K shits happen?
<al2o3-cr> havenwood: Ractor gonna be a serious bridge.
factormystic has quit [Quit: The Lounge - https://thelounge.chat]
roshanavand has quit [Ping timeout: 258 seconds]
factormystic has joined #ruby
Rudd0 has quit [Ping timeout: 256 seconds]
braincrash has joined #ruby
TCZ has joined #ruby
braincrash has quit [Ping timeout: 264 seconds]
TCZ has quit [Quit: Leaving]
Tempesta has quit [Quit: AdiIRC is updating to v4.0 Beta Build (2020/11/06 UTC) 64 Bit]
Tempesta has joined #ruby
openstruct has joined #ruby
openstruct has joined #ruby
pwnd_sfw9 has joined #ruby
adu has joined #ruby
Caerus has quit [Ping timeout: 260 seconds]
Caerus has joined #ruby
chouhoulis has joined #ruby
Caerus has quit [Ping timeout: 256 seconds]
Caerus has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
factormystic has quit [Read error: Connection reset by peer]
braincrash has joined #ruby
tpanarch1st has joined #ruby
cthulchu has quit [Ping timeout: 260 seconds]
ecuanaso has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_whitelogger has joined #ruby
silverdust has quit [Ping timeout: 240 seconds]
silverdust has joined #ruby
silverdust has quit [Ping timeout: 260 seconds]
braincrash has quit [Ping timeout: 246 seconds]
^ is now known as V[excess]
swaggboi has quit [Quit: C-x C-c]
factormystic has joined #ruby
swaggboi has joined #ruby
SoF has quit [Ping timeout: 268 seconds]
gix- has joined #ruby
gix has quit [Disconnected by services]
ecuanaso has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
Rudd0 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
orbyt_ has joined #ruby
Swyper has joined #ruby
raul782 has joined #ruby
ChmEarl has quit [Quit: Leaving]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
openstruct has quit [Ping timeout: 240 seconds]
rmnull has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
raul782 has quit []
rmnull has quit [Quit: WeeChat 2.9]
ecuanaso has quit [Ping timeout: 240 seconds]
ByronJohnson has quit [Remote host closed the connection]
openstruct has joined #ruby
bairyn has joined #ruby
bitstalker has quit [Ping timeout: 260 seconds]
bitstalker has joined #ruby
pwnd_sfw99 has joined #ruby
pwnd_sfw9 has quit [Ping timeout: 260 seconds]
pwnd_sfw99 is now known as pwnd_sfw9
<cloud69> how do you guys feel about https://github.com/vifreefly/kimuraframework for scraping webpages?
<cloud69> overkill probably
bairyn has quit [Remote host closed the connection]
<cloud69> seems to do well with infinite scroll though
openstruct has quit [Ping timeout: 260 seconds]
_paul0 has joined #ruby
paul0 has quit [Remote host closed the connection]
MuffinPimp has quit [Quit: Goodbye.]
MuffinPimp has joined #ruby
tabakhase has quit [Ping timeout: 272 seconds]
bocaneri has joined #ruby
tabakhase has joined #ruby
gueorgui has quit [Ping timeout: 272 seconds]
gueorgui has joined #ruby
burgestrand has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
burgestrand has quit [Quit: burgestrand]
bairyn has joined #ruby
cadeskywalker has quit [Ping timeout: 265 seconds]
adu has quit [Quit: adu]
Swyper has quit [Remote host closed the connection]
cadeskywalker has joined #ruby
_whitelogger has joined #ruby
Retropikzel has joined #ruby
Retropikzel has quit [Remote host closed the connection]
Retropikzel has joined #ruby
Retropikzel has left #ruby [#ruby]
Retropikzel has joined #ruby
ur5us has joined #ruby
_whitelogger has joined #ruby
akem has joined #ruby
cnsvc has quit [Quit: WeeChat 2.9]
braincrash has joined #ruby
cd has joined #ruby
spk has quit [Quit: ZNC - http://znc.in]
spk has joined #ruby
spk has quit [Remote host closed the connection]
spk has joined #ruby
fandre1986 has joined #ruby
pwnd_sfw9 has quit [Ping timeout: 256 seconds]
iNs has quit [Ping timeout: 240 seconds]
iNs has joined #ruby
ujjain has quit [Ping timeout: 260 seconds]
pwnd_sfw9 has joined #ruby
pwnd_sfw9 is now known as pwnd_sfw
al2o3-cr has quit [Quit: WeeChat 2.9]
ur5us has quit [Ping timeout: 264 seconds]
rubydoc has quit [Ping timeout: 265 seconds]
phaul has quit [Ping timeout: 268 seconds]
phaul has joined #ruby
rubydoc has joined #ruby
rubydoc has quit [Ping timeout: 240 seconds]
phaul has quit [Ping timeout: 264 seconds]
rippa has joined #ruby
ur5us has joined #ruby
canton7_ has joined #ruby
canton7_ has quit [Client Quit]
rubydoc has joined #ruby
phaul has joined #ruby
Jnco has quit [Read error: Connection reset by peer]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
al2o3-cr has joined #ruby
SoF has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
phaul has quit [Ping timeout: 258 seconds]
rubydoc has quit [Ping timeout: 256 seconds]
ur5us has quit [Ping timeout: 264 seconds]
phaul has joined #ruby
phaul has quit [Ping timeout: 264 seconds]
rubydoc has joined #ruby
phaul has joined #ruby
roshanavand has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand_ is now known as roshanavand
rubydoc has quit [Ping timeout: 246 seconds]
rubydoc_ has joined #ruby
tpanarch1st has quit [Ping timeout: 256 seconds]
imode has quit [Ping timeout: 260 seconds]
jmcgnh has quit [Read error: Connection reset by peer]
jmcgnh has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 260 seconds]
roshanavand_ is now known as roshanavand
Emmanuel_Chanel has quit [Quit: Leaving]
Emmanuel_Chanel has joined #ruby
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
rubydoc_ has quit [Ping timeout: 240 seconds]
phaul has quit [Ping timeout: 260 seconds]
greengriminal has joined #ruby
greengriminal has quit [Client Quit]
ChmEarl has joined #ruby
rubydoc has joined #ruby
akem_ has joined #ruby
akem has quit [Ping timeout: 256 seconds]
rubydoc has quit [Ping timeout: 260 seconds]
rubydoc has joined #ruby
Swyper has joined #ruby
Swyper has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
iloveeveryfood has joined #ruby
<iloveeveryfood> hello everyone!
<iloveeveryfood> can someone explain to me why the code here: https://pastebin.com/LZQfT8ji returns false?
<iloveeveryfood> test and test2 are only different in lines 4/5 and 22/23
rubydoc has quit [Ping timeout: 246 seconds]
rubydoc has joined #ruby
<nakilon> Imagine there are class A and module B in Ruby stdlib, and I want to make class C < A that its instances first try to call the B methods with the same name and if it's a miss then call the inherited method of A
<nakilon> I can either 1) use method_missing and such 2) declare all the 100-200 methods in my C 3) declare only a few and expand when requested by someone who wants to use my gem
<nakilon> the case (1) will make the hell of inability to see method().source_location, you know; the (2) is just a lot of work that no one might use in future; the (3) -- people don't really want to use gems that have only one method no matter how much useful it is, they want to use gems that have megabytes of code in them
<nakilon> which should I coose?
<nakilon> *choose
Swyper has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
<nakilon> iloveeveryfood, the '{}' is a vector type of object -- the '=' operator copied not the whole object but only a reference to it; so both vars in result point to the same Hash, not two different ones
<iloveeveryfood> My question got answered somewhere else. So, no explanation needed anymore. Thanks!
iloveeveryfood has quit [Remote host closed the connection]
<nakilon> Hash and Array are vectors, Integer, True, False, Nil are scalars
rubydoc has quit [Ping timeout: 264 seconds]
<nakilon> ...
<apotheon> iloveeveryfood: When you assign like `res= tmp= {}` you're actually assigning the same hash reference to both.
<apotheon> err, damn
<apotheon> I was just typing the response to that.
bairyn is now known as ByronJohnson
<apotheon> Somehow, it got answered here *and* somewhere else while I was distracted by something someone said in meatspace.
rubydoc has joined #ruby
fandre1986 has quit [Quit: Connection closed]
Rudd0^ has joined #ruby
rubydoc_ has joined #ruby
rubydoc has quit [Remote host closed the connection]
Rudd0 has quit [Ping timeout: 260 seconds]
rubydoc_ has quit [Remote host closed the connection]
FastJack has quit [Ping timeout: 268 seconds]
FastJack has joined #ruby
rubydoc_ has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kilo`byte has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Kilo`byte has joined #ruby
pwnd_sfw has quit [Ping timeout: 264 seconds]
pwnd_sfw has joined #ruby
rubydoc_ has quit [Ping timeout: 246 seconds]
rubydoc_ has joined #ruby
Azure|dc has quit [Quit: Textual IRC Client: www.textualapp.com]
orbyt_ has joined #ruby
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
rubydoc_ has quit [Ping timeout: 272 seconds]
Azure has joined #ruby
rubydoc_ has joined #ruby
imode has joined #ruby
rubydoc_ has quit [Ping timeout: 265 seconds]
JohnB has joined #ruby
rubydoc_ has joined #ruby
Swyper has quit [Remote host closed the connection]
openstruct has joined #ruby
openstruct has joined #ruby
openstruct has quit [Ping timeout: 246 seconds]
rubydoc_ has quit [Ping timeout: 260 seconds]
Swyper has joined #ruby
fandre1986 has joined #ruby
mnemon has quit [Quit: brb]
Swyper has quit [Ping timeout: 264 seconds]
elcontrastador has joined #ruby
rubydoc_ has joined #ruby
mnemon has joined #ruby
rubydoc_ has quit [Ping timeout: 265 seconds]
troulouliou_div2 has joined #ruby
Swyper has joined #ruby
Swyper has quit [Ping timeout: 244 seconds]
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
troulouliou_div2 has quit [Ping timeout: 256 seconds]
troulouliou_div2 has joined #ruby
davispuh has joined #ruby
BlakSAM has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rubydoc_ has joined #ruby
akem_ has quit [Quit: Leaving]
greypack has joined #ruby
powerhouse has quit [Read error: Connection reset by peer]
powerhouse_ has joined #ruby
axe has joined #ruby
<nakilon> nvm, I guess Pathname is exactly what I wanted
TCZ has joined #ruby
fercell has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
roshanavand_ is now known as roshanavand
tpanarch1st has joined #ruby
BlakSAM has quit [Quit: leaving]
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
orbyt_ has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.9]
nofxx has quit [Remote host closed the connection]
orbyt_ has quit [Client Quit]
nofxx has joined #ruby
nofxx has quit [Remote host closed the connection]
al2o3-cr has joined #ruby
chouhoulis has joined #ruby
titanbiscuit has quit [Ping timeout: 265 seconds]
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
bvdw has joined #ruby
titanbiscuit has joined #ruby
TCZ has quit [Quit: Leaving]
fercell has quit [Quit: WeeChat 2.9]
kaivai has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
akem has joined #ruby
orbyt_ has joined #ruby
troulouliou_div2 has quit [Read error: Connection reset by peer]
chouhoulis has quit [Remote host closed the connection]
<splud> I have an array with many rows, and multiple columns. each row defines a hardware part id, and some binary images associated with it. Thing is, some part ids (rows) have multiple combinations of images.
<splud> I want to take those combinations and find all part ids that use them.
<apotheon> splud: You probably want to look at Array method documentation. Try https://ruby-doc.org/core-2.7.2/Array.html to find the right methods.
<splud> was creating a "simplified" pastebin of start end end arrays.
<apotheon> splud: The first thing that comes to mind for me as a likely useful method is Array#select.
<splud> oh, thanks pastebin, the big green PASTE button made it look like that was the make-it-so. "poof".
<apotheon> I usually just use sprunge.
<apotheon> (instead of pastebin)
<apotheon> http://sprunge.us/mP3Zsq <- example of a script that you can use with sprunge
<apotheon> Using that, you can just run one of these:
<apotheon> $ sprunge filename.rb
<apotheon> -> pastes the contents of filename.rb
<apotheon> $ sprunge
<apotheon> -> gives you the ability to type or paste text for it to upload to a new paste
<apotheon> $ head -n 30 | tail | sprunge
<apotheon> -> example of pasting part of a file, in this case lines 21-30
gigetoo has quit [Ping timeout: 272 seconds]
<splud> I don' paste example code so often <g>
<apotheon> Of course, this sprunge script is only really useful if you're comfortable doing stuff like this at a terminal.
<splud> I'm comfortable at a terminal, but this is made-up code to describe in simple terms a larger dataset which is very different. it's this basic relationship I'm trying to transform.
<splud> amendment to the pastebin: Hash[ a.map {|k| ["#{k[1]} #{k[2]}", k]} ]
<splud> basically gets me what I'd like, except for the 1:1 key:value resulting in the loss of the multiple values.
<splud> I'm sorta looking for a hasharray like thing; key:array
<apotheon> It looks like you want to #select where you have sub-arrays that #include? an arbitrary number of specified elements.
<splud> hasharray being a made-up construct, though might intersect someones project name
<apotheon> see the Array documentation I mentioned earlier for details about those methods.
<splud> I'll go with 'yes' <g>
<apotheon> Yes to what?
evdubs has quit [Quit: Leaving]
<splud> sub-arrays include specified elements. Except that if I'm iterating at the time, I'm going to see the same pair of elements multiple times.
<apotheon> I don't feel like you're really responding to what I said. Maybe I'm missing something.
<splud> if I iterate over a, when I get to the third row, I have the same, lets' call it "key pair".
evdubs has joined #ruby
<apotheon> At this point, I don't think we're communicating at all. I'll just leave this and move on, in case it helps:
<apotheon> > a.select {|e| e.include? '100' and e.include? 'foo' }
<apotheon> => [["A", "100", "foo"], ["B", "100", "foo"]]
<apotheon> simplistic, limited use-case example of something that could be generalized with more code
<apotheon> back to dealing with my domain transfers
<splud> sorry, investigating the select inside a each loop of a, that was the nudge
<splud> thank you.
<apotheon> welcome
DTZUZU has quit [Read error: Connection reset by peer]
<splud> an a.each do |ary| ... tmp = select { |e| ary[1] == e[1] and ary[2] == e[2] } ... is most of what I need.
<splud> (obviously abbreviated here)
<splud> the select is inside a conditional for whether the output hash already has the key, since if it does, that iteration of the pair has already been performed by an earlier occurrence.
fandre1986 has quit [Quit: Connection closed]
reaVer has quit [Quit: Lost terminal]
reaVer has joined #ruby
reaVer has quit [Client Quit]
reaVer has joined #ruby
TCZ has joined #ruby
roshanavand has quit [Quit: Quitting...]
ruurd has quit [Quit: ZZZzzz…]
ruurd has joined #ruby
axe has quit [Ping timeout: 264 seconds]
TCZ has quit [Quit: Leaving]
braincrash has quit [Ping timeout: 260 seconds]
_aeris has joined #ruby
_aeris_ has quit [Remote host closed the connection]
_aeris is now known as _aeris_