universa1 has quit [Quit: ZNC 1.6.1+deb1~ubuntu14.04.0 - http://znc.in]
thunderbirdtr has quit [Remote host closed the connection]
thunderbirdtr has joined #ruby
universa1 has joined #ruby
jenrzzz has joined #ruby
Rudd0 has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 256 seconds]
universa1 has quit [Quit: ZNC 1.6.1+deb1~ubuntu14.04.0 - http://znc.in]
universa1 has joined #ruby
Caspy has quit [Ping timeout: 265 seconds]
xco has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jordanh has joined #ruby
postmodern has quit [Quit: Leaving]
xco has joined #ruby
venmx has joined #ruby
venmx has quit [Ping timeout: 260 seconds]
TomyWork has joined #ruby
vondruch has joined #ruby
nofxx__ has joined #ruby
maryo has joined #ruby
nofxx_ has quit [Read error: Connection reset by peer]
prestorium has joined #ruby
coniptor has quit [Ping timeout: 260 seconds]
venmx has joined #ruby
venmx has quit [Ping timeout: 246 seconds]
coniptor has joined #ruby
_whitelogger has joined #ruby
jl4 has joined #ruby
schne1der has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
coniptor has quit [Ping timeout: 264 seconds]
coniptor has joined #ruby
jenrzzz has joined #ruby
DanielCarlsson[m has joined #ruby
venmx has joined #ruby
venmx has quit [Ping timeout: 256 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
venmx has joined #ruby
coniptor has quit [Ping timeout: 256 seconds]
alexherbo2 has joined #ruby
coniptor has joined #ruby
cacheerror has quit [Quit: WeeChat 3.0]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TCZ has joined #ruby
akem has joined #ruby
viporli has quit [Ping timeout: 246 seconds]
Rudd0 has joined #ruby
fercell has joined #ruby
Technodrome has joined #ruby
Nahra has joined #ruby
akem has quit [Ping timeout: 272 seconds]
ua_ has quit [Ping timeout: 260 seconds]
Nahra has quit [Quit: leaving]
fercell has quit [Ping timeout: 256 seconds]
fercell has joined #ruby
Nahra has joined #ruby
ua_ has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
schaerli_ has joined #ruby
schaerli has quit [Ping timeout: 264 seconds]
tankf33der has joined #ruby
baojg has quit [Remote host closed the connection]
dhollinger has quit [Ping timeout: 246 seconds]
dhollinger has joined #ruby
coniptor has quit [Ping timeout: 256 seconds]
fercell has quit [Ping timeout: 256 seconds]
jl4 has quit [Ping timeout: 264 seconds]
fercell has joined #ruby
m27frogy has joined #ruby
coniptor has joined #ruby
fercell has quit [Ping timeout: 260 seconds]
en10n has quit [Quit: Connection closed for inactivity]
fercell has joined #ruby
jl4 has joined #ruby
al2o3-cr has joined #ruby
jl4 has quit [Ping timeout: 260 seconds]
maryo87 has joined #ruby
maryo_87 has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maryo has quit [Ping timeout: 256 seconds]
postmodern has joined #ruby
TCZ has quit [Remote host closed the connection]
fercell has quit [Ping timeout: 264 seconds]
fercell has joined #ruby
akem has joined #ruby
somazero has joined #ruby
salvor has quit [Ping timeout: 260 seconds]
somazero has quit [Client Quit]
salvor has joined #ruby
linoge has joined #ruby
^ has quit [Remote host closed the connection]
V[excess] has joined #ruby
isene has quit [Ping timeout: 260 seconds]
thunderbirdtr has quit [Remote host closed the connection]
isene has joined #ruby
fercell has quit [Ping timeout: 256 seconds]
thunderbirdtr has joined #ruby
fercell has joined #ruby
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 272 seconds]
universa1 has quit [*.net *.split]
deimos_ has quit [*.net *.split]
ruby[bot] has quit [*.net *.split]
jpz has quit [*.net *.split]
greypack has quit [*.net *.split]
Lyubo1 has quit [*.net *.split]
sol1d has quit [*.net *.split]
snapcase has quit [*.net *.split]
titanbiscuit has quit [*.net *.split]
factormystic has quit [*.net *.split]
hsiktas[m] has quit [*.net *.split]
swann11[m] has quit [*.net *.split]
MeVegantheythem[ has quit [*.net *.split]
kevinsjoberg has quit [*.net *.split]
mahlon has quit [*.net *.split]
ule has quit [*.net *.split]
tsujp1 has quit [Ping timeout: 272 seconds]
universa1 has joined #ruby
deimos_ has joined #ruby
jpz has joined #ruby
Lyubo1 has joined #ruby
ruby[bot] has joined #ruby
greypack has joined #ruby
snapcase has joined #ruby
sol1d has joined #ruby
factormystic has joined #ruby
titanbiscuit has joined #ruby
swann11[m] has joined #ruby
hsiktas[m] has joined #ruby
ule has joined #ruby
MeVegantheythem[ has joined #ruby
mahlon has joined #ruby
kevinsjoberg has joined #ruby
tsujp1 has joined #ruby
hsiktas[m] has quit [Max SendQ exceeded]
xco has quit [Ping timeout: 246 seconds]
thecoffemaker has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
thecoffemaker has joined #ruby
Cubixusin[m] has quit [Ping timeout: 240 seconds]
MeVegantheythem[ has quit [Ping timeout: 246 seconds]
kateskips has quit [Ping timeout: 240 seconds]
JanHebler[m] has quit [Ping timeout: 240 seconds]
PaulB[m] has quit [Ping timeout: 240 seconds]
tfreedman has quit [Ping timeout: 240 seconds]
jordanh has quit [Ping timeout: 240 seconds]
turt2live has quit [Ping timeout: 240 seconds]
swann11[m] has quit [Ping timeout: 246 seconds]
Hanma[m] has quit [Ping timeout: 244 seconds]
DanielCarlsson[m has quit [Ping timeout: 244 seconds]
jcp has quit [Ping timeout: 244 seconds]
jo-so has quit [Ping timeout: 258 seconds]
darris has quit [Quit: Bye bye!]
electragician has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
teclator has quit [Ping timeout: 264 seconds]
darris has joined #ruby
leni1[m] has quit [Ping timeout: 268 seconds]
Mia has joined #ruby
Mia has joined #ruby
jordanh has joined #ruby
jcp has joined #ruby
jo-so has joined #ruby
PaulB[m] has joined #ruby
viporli has joined #ruby
elcuervo has quit [Read error: Connection reset by peer]
teclator has joined #ruby
electragician has joined #ruby
elcuervo has joined #ruby
akem has quit [Ping timeout: 240 seconds]
JanHebler[m] has joined #ruby
tfreedman has joined #ruby
Cubixusin[m] has joined #ruby
jenrzzz has joined #ruby
Hanma[m] has joined #ruby
DanielCarlsson[m has joined #ruby
dhollinger has quit [Ping timeout: 260 seconds]
Hanma[m] has quit [Ping timeout: 240 seconds]
jo-so has quit [Ping timeout: 258 seconds]
electragician has quit [Ping timeout: 240 seconds]
JanHebler[m] has quit [Ping timeout: 240 seconds]
tfreedman has quit [Ping timeout: 246 seconds]
DanielCarlsson[m has quit [Ping timeout: 260 seconds]
Cubixusin[m] has quit [Ping timeout: 258 seconds]
jcp has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
jordanh has quit [Ping timeout: 258 seconds]
PaulB[m] has quit [Ping timeout: 260 seconds]
teclator has quit [Ping timeout: 240 seconds]
jl4 has joined #ruby
jenrzzz has joined #ruby
teclator has joined #ruby
kateskips has joined #ruby
MeVegantheythem[ has joined #ruby
teclator has quit [Ping timeout: 244 seconds]
swann11[m] has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
viporli has quit [Remote host closed the connection]
turt2live has joined #ruby
FrankyCyborg has joined #ruby
cd has quit [Quit: cd]
akem has joined #ruby
leni1[m] has joined #ruby
dhollinger has joined #ruby
hsiktas[m] has joined #ruby
teclator has joined #ruby
JanHebler[m] has joined #ruby
jordanh has joined #ruby
jo-so has joined #ruby
Hanma[m] has joined #ruby
PaulB[m] has joined #ruby
jcp has joined #ruby
DanielCarlsson[m has joined #ruby
jenrzzz has joined #ruby
<FrankyCyborg>
I'm in the process of installing quite a lot of ruby modules (via a DESTDIR approach for packaging, using the --build-root parameter for 'gem') and have now the first problem with a module, which is quite old ('fastthread', last version from 2009) which yields the error extconf.rb:13:in `block in <main>': uninitialized constant Config which seems to be quite common, according to a quick web search.. what would be a sane approach to fi
<FrankyCyborg>
this? without further knowledge, I would simply decompress the *.gem file, and the contained *.gz files, patch the ruby code in question (changing 'Config' to 'RbConfig' and then compress it back to a *.gem file and hope it works ... but there may be a better / easier solution.. !?
Cubixusin[m] has joined #ruby
tfreedman has joined #ruby
roshanavand has joined #ruby
roshanavand has quit [Client Quit]
akem has quit [Quit: Leaving]
akem has joined #ruby
fercell has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
coniptor has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
gdonald has quit [Quit: leaving]
lucasb has joined #ruby
coniptor has joined #ruby
roshanavand has joined #ruby
<FrankyCyborg>
ok, for this one I found a discussion at https://github.com/rubygems/rubygems/issues/1151 which concludes, that this module is no longer required on ruby >= 2.3.0 - so I ignore this one; but still, if the above scenario happens with another gem, I guess there is some 'rubyish' approach that's better than my 'general' and somewhat brute-force solution
<alexherbo2>
hello
<alexherbo2>
is there a way to rollback sqlite data?
<alexherbo2>
I would like before each test to restore the state of the database
<alexherbo2>
currently I have 151 pokemon in my database, and insert before each test is quite slow
gdonald has joined #ruby
<alexherbo2>
like 5s before each test
teclator has quit [Ping timeout: 244 seconds]
teclator has joined #ruby
cd has joined #ruby
Technodrome has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
coniptor has quit [Ping timeout: 256 seconds]
akem has quit [Remote host closed the connection]
akem has joined #ruby
coniptor has joined #ruby
prestorium has quit [Ping timeout: 256 seconds]
alexm_ has joined #ruby
alexm_ has quit [Client Quit]
prestorium has joined #ruby
roshanavand1 has joined #ruby
roshanavand has quit [Ping timeout: 272 seconds]
roshanavand1 is now known as roshanavand
stryek has joined #ruby
ChmEarl has joined #ruby
GodFather has quit [Ping timeout: 256 seconds]
jl4 has quit [Ping timeout: 258 seconds]
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
Nahra has quit [Quit: leaving]
leni1[m] has quit [Quit: Idle for 30+ days]
<havenwood>
alexherbo2: Can you bulk insert all 151 at once?
<alexherbo2>
I don't know how to do
<havenwood>
alexherbo2: While sqlite is amazing at parallel reads, one big weakness is lack of synchronous writes.
<havenwood>
alexherbo2: That's not using INSERT correctly.
<alexherbo2>
yeah
<havenwood>
alexherbo2: On line 17 you should be listing the attributes of pokemon you want to insert and on line 18 you should have ALL the comma-separated values.
<havenwood>
alexherbo2: Look more carefully at this:
<havenwood>
INSERT INTO llamas (name) VALUE ("Lulu"), ("Lolly"), ("Luis");
<havenwood>
alexherbo2: That's inserting a single attribute, "name," and three names.
<alexherbo2>
from the pokemon array, I should generate a list of string (?, ?), joined with ','
<havenwood>
alexherbo2: Yes.
<alexherbo2>
I lose the readability with this additional work though I think I have no choice :/
<havenwood>
alexherbo2: You could use a nice gem like Sequel which has pleasant syntax for this.
<havenwood>
alexherbo2: I don't know if sqlite3 gem has an insert helper?
<havenwood>
alexherbo2: A nice thing about Sequel is you can say change from SQLite to Postgres to MySQL without changing all your code.
<havenwood>
It's very well done and has a good plugin system to extend beyond basic use.
<havenwood>
alexherbo2: I'd recommend you switch from sqlite3 to sequel, which you can still use with SQLite.
<havenwood>
alexherbo2: Or yeah, just write the SQL statements yourself by forming the strings.
<alexherbo2>
I will take a look after finishing the tuto
Xephania has joined #ruby
chouhoul_ has joined #ruby
FankyCyborg2 has joined #ruby
tankf33der8 has joined #ruby
naftilos76 has joined #ruby
linoge_ has joined #ruby
FrankyCyborg has quit [Ping timeout: 256 seconds]
Technodrome has quit [Ping timeout: 256 seconds]
chouhoulis has quit [Ping timeout: 256 seconds]
linoge has quit [Ping timeout: 256 seconds]
lightstalker has quit [Ping timeout: 256 seconds]
FankyCyborg2 is now known as FrankyCyborg
Xephani has quit [Ping timeout: 256 seconds]
tankf33der has quit [Ping timeout: 256 seconds]
MuffinPimp has quit [Ping timeout: 256 seconds]
tankf33der8 is now known as tankf33der
jenrzzz has joined #ruby
MuffinPimp has joined #ruby
maryo87 has quit [Quit: Leaving]
lightstalker has joined #ruby
Xephania has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 264 seconds]
schne1der has quit [Quit: schne1der]
<FrankyCyborg>
grrrrreat.. I just investigated an error while installing i18n 1.8.7, that yard 0.9.26 produces an incorrect require statement in a file that's installed at /usr/lib/ruby/gems/3.0.0/plugins/yard_plugin.rb , when installing at with the --build-root parameter to 'gem', as that file tries to require a file within the temporary destroot directory ..
akem has quit [Remote host closed the connection]
akem has joined #ruby
<naftilos76>
Hi everyone, i am trying to get input from keyboard inside a ssh session (while working with my vps). I am using STDIN.gets but it does not block execution. Instead it behaves as if it does not exist
<rapha>
(me, not using Singleton anywhere ... is this a broken ruby install from the O/S?)
<rapha>
(fwiw, it came from calling Bundler.require(:default))
orbyt_ has joined #ruby
coniptor has quit [Read error: Connection reset by peer]
cthulchu has joined #ruby
SeepingN has joined #ruby
coniptor has joined #ruby
gdonald has quit [Quit: leaving]
jl4 has joined #ruby
zoid has quit [Quit: going down for a reboot]
zoid has joined #ruby
howdoi has joined #ruby
jl4 has quit [Remote host closed the connection]
ua_ has quit [Ping timeout: 246 seconds]
daemonwrangler has quit [Quit: ZNC 1.7.5 - https://znc.in]
dfucci has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
ua_ has joined #ruby
r29v has joined #ruby
r29v has quit [Client Quit]
ua_ has quit [Excess Flood]
jenrzzz has quit [Ping timeout: 246 seconds]
ua has joined #ruby
TomyWork has quit [Remote host closed the connection]
al2o3-cr has quit [Ping timeout: 257 seconds]
<havenwood>
alexherbo2: Yes, we can give you suggestions for improvements. It doesn't look like it works, as is.
<havenwood>
alexherbo2: There are several errors.
<havenwood>
alexherbo2: Check the return value of `pokemons` from line 11. What class is it?
<havenwood>
alexherbo2: And on line 20, what's the return value of `pokemon_sql_values`? Does that look right to you?
<havenwood>
alexherbo2: You can try it in irb or us #p in your code to check the value, like: p pokemons
dfucci has joined #ruby
gix has joined #ruby
FrankyCyborg has quit [Quit: The Sleep Monster got me!]
<havenwood>
alexherbo2: Check out my comment on your Gist suggesting #sprintf.
cliluw has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dfucci has quit [Ping timeout: 265 seconds]
roshanavand has joined #ruby
coniptor has quit [Ping timeout: 256 seconds]
coniptor has joined #ruby
neonloop has quit [Quit: Bridge terminating on SIGTERM]
neonloop has joined #ruby
envex has joined #ruby
ur5us_ has joined #ruby
teclator has quit [Ping timeout: 260 seconds]
teclator has joined #ruby
maryo_87 has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
dhollinger has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
dhollinger has joined #ruby
ur5us_ has quit [Ping timeout: 246 seconds]
elxbarbosa has joined #ruby
al2o3-cr has joined #ruby
naftilos76 has quit [Quit: Leaving]
coniptor has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
coniptor has joined #ruby
dfucci has joined #ruby
akem has quit [Remote host closed the connection]
Rounin has quit [Ping timeout: 264 seconds]
TCZ has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
<bougyman>
Any regex maestros know how to @sentences ||= lines.join(' ').split(/[.?!](?:$| (?>[A-Z]))/)
<bougyman>
make that not eat the first word of each sentence after the first?
<bougyman>
er the first letter of each sentence after the frist.
jenrzzz has quit [Ping timeout: 256 seconds]
linoge_ has quit [Remote host closed the connection]
linoge has joined #ruby
linoge has quit [Ping timeout: 272 seconds]
s3nd1v0g1us has joined #ruby
Azure|dc has quit [Read error: Connection reset by peer]
Azure has joined #ruby
jenrzzz has joined #ruby
dfucci has joined #ruby
orbyt_ has joined #ruby
Azure|dc has joined #ruby
Azure has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 246 seconds]
TCZ has quit [Quit: Programowanie og?upia]
cliluw has quit [Ping timeout: 264 seconds]
cliluw has joined #ruby
jenrzzz has joined #ruby
cd has quit [Quit: cd]
z0id has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
akem has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
z0id has quit [Quit: going down for a reboot]
jenrzzz has joined #ruby
thunderbirdtr has quit [Quit: Bye bye]
dfucci has quit [Ping timeout: 256 seconds]
thunderbirdtr has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<alexherbo2>
havenwood: it's an array of hash with index and name
nertzy has joined #ruby
<alexherbo2>
I don't understand your code
<alexherbo2>
sprintf generate a string, but you call join
<alexherbo2>
and add the values in the string instead of placeholders
coniptor has quit [Ping timeout: 272 seconds]
<alexherbo2>
I should have named `pokemon_sql_values` as placeholder something, it's a list of `(?, ?)` joined with `,`
<alexherbo2>
but I tried to optimize with a single query and it's 1sec now o/
<alexherbo2>
I generate 2 things from the `pokemons` array: as many plaholders (?, ?) for the sql query, and the flat list of [pokemon_one_index, pokemon_one_name, pokemon_two_...] for the sql execute command to fill the placeholders
<alexherbo2>
maybe iterating a single time and build something with each_with_object() could make it more readable