MrCrackPot has quit [Remote host closed the connection]
fig-le-deunch has joined #ruby
jenrzzz has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
jenrzzz has quit [Ping timeout: 245 seconds]
fig-le-deunch has quit [Quit: Konversation terminated!]
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ruby
bitwinery has quit [Read error: Connection reset by peer]
bitwinery has joined #ruby
bitwinery has quit [Read error: Connection reset by peer]
bitwinery has joined #ruby
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ruby
gix has joined #ruby
bitwinery has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
bitwinery has joined #ruby
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ruby
bitwinery has quit [Read error: Connection reset by peer]
bitwinery has joined #ruby
bitwinery has quit [Read error: Connection reset by peer]
bitwinery has joined #ruby
bitwinery has quit [Read error: Connection reset by peer]
conta has joined #ruby
bitwinery has joined #ruby
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ruby
bitwinery has quit [Excess Flood]
bitwinery has joined #ruby
bitwinery has quit [Read error: Connection reset by peer]
bitwinery has joined #ruby
Skaterhaym has joined #ruby
bitwinery has quit [Read error: Connection reset by peer]
Skaterhaym has quit [Excess Flood]
Skaterhaym has joined #ruby
Skaterhaym has quit [Max SendQ exceeded]
sauvin has joined #ruby
Skaterhaym has joined #ruby
sauvin has quit [Max SendQ exceeded]
sauvin has joined #ruby
Skaterhaym has quit [Read error: Connection reset by peer]
al2o3-cr has quit [Quit: WeeChat 2.6]
rippa has joined #ruby
al2o3-cr has joined #ruby
evdubs has quit [Remote host closed the connection]
evdubs has joined #ruby
xco has quit [Quit: xco]
schne1der has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
conta has quit [Ping timeout: 276 seconds]
conta has joined #ruby
fphilipe has joined #ruby
xco has joined #ruby
jenrzzz has joined #ruby
fphilipe has quit [Ping timeout: 264 seconds]
_mossplix has joined #ruby
dionysus69 has joined #ruby
schne1der has quit [Ping timeout: 276 seconds]
_mossplix has quit [Remote host closed the connection]
elphe has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
conta has quit [Ping timeout: 240 seconds]
cnsvc_ has quit [Ping timeout: 260 seconds]
conta has joined #ruby
cnsvc_ has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
bambanx has joined #ruby
gix has quit [Ping timeout: 240 seconds]
_mossplix has joined #ruby
fphilipe has joined #ruby
xco_ has joined #ruby
xco has quit [Ping timeout: 240 seconds]
xco_ is now known as xco
banisterfiend has joined #ruby
dbugger has joined #ruby
dbugger has quit [Client Quit]
dbugger has joined #ruby
blackmesa has joined #ruby
rbanffy has quit [Quit: rbanffy]
duderono_ has joined #ruby
conta has quit [Ping timeout: 245 seconds]
Intelo has joined #ruby
duderonomy has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
Intelo has quit [Remote host closed the connection]
_mossplix has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 240 seconds]
Cyrus has quit [Ping timeout: 240 seconds]
_mossplix has joined #ruby
Cyrus has joined #ruby
krillbat has joined #ruby
conta has joined #ruby
blackmesa has quit [Quit: WeeChat 2.6]
conta has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
bambanx has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
kyrylo has joined #ruby
conta has joined #ruby
za1b1tsu has joined #ruby
conta has quit [Ping timeout: 264 seconds]
elphe has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
schne1der has joined #ruby
elphe has joined #ruby
xco has quit [Quit: xco]
_mossplix has quit [Remote host closed the connection]
_mossplix has joined #ruby
xco has joined #ruby
suukim has joined #ruby
mikecmpbll has joined #ruby
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has joined #ruby
fig-le-deunch has joined #ruby
sdfds has joined #ruby
fanta1 has joined #ruby
sdfds has quit [Remote host closed the connection]
elphe has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
sdfds has joined #ruby
blackmesa has joined #ruby
dasher00 has joined #ruby
fig-le-deunch has quit [Quit: Konversation terminated!]
FastJack has quit [Ping timeout: 264 seconds]
fanta1 has quit [Quit: fanta1]
zone_31 has joined #ruby
xco has quit [Quit: xco]
gix has joined #ruby
<zone_31>
Hi! i am an total beginner at ruby, and i have been tasked with learning ruby on rails. Where should i begin, assuming that i have programmed 8+ years, and i have just created my first .rb file?
Ven`` has joined #ruby
Ven`` has quit [Client Quit]
<phaul>
zone_31: I would quickly go through Ruby, then all the syntax you see in rails will make a lot more sense. If you have programmed for 8+ years going through something like the pickaxe book would onlytake you a couple of days
<zone_31>
phaul: thanks!
<phaul>
np. discalimer: pickaxe is very outdated now, but as a first introduction to the language it still works. You will not see new language features in it though. http://docs.ruby-doc.com/docs/ProgrammingRuby/
fanta1 has joined #ruby
elphe has joined #ruby
_mossplix has quit [Remote host closed the connection]
_mossplix has joined #ruby
<zone_31>
phaul: programming ruby second edition? Do you have any good recourses for understanding the buildtools in rails? i was i bit overwhelmed with the amount of boilerplate after running "rails new" :)
BH23 has joined #ruby
Ai9zO5AP has joined #ruby
<phaul>
for rails I would just recommend the rails guides. https://guides.rubyonrails.org/ I don't know about the build tools specifically.
<phaul>
but honestly the just read the first edition pickaxe online for free ( the one I linked ). It should take more than 2-3 days even if you try code examples, and it's well worth your time
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
Technodrome has joined #ruby
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
brool has joined #ruby
elcontrastador has quit [Ping timeout: 265 seconds]
duderono_ has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
duderono_ has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
fanta1 has quit [Quit: fanta1]
blackmesa has joined #ruby
cow[moo] has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
banisterfiend has joined #ruby
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
sgen has joined #ruby
ramfjord has joined #ruby
blackmesa has joined #ruby
Rapture has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 240 seconds]
sauvin has quit [Remote host closed the connection]
banisterfiend has joined #ruby
Synthead has joined #ruby
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
<Synthead>
Hey all, I had an idea to use VCR for logging requests to make crash dumps. I would also add tests for this, and the test suite already uses VCR. Is there a way I can use two instances of VCR like this somehow?
kw0lf has quit [Read error: Connection reset by peer]
ravenousmoose has joined #ruby
ramfjord has joined #ruby
paraxial93 has quit [Ping timeout: 240 seconds]
ellcs1 has joined #ruby
chalkmonster has joined #ruby
paraxial93 has joined #ruby
xco has joined #ruby
greengriminal has quit [Ping timeout: 268 seconds]
hightower2 has quit [Ping timeout: 264 seconds]
greengriminal has joined #ruby
wildtrees has joined #ruby
greengriminal has quit [Client Quit]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch1 has quit [Ping timeout: 246 seconds]
MrCrackPot has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chalkmonster has quit [Quit: WeeChat 2.6]
drincruz has quit [Read error: No route to host]
drincruz has joined #ruby
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cyclonis has quit [Read error: Connection reset by peer]
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki_ has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has joined #ruby
donofrio has quit [Ping timeout: 240 seconds]
ikariusrb has joined #ruby
lxsameer has joined #ruby
matheusmoreira has quit [Ping timeout: 265 seconds]
matheusmoreira has joined #ruby
hightower2 has joined #ruby
donofrio has joined #ruby
ikariusrb has quit []
duderono_ has quit [Read error: Connection reset by peer]
ikariusrb has joined #ruby
duderono_ has joined #ruby
<ikariusrb>
ok, this has probably been covered a million times, here goes million and one. I found it remarkably difficult to construct a TimeDate object from a date and timezone at the beginning of day, which would correctly handle DST. I eventually ended up with the following code, but it feels like there should be an easier way. https://dpaste.de/8Y6N
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
<jeremycw>
Synthead: don't use VCR in prod, it will leak memory.
<ikariusrb>
the challenge I ran into was that you don't know if a calendar day is on DST or not until you construct the TimeDate object, and the TimeDate.new() always constructs a TimeDate with the local timezone, then shifts the time when you call in_time_zone.
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
<ikariusrb>
I could construct a timedate from components, but one component is offset, and does not accept a timezone name, so you need to construct an ActiveSupport::Timezone object, and give it a timedate object before asking for it's .formatted_offset.... which leads right back to this same code of constructing two timedate objects and checking to see which
<ikariusrb>
one maintains the correct date after being shifted to the correct timezone
banisterfiend has joined #ruby
jenrzzz has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jeremycw>
ikariusrb: would something like this work?: ActiveSupport::TimeZone['Central Time (US & Canada)'].local(2019, 1, 1)
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
mynameisdebian has joined #ruby
<mynameisdebian>
I have an array arr=["a","b","c","d","e"], and I want to iterate over the array members, but also have a variable (say "i") that increments with each one. I recall there was some super-easy way to do that with a native ruby loop. Can anyone clue me in?
<jeremycw>
each_with_index
jenrzzz has quit [Ping timeout: 240 seconds]
<mynameisdebian>
jeremycw, thx
cyclonis has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
ellcs1 has quit [Ping timeout: 245 seconds]
banisterfiend has quit [Client Quit]
sgen has quit [Ping timeout: 250 seconds]
<ikariusrb>
jeremycw ohh, that... would probably work. THANK you. I thought I had to be missing something
blackmesa1 has joined #ruby
Ven`` has joined #ruby
banisterfiend has joined #ruby
<havenwood>
mynameisdebian: if you want to start from from an index other than zero, #with_index takes an argument for the starting point.
blackmesa has quit [Ping timeout: 276 seconds]
<mynameisdebian>
havenwood, there is probably nobody in the world as helpful as you. I am sure there is a really nice IT job in heaven waiting for you
banisterfiend has quit [Client Quit]
<mynameisdebian>
though I hope you don't make it there for some time
<ikariusrb>
mynameisdebian depends on what you want returned. if you want an "accumulator" returned (a single value), you want array.reduce. if you want a new array with a value calculated for each element of your first array, you want array.map
AJA4350 has joined #ruby
<mynameisdebian>
I got it guys, appreciate the help
<mynameisdebian>
thx ikariusrb
<mynameisdebian>
ikariusrb, thx
jenrzzz has joined #ruby
banisterfiend has joined #ruby
<ikariusrb>
jeremycw ack, nope, using .local does not work as that constructs a time in the local timezone... and local timezone and the destination timezone could have different DST rules
chalkmonster has joined #ruby
JohanP has quit [Ping timeout: 245 seconds]
greengriminal has joined #ruby
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
JohanP has joined #ruby
greengriminal has quit [Quit: Leaving]
Synthead has quit [Ping timeout: 245 seconds]
jcalla has quit [Ping timeout: 245 seconds]
Synthead has joined #ruby
xco has quit [Quit: xco]
Ven`` has quit [Ping timeout: 276 seconds]
eein[m] has joined #ruby
ellcs1 has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
Synthead has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
_mossplix has joined #ruby
RushPL has quit [Ping timeout: 252 seconds]
tdy has quit [Ping timeout: 245 seconds]
cthulchu has joined #ruby
poontangmessiah has joined #ruby
bambanx has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
hutch1 has joined #ruby
poontangmessiah has quit [Remote host closed the connection]