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>
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.
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]
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!
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
<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
<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]
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?
<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 ?
<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…]