havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.2, 2.5.5, 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!
alexeev has joined #ruby
nowhere_man has joined #ruby
Swyper has quit [Ping timeout: 252 seconds]
alexeev has quit [Ping timeout: 252 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Nicmavr has joined #ruby
a1ph4g33k has joined #ruby
naught-fowl has quit [Quit: This computer has gone to sleep]
Tempesta_ has joined #ruby
orbyt_ has joined #ruby
Tempesta__ has joined #ruby
jottr has joined #ruby
Tempesta has quit [Ping timeout: 250 seconds]
a1ph4g33k has quit [Quit: leaving]
Tempesta_ has quit [Ping timeout: 272 seconds]
ellcs has quit [Ping timeout: 252 seconds]
Tempesta__ has quit [Client Quit]
naught-fowl has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
Tempesta has joined #ruby
tpanarch1st has quit [Quit: Thanks for your help, nice to see you, take care.]
naught-fowl has quit [Client Quit]
naught-fowl has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
naught-fowl has quit [Client Quit]
xco has quit [Quit: xco]
jottr has joined #ruby
naught-fowl has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
xco has joined #ruby
naught-fowl has quit [Client Quit]
naught-fowl has joined #ruby
naught-fowl has quit [Client Quit]
bmurt has joined #ruby
jottr has joined #ruby
naught-fowl has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
naught-fowl has quit [Quit: This computer has gone to sleep]
dar123 has joined #ruby
dar123 has quit [Client Quit]
jottr has joined #ruby
alexeev has joined #ruby
cthulchu has quit [Ping timeout: 246 seconds]
naught-fowl has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
naught-fowl has quit [Client Quit]
bambanx has joined #ruby
dar123 has joined #ruby
<xco> i have two arrays like this [a, b], [c, d] how do i get [c, a, d, b]?
<leftylink> if there were to be a built in method for it, it would be called something like "interleave". you might try that as a search term and see what happens (I don't know what will happen off the top of my head)
dionysus69 has quit [Ping timeout: 246 seconds]
<sherlime> .zip.flatten maybe?
naught-fowl has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
jottr has joined #ruby
<xco> looks like it :)
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink> under no circumstances confuse the mesh with the interleave operator
<leftylink> except in confusing circumstances
naught-fowl has quit [Client Quit]
krawchyk has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
wald0 has quit [Quit: Lost terminal]
<leftylink> hmm. kinda makes you wish there were a serious section and a srs section
<sherlime> yeah, unfortunately it was the only relevant thing i could find with a mesh operator
<leftylink> gotta put "ain't" for !=
<leftylink> consternation at the fact that ~> is called both pessimistic and optimistic
<leftylink> :)
<leftylink> that is my consterned face
<leftylink> ... uh oh. was the correct english word consternated instead
jottr has joined #ruby
naught-fowl has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
xco has quit [Quit: xco]
AMDPhenomX4Q has joined #ruby
xco has joined #ruby
naught-fowl has quit [Client Quit]
naught-fowl has joined #ruby
Swyper has joined #ruby
<AMDPhenomX4Q> So if I wanted to grab a webpage every 5 seconds to check for changes in a leaderboard, make an active job and loop it? Or is a new thread more appropriate.
jottr has joined #ruby
Swyper has quit [Ping timeout: 244 seconds]
naught-fowl has quit [Quit: This computer has gone to sleep]
jottr has quit [Ping timeout: 244 seconds]
gnufied has quit [Read error: Connection reset by peer]
naught-fowl has joined #ruby
naught-fowl has quit [Client Quit]
Swyper has joined #ruby
naught-fowl has joined #ruby
naught-fowl has quit [Client Quit]
naught-fowl has joined #ruby
naught-fowl has quit [Client Quit]
jottr has joined #ruby
naught-fowl has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
naught-fowl has quit [Client Quit]
xco has quit [Quit: xco]
naught-fowl has joined #ruby
naught-fowl has quit [Client Quit]
alexeev has quit [Remote host closed the connection]
jottr has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
cthulchu_ has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
naught-fowl has joined #ruby
naught-fowl has quit [Client Quit]
<havenwood> AMDPhenomX4Q: You could just use AJAX with polling or long-polling every 5 seconds if that's really what you want.
<havenwood> AMDPhenomX4Q: MessageBus would be a good abstraction for that: https://github.com/SamSaffron/message_bus
<havenwood> AMDPhenomX4Q: With Action Cable, you could push the leaderboard changes from an Active Job worker on event without polling.
<havenwood> AMDPhenomX4Q: MessageBus polling for the work to be done or the worker pushing the event to an Action Cable channel both work.
daqing has joined #ruby
ams__ has quit [Quit: Connection closed for inactivity]
cthulchu_ has quit [Ping timeout: 252 seconds]
<havenwood> AMDPhenomX4Q: If you want to use Active Job, but just want Threading and no Redis, SuckerPunch does just that: https://github.com/brandonhilkert/sucker_punch
<havenwood> AMDPhenomX4Q: If you're using Heroku or such, it lets you do Active Job workers "on Dyno" with Threads.
jottr has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jmcgnh has quit [Read error: Connection reset by peer]
tau has joined #ruby
jmcgnh has joined #ruby
jottr has joined #ruby
rubydoc has quit [Ping timeout: 245 seconds]
phaul has quit [Ping timeout: 245 seconds]
phaul has joined #ruby
rubydoc has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
evdubs has joined #ruby
agent_white has quit [Quit: brb]
agent_white has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jmcgnh has quit [Ping timeout: 245 seconds]
jmcgnh_ has joined #ruby
jottr has joined #ruby
jmcgnh_ is now known as jmcgnh
renich_ has quit [Quit: renich_]
jottr has quit [Ping timeout: 272 seconds]
Swyper has quit [Remote host closed the connection]
jottr has joined #ruby
bambanx has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
mangold has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
ur5us has quit [Remote host closed the connection]
bambanx has joined #ruby
bambanxx has joined #ruby
bambanx has quit [Client Quit]
braincrash has quit [Quit: bye bye]
ur5us has joined #ruby
braincrash has joined #ruby
akosednar has quit [Ping timeout: 255 seconds]
ur5us has quit [Ping timeout: 268 seconds]
krawchyk has quit [Quit: krawchyk]
akosednar has joined #ruby
akosednar has joined #ruby
akosednar has quit [Changing host]
jottr has joined #ruby
lytol has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 268 seconds]
daqing has left #ruby [#ruby]
jottr has joined #ruby
epochwolf has quit [Ping timeout: 250 seconds]
epochwolf has joined #ruby
Pillus has quit [Ping timeout: 250 seconds]
sjm has quit [Ping timeout: 240 seconds]
coffeejunk has quit [Ping timeout: 240 seconds]
sjm has joined #ruby
coffeejunk has joined #ruby
mcspud has quit [Ping timeout: 268 seconds]
JJonah has quit [Ping timeout: 268 seconds]
kspencer has quit [Ping timeout: 268 seconds]
zipkid has quit [Ping timeout: 250 seconds]
jtperreault has quit [Ping timeout: 250 seconds]
ctp has quit [Ping timeout: 268 seconds]
nuck has quit [Ping timeout: 268 seconds]
twe4ked has quit [Ping timeout: 268 seconds]
Pillus has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
JJonah has joined #ruby
ctp has joined #ruby
nuck has joined #ruby
zipkid has joined #ruby
kspencer has joined #ruby
twe4ked has joined #ruby
jtperreault has joined #ruby
mcspud has joined #ruby
jottr has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 268 seconds]
dar123 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
alexeev has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
_whitelogger has joined #ruby
jottr has joined #ruby
bambanxx has quit [Quit: Leaving]
sauvin has joined #ruby
CrazyEddy has joined #ruby
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 245 seconds]
jottr has quit [Ping timeout: 268 seconds]
Devalo has joined #ruby
Swyper has quit [Remote host closed the connection]
dionysus69 has joined #ruby
Devalo has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
alexeev has quit [Remote host closed the connection]
alexeev has joined #ruby
t0x has quit [Quit: Connection closed for inactivity]
jottr has quit [Ping timeout: 268 seconds]
alexeev_ has joined #ruby
imadper has joined #ruby
alexeev has quit [Ping timeout: 244 seconds]
laaron- has quit [Remote host closed the connection]
conta has joined #ruby
laaron has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
Swyper has joined #ruby
Swyper has quit [Ping timeout: 272 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
waheedi has joined #ruby
reber has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
tau has quit [Remote host closed the connection]
dionysus69 has joined #ruby
alexeev_ has quit [Remote host closed the connection]
alexeev has joined #ruby
mangold has joined #ruby
aufi_ has joined #ruby
postmodern has joined #ruby
waheedi has quit [Quit: waheedi]
alexeev has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
alexeev has joined #ruby
dar123 has quit [Quit: Textual IRC Client: www.textualapp.com]
za1b1tsu has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
clemens3_ has quit [Ping timeout: 244 seconds]
alexeev has quit [Remote host closed the connection]
alexeev has joined #ruby
hahuang6| has quit [Quit: ZNC 1.7.1 - https://znc.in]
hahuang6- has joined #ruby
clemens3_ has joined #ruby
andikr has joined #ruby
Dbugger has joined #ruby
reber has quit [Remote host closed the connection]
_joes_ has joined #ruby
cd has quit [Quit: cd]
nowhere_man has quit [Ping timeout: 252 seconds]
rindolf has joined #ruby
arekushi has joined #ruby
jottr has joined #ruby
_joes_ has quit [Ping timeout: 244 seconds]
aqd_ has joined #ruby
waheedi has joined #ruby
Swyper has joined #ruby
aqd has quit [Ping timeout: 245 seconds]
Swyper has quit [Ping timeout: 244 seconds]
Swyper has joined #ruby
Swyper has quit [Ping timeout: 272 seconds]
stryek has quit [Quit: Connection closed for inactivity]
schleppel has joined #ruby
agent_white has quit [Quit: leaving]
vondruch has joined #ruby
mikecmpbll has joined #ruby
claudiuinberlin has joined #ruby
claudiuinberlin has quit [Client Quit]
dhollinger has quit [Ping timeout: 246 seconds]
teclator_ has joined #ruby
Swyper has joined #ruby
rindolf has quit [Read error: Connection reset by peer]
teclator_ is now known as teclator_gc
Swyper has quit [Remote host closed the connection]
teclator has quit [Disconnected by services]
teclator_gc is now known as teclator
teclator_ has joined #ruby
alem0lars has joined #ruby
kyrylo has joined #ruby
yqt has joined #ruby
dhollinger has joined #ruby
_joes_ has joined #ruby
nemesit|znc has quit [Read error: Connection reset by peer]
Dbugger has quit [Remote host closed the connection]
marens_ is now known as marens
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
postmodern has quit [Quit: Leaving]
evdubs has quit [Remote host closed the connection]
evdubs has joined #ruby
agent_white has joined #ruby
nemesit|znc has joined #ruby
evdubs has quit [Remote host closed the connection]
evdubs has joined #ruby
Swyper has joined #ruby
hightower2 has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
Swyper has quit [Ping timeout: 268 seconds]
mangold has joined #ruby
ferr has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
ellcs has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
_joes_ has quit [Ping timeout: 272 seconds]
waheedi has quit [Quit: waheedi]
_joes_ has joined #ruby
conta has quit [Ping timeout: 268 seconds]
yqt has quit [Ping timeout: 252 seconds]
Emmanuel_Chanel has quit [Ping timeout: 252 seconds]
olspookishmagus has quit [Quit: All for nothing]
Emmanuel_Chanel has joined #ruby
JJonah has quit [Ping timeout: 252 seconds]
ctp has quit [Ping timeout: 252 seconds]
sjm has quit [Ping timeout: 252 seconds]
sjm has joined #ruby
JJonah has joined #ruby
ctp has joined #ruby
Cthulu201 has quit [Remote host closed the connection]
Cthulu201 has joined #ruby
_joes_ has quit [Ping timeout: 252 seconds]
CodingFrisson has joined #ruby
<CodingFrisson> hello, could someone help me identify the spots where this little code could be shrinked even more? https://kopy.io/UBW57 it's for a small competition against my buddy :)
<CodingFrisson> no need to be precise, just any hint would do
<phaul> .count
reber has joined #ruby
<CodingFrisson> hm, count vs size; size is more concise :)
<CodingFrisson> but ok
<phaul> nope. count with block
<phaul> instead of reject
<CodingFrisson> that's amazing thanks
<phaul> np :)
sylario has joined #ruby
evdubs has quit [Remote host closed the connection]
<sylario> Did something changed in 2.4 around regexp ? this code do not seems to works anymore : "05/01/2018" =~ /\A\d{1,2}\/\d{4}\z/
waheedi has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 272 seconds]
<phaul> &23>> "05/01/2018" =~ /\A\d{1,2}\/\d{4}\z/
agent_white has quit [Quit: bbl]
<rubydoc> # => nil (https://carc.in/#/r/6jq9)
<phaul> &24>> "05/01/2018" =~ /\A\d{1,2}\/\d{4}\z/
<rubydoc> # => nil (https://carc.in/#/r/6jqa)
<phaul> looks the same to me
<sylario> it was returning true, some time ago
alem0lars has quit [Ping timeout: 244 seconds]
<sylario> ho wait
<sylario> my bad it was expecting "05/1212"
schleppel has left #ruby ["Konversation terminated!"]
jrafanie has joined #ruby
conta has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron- has joined #ruby
Emmanuel_Chanel has joined #ruby
sleetdrop has joined #ruby
_joes_ has joined #ruby
naught-fowl has joined #ruby
ldnunes has joined #ruby
mangold has joined #ruby
naught-fowl has quit [Client Quit]
_joes_ has quit [Ping timeout: 244 seconds]
jottr has quit [Ping timeout: 268 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has joined #ruby
_joes_ has joined #ruby
Swyper has joined #ruby
Swyper has quit [Ping timeout: 272 seconds]
alexeev has quit [Remote host closed the connection]
strmpnk_ has joined #ruby
bvdw6 has joined #ruby
WA9ACE_ has joined #ruby
Iambchop_ has joined #ruby
hhzza_ has joined #ruby
Net_ has joined #ruby
fowlduck_ has joined #ruby
asio_ has joined #ruby
_joes_ has quit [Ping timeout: 268 seconds]
matthewd_ has joined #ruby
russt_ has joined #ruby
jacksoow_ has joined #ruby
Jello_Raptor_ has joined #ruby
TheMoonMaster has joined #ruby
strmpnk has quit [*.net *.split]
jonjitsu has quit [*.net *.split]
asio has quit [*.net *.split]
matthewd has quit [*.net *.split]
e2 has quit [*.net *.split]
hhzza has quit [*.net *.split]
infernix has quit [*.net *.split]
Iambchop has quit [*.net *.split]
TheMoonMaster_ has quit [*.net *.split]
fowlduck has quit [*.net *.split]
goez has quit [*.net *.split]
WA9ACE has quit [*.net *.split]
Net has quit [*.net *.split]
russt has quit [*.net *.split]
jacksoow has quit [*.net *.split]
Jello_Raptor has quit [*.net *.split]
bvdw has quit [*.net *.split]
Iambchop_ is now known as Iambchop
matthewd_ is now known as matthewd
Jello_Raptor_ is now known as Jello_Raptor
strmpnk_ is now known as strmpnk
WA9ACE_ is now known as WA9ACE
Net_ is now known as Net
hhzza_ is now known as hhzza
fowlduck_ is now known as fowlduck
goez has joined #ruby
ferr has quit [Quit: WeeChat 2.4]
lightstalker has quit [Ping timeout: 255 seconds]
bmurt has joined #ruby
ldnunes has quit [Ping timeout: 244 seconds]
i1nfusion has quit [Remote host closed the connection]
lightstalker has joined #ruby
i1nfusion has joined #ruby
jonjitsu has joined #ruby
e4 has joined #ruby
e4 is now known as e2
infernix has joined #ruby
aqd_ has quit [Quit: Leaving]
ldnunes has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
alem0lars has joined #ruby
mikecmpbll has joined #ruby
hightower2 has quit [Ping timeout: 245 seconds]
lucasb has joined #ruby
hightower2 has joined #ruby
aqd has joined #ruby
xco has joined #ruby
ferr has joined #ruby
i1nfusion has quit [Remote host closed the connection]
nowhere_man has joined #ruby
i1nfusion has joined #ruby
xco has quit [Quit: xco]
luminousnine- is now known as luminousnine
jottr has joined #ruby
Sina has joined #ruby
D9 has quit [Ping timeout: 245 seconds]
jottr_ has joined #ruby
evdubs has joined #ruby
jcalla has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
nowhere_man has quit [Ping timeout: 252 seconds]
nowhere_man has joined #ruby
_joes_ has joined #ruby
rippa has joined #ruby
jottr_ has quit [Quit: WeeChat 2.4]
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
hightower2 has quit [Ping timeout: 244 seconds]
hightower2 has joined #ruby
xco has joined #ruby
Swyper has joined #ruby
fox_mulder_cp has quit [Ping timeout: 250 seconds]
Swyper has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
wickdbloodfart has joined #ruby
<wickdbloodfart> hey all. having a problem with datetime. i have this string "May 13, 2014 8:29:38 AM" that i'd like to parse with DateTime.strptime("May 13, 2014 8:29:38 AM", '%b %-d, %Y %l:%M:%S %p'). i get an 'invalid date' error, but i don't know why. any help is appreciated. thanks!
Swyper has quit [Ping timeout: 268 seconds]
jrafanie has joined #ruby
apparition has joined #ruby
xco has quit [Quit: xco]
griffindy has joined #ruby
<phaul> &>> require 'date'; DateTime.parse('May 13, 2014 8:29:38 AM').strftime('%b %-d, %Y %l:%M:%S %p')
<rubydoc> # => "May 13, 2014 8:29:38 AM" (https://carc.in/#/r/6js5)
naught-fowl has joined #ruby
<phaul> hm.
<phaul> &>> require 'date'; DateTime.strptime(DateTime.parse('May 13, 2014 8:29:38 AM').strftime('%b %-d, %Y %l:%M:%S %p'), '%b %-d, %Y %l:%M:%S %p')
<rubydoc> stderr: -e:2:in `strptime': invalid date (ArgumentError) (https://carc.in/#/r/6js9)
<wickdbloodfart> it's strange... DateTime.parse("May 13, 2014 8:29:38 AM") returns Tue, 17 Jun 2014 22:04:50 +0000
andikr has quit [Remote host closed the connection]
<phaul> donno. but I would have expected DateTime.strptime(x.strftime(fmt), fmt) to be idenpotent
<phaul> apparently not
nowhere_man has quit [Ping timeout: 244 seconds]
xco has joined #ruby
<wickdbloodfart> hmmm, strange. i'll keep plugging away. thank you for taking a peek. i'll report back if i get it working the way i want.
wickdbloodfart has quit [Quit: Textual IRC Client: www.textualapp.com]
wickedbloodfart has joined #ruby
gnufied has joined #ruby
xco has quit [Quit: xco]
alexeev has joined #ruby
alexeev has quit [Remote host closed the connection]
alexeev has joined #ruby
alexeev_ has joined #ruby
alexeev has quit [Ping timeout: 246 seconds]
Swyper has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
Rapture has joined #ruby
apparition has quit [Quit: Bye]
<wickedbloodfart> ahh, silly mistake. this api i'm using isn't returning the dates in a consistent order. the dates are close enough where it was causing some confusion. thanks for your help!
<phaul> np.
alexeev_ has quit [Remote host closed the connection]
waheedi has quit [Quit: waheedi]
_joes_ has quit [Ping timeout: 245 seconds]
conta has quit [Ping timeout: 268 seconds]
_joes_ has joined #ruby
ljarvis has quit [Ping timeout: 246 seconds]
agent_white has joined #ruby
duderonomy has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
grilix has joined #ruby
mozzarella is now known as EmployedPerson
catbusters has joined #ruby
EmployedPerson is now known as mozzarella
_joes_ has quit [Ping timeout: 245 seconds]
polishdub has joined #ruby
Swyper has quit [Ping timeout: 246 seconds]
orbyt_ has joined #ruby
ferr has quit [Quit: WeeChat 2.4]
SeepingN has joined #ruby
waheedi has joined #ruby
grilix has quit [Read error: Connection reset by peer]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
waheedi has quit [Quit: Peace be upon all messengers]
t0x has joined #ruby
mangold has joined #ruby
xco has joined #ruby
grilix has joined #ruby
tekniq has joined #ruby
<xco> i have an array like this [departure1, arrival1, departure2, arrival2, departure3, arrival3] of times of depature and arrival at an aiport i want to find the time gap between arrival2 and depature2 of all elements in the array. how can i achieve this? i’m not sure how to iteratively do depature2-arrival1 … through the array. i’d appreciate some help
<xco> the array can also be represented as [[departure1, arrival1], [departure2, arrival2], [departure3, arrival3]] whichever way will be easier to work with
<phaul> xco look at each_cons
<phaul> &ri Enumerable#each_cons
<phaul> the second representation combined with each_cons is easier
nowhere_man has quit [Ping timeout: 255 seconds]
<xco> phaul: the second combination and then use each_cons(2)? that won’t work
<havenwood> &>> [[1, 2], [3, 5], [8, 13], [21, 34]].map { |arrival, departure| [[arrival, departure], departure - arrival] }
<rubydoc> # => [[[1, 2], 1], [[3, 5], 2], [[8, 13], 5], [[21, 34], 13]] (https://carc.in/#/r/6jub)
<havenwood> xco: you only care about the time between arrivals and departures? so you don't care about the time between departures and the next arrival?
<phaul> probably I have misunderstood the task then
<phaul> I thought you are interested in how much time you spend in transit and not in the air
<havenwood> phaul: you might be right
aufi_ has quit [Remote host closed the connection]
<havenwood> xco: what is it you want again?
<xco> havenwood: i only care about the time between arrival of flight A and the depature of flight B. but data is represented as A[departure, arrival] B[departure, arrival]
<havenwood> xco: could you should example data with the desired result?
mangold has quit [Quit: This computer has gone to sleep]
<xco> so i want to know time left between when i arrival with flight A until my next flight B’s departure
<xco> havenwood: yeah sure
<havenwood> sounds like phaul interpreted it right
<havenwood> &>> [[1, 2], [3, 5], [8, 13], [21, 34]].each_cons(2).map { |(_, departure), (arrival, _)| arrival - departure }
<rubydoc> # => [1, 3, 8] (https://carc.in/#/r/6juc)
<xco> ooo look like it close or is what i’ve been trying out
<xco> i showed an example anyway
yqt has joined #ruby
cthulchu_ has joined #ruby
mangold has joined #ruby
marmotini_ has joined #ruby
marmotini_ has quit [Killed (freenode-connect (The application you are using is no longer permitted to connect to the freenode network. For questions, contact kline@freenode.net))]
i1nfusion has quit [Remote host closed the connection]
i1nfusion has joined #ruby
clemens3_ has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
stryek has joined #ruby
Swyper has quit [Ping timeout: 255 seconds]
alexeev has joined #ruby
orbyt_ has joined #ruby
alexeev has quit [Ping timeout: 268 seconds]
bambanx has joined #ruby
conta has joined #ruby
orbyt_ has quit [Ping timeout: 246 seconds]
bambanx has quit [Client Quit]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
tau has joined #ruby
hightower2 has quit [Ping timeout: 252 seconds]
hightower2 has joined #ruby
hightower2 has quit [Ping timeout: 245 seconds]
hightower2 has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
ellcs has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
hightower2 has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
hightower2 has joined #ruby
DTZUZO has joined #ruby
ellcs has joined #ruby
mangold has joined #ruby
nowhere_man has joined #ruby
_joes_ has joined #ruby
hightower2 has quit [Ping timeout: 246 seconds]
lytol has joined #ruby
hightower2 has joined #ruby
nowhere_man has quit [Ping timeout: 250 seconds]
sauvin has quit [Remote host closed the connection]
ellcs has quit [Ping timeout: 246 seconds]
Dbugger has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
_joes_ has quit [Ping timeout: 246 seconds]
<havenwood> Stranger Things ^ on Sonic Pi
orbyt_ has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrafanie has joined #ruby
adgtl has quit [Quit: EliteBNC - http://elitebnc.org (Auto-Removal: idle account/not being used)]
KeyJoo has joined #ruby
CodingFrisson has quit [Quit: Leaving]
reber has quit [Remote host closed the connection]
poguez_ has joined #ruby
fanta7531 has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
hightower2 has quit [Ping timeout: 250 seconds]
hightower2 has joined #ruby
zachk has joined #ruby
grilix has quit [Ping timeout: 246 seconds]
cd has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
mikecmpbll has joined #ruby
TomyWork has quit [Remote host closed the connection]
bambanx has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.4]
al2o3-cr has joined #ruby
gregf_ has quit [Ping timeout: 256 seconds]
bambanx has quit [Ping timeout: 246 seconds]
renich has joined #ruby
grilix has joined #ruby
sjm is now known as sjmbach
laaron has joined #ruby
laaron- has quit [Remote host closed the connection]
t0x has quit [Quit: Connection closed for inactivity]
cthulchu_ has quit [Ping timeout: 268 seconds]
alem0lars has quit [Ping timeout: 272 seconds]
jrafanie_ has joined #ruby
jrafanie_ has quit [Read error: Connection reset by peer]
jrafanie has quit [Ping timeout: 245 seconds]
jrafanie has joined #ruby
pietia has joined #ruby
<pietia> morning!
orbyt_ has quit [Ping timeout: 250 seconds]
<havenwood> g'mornin'!
Swyper has joined #ruby
TomyLobo has joined #ruby
t0x has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
ellcs has quit [Ping timeout: 268 seconds]
Swyper_ has joined #ruby
Swyper has quit [Read error: Connection reset by peer]
naught-fowl has quit [Quit: This computer has gone to sleep]
naught-fowl has joined #ruby
KeyJoo has quit [Quit: KeyJoo]
cthulchu_ has joined #ruby
<duderonomy> Is there a way to force the display of the banner as if OptionParse.new block parse failed? My goal is to force a display of the banner (usage string) when a position parameter is not present, e.g. ARGV[1] == nil.
Devalo has joined #ruby
pietia has quit [Quit: This computer has gone to sleep]
bambanx has joined #ruby
gix has joined #ruby
Swyper_ has quit [Remote host closed the connection]
Swyper has joined #ruby
<havenwood> duderonomy: an OptionParser::InvalidArgument?
<havenwood> duderonomy: here's one way to handle a missing argument: https://gist.github.com/havenwood/02123198a79447543a3ea053e7e592fd#file-paint-L33-L34
bambanx has quit [Ping timeout: 255 seconds]
<duderonomy> thanks havenwood. I will look into that
<havenwood> duderonomy: if it's really a parse error, more like: https://gist.github.com/havenwood/02123198a79447543a3ea053e7e592fd#file-paint-L21
<havenwood> duderonomy: no, you're welcome.
<havenwood> no prob**
<havenwood> >.>
<duderonomy> I guess there is a little bit of expertise required to make this happen; that is for the usage banner message to appear. So far I have only managed to error out in a ugly way with "invalid argument: (OptionParser::InvalidArgument)" which is to be expected. :-)
<duderonomy> I'll do some reading. Thanks for the pointer for sure!
ericwood_ has joined #ruby
wickedbloodfart has quit [Quit: wickedbloodfart]
darkxploit has joined #ruby
<darkxploit> Hello guys. I have a package download with a gemfile in it. How do i install it ?
Eiam has quit [Quit: Textual IRC Client: www.textualapp.com]
<darkxploit> its a package download from source
<darkxploit> i want to compile it and install it
ericwood_ has left #ruby [#ruby]
fanta7531 has quit [Quit: fanta7531]
themsay has quit [Read error: Connection reset by peer]
i1nfusion has quit [Remote host closed the connection]
themsay has joined #ruby
i1nfusion has joined #ruby
conta has quit [Quit: conta]
naught-fowl has quit [Quit: This computer has gone to sleep]
orbyt_ has joined #ruby
zleap has joined #ruby
naught-fowl has joined #ruby
<havenwood> darkxploit: gem install bundler && bundle
<havenwood> darkxploit: or if it's not Rails: gem install -g
<havenwood> darkxploit: or Ruby 2.6+: bundle
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
<havenwood> TL;DR: gem install bundler && bundle
renich has quit [Remote host closed the connection]
johnny56 has quit [Changing host]
johnny56 has joined #ruby
darkxploit has quit [Quit: Page closed]
naught-fowl has quit [Quit: This computer has gone to sleep]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
naught-fowl has joined #ruby
bambanx has joined #ruby
hightower2 has quit [Changing host]
hightower2 has joined #ruby
naught-fowl has quit [Client Quit]
naught-fowl has joined #ruby
Devalo has quit [Remote host closed the connection]
tdy has joined #ruby
Devalo has joined #ruby
tdy has quit [Ping timeout: 250 seconds]
Devalo has quit [Ping timeout: 250 seconds]
yqt has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby
kyrylo has joined #ruby
ldnunes has quit [Quit: Leaving]
naught-fowl has quit [Quit: This computer has gone to sleep]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
t0x has quit [Quit: Connection closed for inactivity]
dionysus69 has quit [Ping timeout: 252 seconds]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
renich has joined #ruby
ellcs has joined #ruby
<zenspider> duderonomy: I answered your question on the list... did that help?
Brainium has joined #ruby
ellcs has quit [Remote host closed the connection]
ellcs has joined #ruby
bambanxx has joined #ruby
bonhoeffer has joined #ruby
Dbugger has quit [Ping timeout: 250 seconds]
bambanx has quit [Ping timeout: 250 seconds]
Brainium has quit [Quit: Konversation terminated!]
xco_ has joined #ruby
grilix has quit [Ping timeout: 250 seconds]
xco has quit [Ping timeout: 255 seconds]
xco_ is now known as xco
bonhoeffer has quit [Ping timeout: 256 seconds]
<duderonomy> Thx zenspider! That helped.
zleap has quit [Quit: WeeChat 1.6]
lucasb has quit [Quit: Connection closed for inactivity]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Fernando-Basso has joined #ruby
orbyt_ has joined #ruby
catbusters has quit [Quit: Connection closed for inactivity]
bambanxx has quit [Ping timeout: 250 seconds]
alexeev has joined #ruby
alexeev has quit [Ping timeout: 250 seconds]
ur5us has quit [Remote host closed the connection]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
polishdub has quit [Quit: leaving]
<duderonomy> Thx for the help, folks. Finally wrapped my head around optparse. Distilled my needs down to this: https://dpaste.de/SyV9
<duderonomy> the exit code was a helpful bonus that I needed too
<sherlime> duderonomy: just fyi, you can stick the .parse! right after the end
<sherlime> do ... end.parse!
t0x has joined #ruby
<duderonomy> I saw that too. So functional <grin>. I did not know if it was still ok if I was assigning to the label 'parser'. I'll test and go with that.
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
tdy has joined #ruby
xco_ has joined #ruby
tfitts has joined #ruby
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
xco has quit [Ping timeout: 250 seconds]
xco_ is now known as xco
dviola has joined #ruby
tekniq has quit [Quit: Textual IRC Client: www.textualapp.com]
houhoulis has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
wald0 has joined #ruby
ellcs has quit [Ping timeout: 246 seconds]