JohanP has quit [Remote host closed the connection]
ur5us_ has quit [Ping timeout: 264 seconds]
JohanP has joined #ruby
roshanavand has quit [Quit: roshanavand]
JohanP has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Quit: dionysus69]
banisterfiend has quit [Ping timeout: 256 seconds]
JohanP has joined #ruby
JohanP has quit [Ping timeout: 240 seconds]
somazero has joined #ruby
va5c0 has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
JohanP has joined #ruby
mconnolly has quit [Quit: WeeChat 2.9]
JohanP has quit [Ping timeout: 264 seconds]
gueorgui has quit [Ping timeout: 246 seconds]
tekk has joined #ruby
gueorgui has joined #ruby
GodFather has joined #ruby
JohanP has joined #ruby
wald0 has joined #ruby
JohanP has quit [Ping timeout: 256 seconds]
va5c0 has quit [Ping timeout: 256 seconds]
roshanavand has joined #ruby
JohanP has joined #ruby
banisterfiend has joined #ruby
GodFather has quit [Ping timeout: 256 seconds]
GodFather has joined #ruby
GodFather_ has joined #ruby
JohanP has quit [Ping timeout: 260 seconds]
ChmEarl has quit [Quit: Leaving]
JohanP has joined #ruby
duderonomy has joined #ruby
dasher00 has quit [Ping timeout: 240 seconds]
ChmEarl has joined #ruby
JohanP has quit [Ping timeout: 272 seconds]
gix- has joined #ruby
gix has quit [Disconnected by services]
drusepth has joined #ruby
powerhouse has quit [Read error: No route to host]
powerhouse has joined #ruby
JohanP has joined #ruby
banisterfiend has quit [Ping timeout: 268 seconds]
roshanavand1 has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand1 is now known as roshanavand
jenrzzz has joined #ruby
JohanP has quit [Ping timeout: 256 seconds]
<drusepth>
I have a proc that references a variable (word_count) that I'm trying to manually set as a local variable before calling the proc, but nothing seems to actually set it. Here are all the ways I've tried so far: https://dpaste.org/kunG -- anyone have any idea how to set local variables on proc bindings?
<drusepth>
er, to clarify, trying to define that variable within the scope of the block before the rest of it is executed
coniptor has quit [Ping timeout: 260 seconds]
Eiam has quit [Ping timeout: 272 seconds]
JohanP has joined #ruby
ian| has quit [Quit: Exiting]
coniptor has joined #ruby
JohanP has quit [Ping timeout: 240 seconds]
ur5us_ has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
prion has joined #ruby
JohanP has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
JohanP has quit [Ping timeout: 264 seconds]
banisterfiend has joined #ruby
JohanP has joined #ruby
JohanP has quit [Ping timeout: 272 seconds]
roshanavand1 has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand1 is now known as roshanavand
siaw23 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
elcuervo has joined #ruby
cuerbot has quit [Ping timeout: 240 seconds]
JohanP has joined #ruby
cd has quit [Quit: cd]
banisterfiend has quit [Ping timeout: 268 seconds]
coniptor has quit [Ping timeout: 256 seconds]
JohanP has quit [Ping timeout: 256 seconds]
wald0 has quit [Ping timeout: 240 seconds]
coniptor has joined #ruby
JohanP has joined #ruby
gix has joined #ruby
JohanP has quit [Ping timeout: 246 seconds]
gix- has quit [Ping timeout: 256 seconds]
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
JohanP has joined #ruby
siaw23 has joined #ruby
JohanP has quit [Ping timeout: 265 seconds]
al2o3-cr has quit [Quit: WeeChat 3.0]
al2o3-cr has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<smccarthy>
With yield, can I set the value of the `yield` to a string ? Like : message ||= "Timed out after #{seconds} seconds. Yield #{yield}" \n wait(seconds: seconds, message: message).until { yield } ?
adu has quit [Quit: adu]
JohanP has joined #ruby
prion has quit [Ping timeout: 272 seconds]
JohanP has quit [Ping timeout: 246 seconds]
smccarthy has quit [Remote host closed the connection]
freshmaker666 has left #ruby ["WeeChat 2.9"]
JohanP has joined #ruby
siaw23 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
siaw23 has joined #ruby
siaw23 has quit [Client Quit]
coniptor has quit [Ping timeout: 260 seconds]
ChmEarl has quit [Quit: Leaving]
JohanP has quit [Ping timeout: 264 seconds]
adu has joined #ruby
coniptor has joined #ruby
JohanP has joined #ruby
JohanP has quit [Ping timeout: 246 seconds]
ur5us_ has quit [Ping timeout: 264 seconds]
siaw23 has joined #ruby
siaw23 has quit [Client Quit]
JohanP has joined #ruby
adu has quit [Quit: adu]
JohanP has quit [Ping timeout: 240 seconds]
siaw23 has joined #ruby
rick2600 has joined #ruby
rick2600 has left #ruby [#ruby]
JohanP has joined #ruby
JohanP has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ruby
ur5us_ has joined #ruby
JohanP has joined #ruby
JohanP has quit [Ping timeout: 260 seconds]
schaerli_ has joined #ruby
JohanP has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
JohanP has quit [Ping timeout: 260 seconds]
siaw23 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
JohanP has joined #ruby
coniptor has quit [Ping timeout: 246 seconds]
JohanP has quit [Ping timeout: 240 seconds]
coniptor has joined #ruby
_whitelogger has joined #ruby
JohanP has joined #ruby
JohanP has quit [Ping timeout: 246 seconds]
burgestrand has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JohanP has joined #ruby
schne1der has joined #ruby
JohanP has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
JohanP has joined #ruby
eben has joined #ruby
eben has quit [Client Quit]
eben has joined #ruby
eben has quit [Client Quit]
burgestrand has quit [Quit: burgestrand]
va5c0 has joined #ruby
coniptor has quit [Ping timeout: 256 seconds]
weaksauce has quit [Ping timeout: 240 seconds]
coniptor has joined #ruby
jeromelanteri has quit [Quit: Leaving]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jeromelanteri has joined #ruby
panorain has joined #ruby
orbyt_ has joined #ruby
prion has joined #ruby
va5c0 has quit [Ping timeout: 260 seconds]
va5c0 has joined #ruby
panorain has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Axy has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Mia has joined #ruby
BSaboia has joined #ruby
drusepth has quit [Ping timeout: 260 seconds]
evdubs has quit [Quit: Leaving]
va5c0 has quit [Ping timeout: 258 seconds]
evdubs has joined #ruby
va5c0 has joined #ruby
JohanP has quit [Ping timeout: 256 seconds]
schne1der has quit [Quit: schne1der]
JohanP has joined #ruby
JohanP has quit [Ping timeout: 240 seconds]
JohanP has joined #ruby
alexherbo2 has joined #ruby
siaw23 has joined #ruby
banisterfiend has joined #ruby
m27frogy has joined #ruby
_whitelogger has joined #ruby
somazero has quit [Quit: Leaving]
Mia has quit [Ping timeout: 240 seconds]
somazero has joined #ruby
somazero has quit [Client Quit]
prion has quit [Ping timeout: 240 seconds]
schaerli_ has quit [Ping timeout: 264 seconds]
schne1der has joined #ruby
JohanP has quit [Ping timeout: 256 seconds]
JohanP has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
asdfhurz has joined #ruby
asdfhurz has quit [Remote host closed the connection]
siaw23 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
ellcs has joined #ruby
mconnolly has joined #ruby
TCZ has joined #ruby
prion has joined #ruby
JohanP has quit [Ping timeout: 260 seconds]
cacheerror has joined #ruby
JohanP has joined #ruby
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
JohanP has quit [Ping timeout: 246 seconds]
Technodrome has joined #ruby
Rudd0^ has quit [Ping timeout: 272 seconds]
JohanP has joined #ruby
prion has quit [Ping timeout: 240 seconds]
va5c0 has quit [Ping timeout: 264 seconds]
TCZ has quit [Remote host closed the connection]
JohanP has quit [Ping timeout: 240 seconds]
va5c0 has joined #ruby
AndreYuhai has joined #ruby
<AndreYuhai>
hey there, how could I convert a specific column into datetime in a CSV?
<AndreYuhai>
as far as I understand converter is attempting to convert every column
<AndreYuhai>
I would like to make it "column-aware" so that it only tries to convert a specific column I want
JohanP has joined #ruby
<jhass>
just do it after parsing?
prion has joined #ruby
<AndreYuhai>
Oh so there's no way to do it with converters. That feature would be really cool though. :D
<AndreYuhai>
To be able to apply specific converters to specific columns
<jhass>
looks like you could take a second argument in a converter giving you a CSV::FieldInfo
JohanP has quit [Ping timeout: 240 seconds]
<AndreYuhai>
oh let me try that
<AndreYuhai>
exactly! That gives you the header name as well. Thank you!
chouhoulis has joined #ruby
siaw23 has joined #ruby
JohanP has joined #ruby
chouhoulis has quit [Ping timeout: 272 seconds]
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
mconnolly has quit [Quit: WeeChat 2.9]
banisterfiend has quit [Ping timeout: 260 seconds]
powerhouse has quit [Remote host closed the connection]
Mrgoose has quit [Ping timeout: 246 seconds]
powerhouse has joined #ruby
rubydoc has quit [Ping timeout: 264 seconds]
phaul has quit [Ping timeout: 260 seconds]
rubydoc has joined #ruby
rubydoc has quit [Excess Flood]
phaul has joined #ruby
rubydoc has joined #ruby
siaw23 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
cd has joined #ruby
roshanavand has quit [Quit: roshanavand]
roshanavand has joined #ruby
roshanavand has quit [Client Quit]
ChmEarl has joined #ruby
roshanavand has joined #ruby
swaggboi has quit [Quit: C-x C-c]
siaw23 has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
swaggboi has joined #ruby
alexherbo2 has quit [Ping timeout: 256 seconds]
roshanavand has quit [Quit: roshanavand]
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 256 seconds]
rubydoc has quit [Excess Flood]
rubydoc has joined #ruby
rubydoc has quit [Excess Flood]
rubydoc has joined #ruby
roshanavand has joined #ruby
banisterfiend has joined #ruby
siaw23 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mconnolly has joined #ruby
Rudd0 has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
siaw23 has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
Mrgoose has joined #ruby
dviola has quit [Quit: WeeChat 3.0]
panorain has joined #ruby
dviola has joined #ruby
wald0 has joined #ruby
wald0 has quit [Client Quit]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
schne1der has quit [Quit: schne1der]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
mconnolly has quit [Quit: WeeChat 2.9]
ellcs has quit [Ping timeout: 258 seconds]
chouhoulis has joined #ruby
makerleader has quit [Quit: Leaving]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
va5c0 has quit [Quit: WeeChat 3.0]
ua has quit [Ping timeout: 272 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<AndreYuhai>
DB connections are not being returned.
jenrzzz has quit [Ping timeout: 268 seconds]
JohanP has joined #ruby
jenrzzz has joined #ruby
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
coniptor has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
coniptor has joined #ruby
Technodrome has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
<AndreYuhai>
/join #python
<adam12>
AndreYuhai: What do you mean not-returned? You mean back into the pool?
jenrzzz has joined #ruby
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
Guest48 has joined #ruby
jenrzzz has joined #ruby
JohanP has quit [Ping timeout: 264 seconds]
JohanP has joined #ruby
Guest48 has quit [Client Quit]
catbeard has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
JohanP has quit [Ping timeout: 260 seconds]
fippy has joined #ruby
jenrzzz has joined #ruby
<AndreYuhai>
adam12, I think yes, somehow it gets stuck somewhere and there is nothing added to the DB and there is no exception.
<AndreYuhai>
By the way how do I wait for other threads to complete before exiting with concurrent gem?
<AndreYuhai>
Oh found it pool.wait_for_termination probably. But now if I wait for termination there is something wrong with the threads. My program doesn't exit
al2o3-cr has quit [Quit: WeeChat 3.0]
weaksauce has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
AndreYuhai has quit [Remote host closed the connection]
AndreYuhai has joined #ruby
<AndreYuhai>
Might be because I was not shutting down the thread pool correctly.
GodFather has quit [Ping timeout: 260 seconds]
GodFather_ has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
JohanP has joined #ruby
siaw23_ has joined #ruby
<havenwood>
AndreYuhai: Do you mean to have lines 8 and 9 reversed? Or your intent is really to have a new connection for each line of the cvs_path file?
jenrzzz has quit [Ping timeout: 260 seconds]
JohanP has quit [Ping timeout: 260 seconds]
siaw23 has quit [Ping timeout: 265 seconds]
<AndreYuhai>
havenwood, I was just trying to speed up the process of inserting. Which I did I guess, is there anything wrong with the code there or is that a good approach?
<AndreYuhai>
Basically inserting lines from one csv.
jenrzzz has joined #ruby
BTRE has quit [Quit: Leaving]
<AndreYuhai>
which has around 4.5M rows
<havenwood>
AndreYuhai: Ah, gotcha. So like a bulk insert?
<AndreYuhai>
yes, I think that could be done with some SQL as well but didn't really check it
BTRE has joined #ruby
<havenwood>
AndreYuhai: Do you need callbacks and validations?
<havenwood>
AndreYuhai: It seems tempting to create/insert all at once or in batches of multiple at a time if all is too much to reasonably be in memory.
<havenwood>
AndreYuhai: Much easier if you can just read the CSV into memory all at once, but if you're doing multiple ones at once that might be too much.
jenrzzz has joined #ruby
AndreYuhai has quit [Ping timeout: 246 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
Does blockless CSV.foreach play nice with laziness or go eager there? I can't recall.
dasher00 has joined #ruby
AndreYuhai has joined #ruby
ellcs has joined #ruby
GodFather has quit [Ping timeout: 268 seconds]
GodFather_ has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
prion has quit [Ping timeout: 264 seconds]
maryo87 has joined #ruby
Technodrome has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
GodFather has joined #ruby
maryo has quit [Ping timeout: 260 seconds]
<AndreYuhai>
havenwood, Oh I am not sure whether I can read all at once, on my laptop for sure not haha. But I will try that on the server. Thank you for the tricks!
<AndreYuhai>
And happy new year everyone.
JayDoubleu has quit [Ping timeout: 260 seconds]
ReinH__ has quit [Ping timeout: 260 seconds]
s_ has quit [Remote host closed the connection]
prion has joined #ruby
GodFather_ has joined #ruby
evdubs_ has joined #ruby
d0liver has quit [Ping timeout: 260 seconds]
r3my has quit [Ping timeout: 260 seconds]
GGMethos has quit [Ping timeout: 260 seconds]
r3my has joined #ruby
s_ has joined #ruby
ReinH__ has joined #ruby
evdubs has quit [Ping timeout: 260 seconds]
jess has quit [Quit: Leaving]
jess has joined #ruby
jenrzzz has joined #ruby
jdeen has quit [Ping timeout: 260 seconds]
JayDoubleu has joined #ruby
d0liver has joined #ruby
GGMethos has joined #ruby
Mrgoose has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
maryo87 has quit [Ping timeout: 240 seconds]
ruurd has quit [Ping timeout: 246 seconds]
maryo has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
AndreYuhai has quit [Remote host closed the connection]