baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.3, 2.3.6, 2.2.9 & 2.5.0-rc1: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
eckhardt has joined #ruby
cdg has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
neo95 has quit [Quit: Leaving]
CrazyEddy has quit [Ping timeout: 272 seconds]
tcopeland has joined #ruby
s3nd1v0g1us has quit [Ping timeout: 265 seconds]
TomyLobo has quit [Ping timeout: 255 seconds]
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
CrazyEddy has joined #ruby
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
cdg has quit [Remote host closed the connection]
troys is now known as troys_
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
CrazyEddy has quit [Ping timeout: 240 seconds]
<mikecmpbll> hmm, more an algorithm question than a ruby one but, if i have two arrays, e.g. a1 = [2, 3, 6, 1, 4, 5], and a2 = [3,5,2,1,6,4], and I want to order the first array and make the same position-wise transformation to the second array
<mikecmpbll> what's the best way to achieve that?
goepsilongo has joined #ruby
<havenwood> mikecmpbll: what would the return value look like ideally?
<mikecmpbll> havenwood : one sec
<mikecmpbll> the rest would be ... a1_t = [1,2,3,4,5,6]; a2_t = [1,3,5,6,4,2]
<mikecmpbll> result*
<mikecmpbll> the two arrays after transformation
<mikecmpbll> the first one is sorted and the same positional changes are made in the 2nd array.
<havenwood> >> a1.each_with_index.sort_by(&:first).map(&:last).map { |i| a2[i] } # mikecmpbll
<ruby[bot]> havenwood: # => undefined local variable or method `a1' for main:Object (NameError) ...check link for more (https://eval.in/923031)
<havenwood> #=> [1, 3, 5, 6, 4, 2]
bmurt has joined #ruby
<mikecmpbll> ohhhh
<mikecmpbll> :D neat
<mikecmpbll> didn't think of getting the index in and out again of the sorting array
<mikecmpbll> goddamn. good one! thanks.
<mikecmpbll> <3
CrazyEddy has joined #ruby
rubycoder37 has joined #ruby
<rubycoder37> it annoys me that ruby isn't as popular as python is
<mikecmpbll> numpy/scipy/scikit-learn are some big reasons for it's current popularity
<mikecmpbll> ruby doesn't have much to answer for that right now tbh.
cdolan has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rubycoder37> there is not a single program that depends on ruby that I have installed on my system, yet I have 13 programs that depend on python2 and 4 that depend on python3, this is ridiculous
<rubycoder37> I'm f*cking outraged!
<mikecmpbll> .. :/
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pilne has joined #ruby
<rubycoder37> I'm sorry mike, but ruby should have been the number-one language
cdolan has quit [Ping timeout: 248 seconds]
<rubycoder37> ruby needs to do something to make it seem that it's not just for rails
<rubycoder37> 2.5.0 will displace python as the queen of programming languages!
<synstack> python is the queen of programming languages?
graft has quit [Ping timeout: 248 seconds]
mtkd has quit [Ping timeout: 256 seconds]
<rubycoder37> yes, all my coworkers swear by it
<havenwood> Python 2 or Python 3?
<havenwood> ;-)
mtkd has joined #ruby
jameser has joined #ruby
<rubycoder37> python2
pastorinni has joined #ruby
<havenwood> Python 2 EoL moved from 2015 to 2020. They have a couple more years.
<havenwood> Maybe they're just holding out for Ruby 3?
mtkd has quit [Ping timeout: 265 seconds]
pastorinni has quit [Ping timeout: 248 seconds]
cdolan has joined #ruby
<rubycoder37> python = the poor man's programming language
ur5us has joined #ruby
duderonomy has joined #ruby
jobewan has quit [Ping timeout: 260 seconds]
cdolan has quit [Ping timeout: 248 seconds]
duderonomy has quit [Client Quit]
__main__ has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
workmad3 has joined #ruby
cdg has joined #ruby
skweek has joined #ruby
__main__ has joined #ruby
CrazyEddy has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
cdg has quit [Ping timeout: 265 seconds]
alfiemax has joined #ruby
tcopeland has quit [Quit: tcopeland]
pdcawley has joined #ruby
rubycoder37 has quit [Quit: Lost terminal]
orbyt_ has joined #ruby
cdolan has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
sanscoeur has quit [Remote host closed the connection]
sanscoeur has joined #ruby
CrazyEddy has joined #ruby
pdcawley has quit [Ping timeout: 272 seconds]
elphe has joined #ruby
k0mpa has quit [Remote host closed the connection]
hahuang65 has joined #ruby
cdolan has quit [Ping timeout: 248 seconds]
sanscoeur has quit [Ping timeout: 264 seconds]
marr has quit [Ping timeout: 255 seconds]
pdcawley has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
m27frogy has quit [Quit: ZNC - http://znc.in]
vtx has joined #ruby
hahuang65 has quit [Ping timeout: 268 seconds]
code_zombie has joined #ruby
neo95 has joined #ruby
<vtx> hi guys, has anyone here used mongodb with ruby? some of my queries take 10-20 seconds to complete, and when i have a number of queries running as part of a single request, my request takes minutes to complete. i was wondering if anyone had experience of improving mongo performance with the ruby driver? or if there are some options i can provide that will speed up my query completion time?
cagomez has quit [Ping timeout: 248 seconds]
m27frogy has joined #ruby
chocoelho has quit [Quit: chocoelho]
cdolan has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
guardianx has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
neo95 has quit [Ping timeout: 256 seconds]
ta_ has quit [Remote host closed the connection]
GodFather has joined #ruby
cdolan has quit [Ping timeout: 272 seconds]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
CrazyEddy has quit [Ping timeout: 265 seconds]
neo95 has joined #ruby
chocoelho has joined #ruby
tcopeland has joined #ruby
ResidentBiscuit has joined #ruby
hahuang65 has joined #ruby
chocoelho has quit [Client Quit]
ResidentBiscuit has quit [Client Quit]
cdolan has joined #ruby
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
CrazyEddy has joined #ruby
shinnya has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Ping timeout: 256 seconds]
cdolan has quit [Ping timeout: 248 seconds]
ResidentBiscuit has joined #ruby
k0mpa has joined #ruby
<baweaver> Not sure if they were trolling or not havenwood
CrazyEddy has quit [Ping timeout: 240 seconds]
k0mpa has quit [Write error: Connection reset by peer]
jnollette has quit [Write error: Connection reset by peer]
code_zombie_ has joined #ruby
rfoust has joined #ruby
|ifei5good has joined #ruby
Azure|dc has joined #ruby
nofxx_ has joined #ruby
vtx_ has joined #ruby
Lloyd_ has joined #ruby
nathani has joined #ruby
JJonah_ has joined #ruby
deimos_ has joined #ruby
Lloyd_ is now known as Guest44326
cstrahan_ has joined #ruby
fredx_ has joined #ruby
BuildTheRobots_ has joined #ruby
netwoodle has joined #ruby
mahlon_ has joined #ruby
chihhsin_ has joined #ruby
WhereIsMySpoon_ has joined #ruby
lupine_ has joined #ruby
daed_ has joined #ruby
meesles has joined #ruby
<meesles> join #rubyonrails
<meesles> NO
argoneus_ has joined #ruby
<meesles> NOOOOOO
dtcristo1 has joined #ruby
code_zombie has quit [*.net *.split]
__main__ has quit [*.net *.split]
vtx has quit [*.net *.split]
nadir has quit [*.net *.split]
naprimer has quit [*.net *.split]
Azure has quit [*.net *.split]
nofxx has quit [*.net *.split]
lupine has quit [*.net *.split]
|ifei5g00d has quit [*.net *.split]
dcluna has quit [*.net *.split]
daed has quit [*.net *.split]
fredx has quit [*.net *.split]
WhereIsMySpoon has quit [*.net *.split]
ryotarai has quit [*.net *.split]
chihhsin has quit [*.net *.split]
eblip has quit [*.net *.split]
JJonah has quit [*.net *.split]
mnathani has quit [*.net *.split]
drcode has quit [*.net *.split]
dtcristo has quit [*.net *.split]
mahlon has quit [*.net *.split]
BuildTheRobots has quit [*.net *.split]
Lloyd has quit [*.net *.split]
cstrahan has quit [*.net *.split]
Brak____________ has quit [*.net *.split]
Tristan-Speccy has quit [*.net *.split]
kloeri has quit [*.net *.split]
matthewd has quit [*.net *.split]
rileyy has quit [*.net *.split]
nekomune has quit [*.net *.split]
ujjain has quit [*.net *.split]
deimos has quit [*.net *.split]
noodle has quit [*.net *.split]
gf3 has quit [*.net *.split]
argoneus has quit [*.net *.split]
HashNuke has quit [*.net *.split]
jwheare has quit [*.net *.split]
Iambchop has quit [*.net *.split]
Guest82765 has quit [*.net *.split]
SuperTux88 has quit [*.net *.split]
vtx_ is now known as vtx
netwoodle is now known as noodle
JJonah_ is now known as JJonah
async_prince has joined #ruby
Guest44326 is now known as Lloyd
kloeri_ has joined #ruby
cstrahan_ is now known as cstrahan
dcluna_ has joined #ruby
deimos_ is now known as deimos
BuildTheRobots_ is now known as BuildTheRobots
Tristan-Speccy has joined #ruby
SuperTux88 has joined #ruby
naprimer has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
Tristan-Speccy is now known as Guest87912
matthewd has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
ryotarai has joined #ruby
rileyy has joined #ruby
__main__ has joined #ruby
eblip has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
sirecote has quit [Ping timeout: 240 seconds]
mikeiniowa has quit [Ping timeout: 260 seconds]
esObe_ has quit [Ping timeout: 260 seconds]
DmitryBochkarev has joined #ruby
bokayio has quit [Ping timeout: 240 seconds]
gf3 has joined #ruby
_aeris_ has quit [Ping timeout: 260 seconds]
esObe has joined #ruby
bokayio has joined #ruby
cadillac_ has joined #ruby
sirecote has joined #ruby
cdolan has joined #ruby
ta_ has joined #ruby
neo95 has quit [Quit: Leaving]
CrazyEddy has joined #ruby
nekomune has joined #ruby
Iambchop has joined #ruby
_aeris_ has joined #ruby
cdolan has quit [Ping timeout: 260 seconds]
lukeyb has joined #ruby
chichou has joined #ruby
graft has joined #ruby
nadir has joined #ruby
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
scmlinux has quit [Remote host closed the connection]
_aeris_ has quit [*.net *.split]
_aeris_ has joined #ruby
safetypin has joined #ruby
CrazyEddy has quit [Ping timeout: 248 seconds]
lukeyb has quit [Quit: Textual IRC Client: www.textualapp.com]
enterprisey has joined #ruby
chichou has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
cdg has quit [Ping timeout: 255 seconds]
cdolan has joined #ruby
pastorinni has joined #ruby
CrazyEddy has joined #ruby
ResidentBiscuit has quit [Ping timeout: 246 seconds]
vtx has quit [Quit: vtx]
pastorin_ has joined #ruby
cdolan has quit [Ping timeout: 248 seconds]
pastorinni has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
rrichardsr3 has joined #ruby
vee__ has quit [Ping timeout: 260 seconds]
jnollette has joined #ruby
pastorin_ has quit [Ping timeout: 260 seconds]
pastorinni has joined #ruby
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
workmad3 has joined #ruby
alfiemax has joined #ruby
mtkd has quit [Ping timeout: 272 seconds]
cdolan has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
vee__ has joined #ruby
cdolan has quit [Ping timeout: 260 seconds]
zautomata has quit [Ping timeout: 240 seconds]
goepsilongo has quit [Quit: Textual IRC Client: www.textualapp.com]
ResidentBiscuit has joined #ruby
vee__ has quit [Ping timeout: 256 seconds]
goepsilongo has joined #ruby
cdolan has joined #ruby
Mikasi has joined #ruby
ta_ has quit [Ping timeout: 256 seconds]
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
fschuindt has joined #ruby
cdolan has quit [Ping timeout: 248 seconds]
pilne has quit [Quit: Quitting!]
fschuindt has quit [Ping timeout: 240 seconds]
vee__ has joined #ruby
ta_ has joined #ruby
|ifei5good has quit [Read error: Connection reset by peer]
|ifei5g00d has joined #ruby
cdolan has joined #ruby
bmurt has joined #ruby
cdolan has quit [Ping timeout: 248 seconds]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
CrazyEddy has quit [Ping timeout: 256 seconds]
hahuang65 has joined #ruby
AJA4350 has quit [Quit: AJA4350]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CrazyEddy has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Brak____________ has joined #ruby
HashNuke has joined #ruby
jwheare has joined #ruby
cdolan has joined #ruby
ShekharReddy has quit []
safetypin has quit [Quit: Textual IRC Client: www.textualapp.com]
cdolan has quit [Ping timeout: 240 seconds]
chichou has joined #ruby
duderonomy has joined #ruby
chichou has quit [Ping timeout: 240 seconds]
pastorinni has quit [Remote host closed the connection]
DmitryBochkarev has joined #ruby
orbyt_ has joined #ruby
nofxx has joined #ruby
orbyt_ has quit [Client Quit]
gix has joined #ruby
bmurt has joined #ruby
nofxx_ has quit [Ping timeout: 256 seconds]
pastorinni has joined #ruby
cdolan has joined #ruby
gix- has quit [Ping timeout: 240 seconds]
cdolan has quit [Ping timeout: 240 seconds]
MrSparkle has quit [Ping timeout: 256 seconds]
cagomez has joined #ruby
bkxd has joined #ruby
troys_ is now known as troys
MrSparkle has joined #ruby
kapil___ has joined #ruby
dviola has quit [Quit: WeeChat 2.0]
ResidentBiscuit has quit []
workmad3 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 260 seconds]
bmurt has joined #ruby
ta_ has joined #ruby
eckhardt has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdolan has joined #ruby
bmurt has joined #ruby
cdolan has quit [Ping timeout: 264 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
nadir has quit [Quit: Connection closed for inactivity]
pastorinni has quit [Remote host closed the connection]
CrazyEddy has quit [Ping timeout: 240 seconds]
cpallares has quit [Ping timeout: 248 seconds]
tnsi has quit [Ping timeout: 248 seconds]
bkxd_ has joined #ruby
cpallares has joined #ruby
seitensei has joined #ruby
bkxd_ has quit [Read error: Connection reset by peer]
Keltia_ has joined #ruby
CrazyEddy has joined #ruby
_derpy has joined #ruby
chichou has joined #ruby
bkxd has quit [Read error: Connection reset by peer]
bkxd_ has joined #ruby
dupin has joined #ruby
rrichardsr3 has joined #ruby
dupin is now known as Guest33098
jolamb_ has joined #ruby
`derpy has quit [Ping timeout: 255 seconds]
inukshuk has quit [Ping timeout: 255 seconds]
infernix has quit [Ping timeout: 255 seconds]
Keltia has quit [Read error: Connection reset by peer]
biox has quit [Ping timeout: 255 seconds]
jolamb has quit [Ping timeout: 255 seconds]
hxegon_ has quit [Ping timeout: 255 seconds]
Guest33098 is now known as inukshuk
hxegon has joined #ruby
biox has joined #ruby
cdg has joined #ruby
gf3 has quit [Ping timeout: 240 seconds]
cdolan has joined #ruby
chichou has quit [Ping timeout: 248 seconds]
bokayio has quit [Ping timeout: 240 seconds]
bokayio has joined #ruby
gf3 has joined #ruby
cdg has quit [Ping timeout: 255 seconds]
ta_ has quit [Ping timeout: 256 seconds]
cdolan has quit [Ping timeout: 248 seconds]
ta_ has joined #ruby
CrazyEddy has quit [Ping timeout: 248 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
eckhardt has joined #ruby
ur5us has joined #ruby
CrazyEddy has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
ur5us has quit [Ping timeout: 252 seconds]
jaequery has joined #ruby
cdolan has joined #ruby
<mistergibson> anyone use qml gem here?
alfiemax has joined #ruby
infernix has joined #ruby
cdolan has quit [Ping timeout: 240 seconds]
jaequery has quit [Client Quit]
CrazyEddy has quit [Ping timeout: 252 seconds]
monodoh has joined #ruby
aupadhye has joined #ruby
monodoh has left #ruby [#ruby]
DmitryBochkarev has joined #ruby
jamesaxl has joined #ruby
anisha has joined #ruby
CrazyEddy has joined #ruby
reber has joined #ruby
gulp-gulp has joined #ruby
rhebz916 has joined #ruby
CrazyEddy has quit [Ping timeout: 240 seconds]
iamarun has joined #ruby
alfiemax has quit [Ping timeout: 252 seconds]
hahuang65 has joined #ruby
ta_ has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
hahuang65 has quit [Ping timeout: 255 seconds]
akkad has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
rrichardsr3 has quit [Quit: He who dares .... wins.]
CrazyEddy has joined #ruby
akkad has joined #ruby
cdolan has joined #ruby
CrazyEddy has quit [Ping timeout: 252 seconds]
<baweaver> mistergibson: you'd have better luck just asking your question
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
SCHAPiE has quit [Ping timeout: 272 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RougeT430 has joined #ruby
goepsilongo has quit [Ping timeout: 255 seconds]
cdolan has quit [Ping timeout: 248 seconds]
chmurifree is now known as chmuri
CrazyEddy has joined #ruby
alfiemax_ has joined #ruby
bkxd_ has quit [Ping timeout: 268 seconds]
zenspider_ has joined #ruby
elphe has quit [Quit: leaving]
pavelz_ has joined #ruby
conta has joined #ruby
coderphive_ has joined #ruby
rhebz916_ has joined #ruby
linduxed_ has joined #ruby
guardianx has quit []
bkxd has joined #ruby
yCrazyEdd has joined #ruby
ablackack has joined #ruby
kapil___ has quit [Read error: Connection reset by peer]
hr3f has joined #ruby
kapil___ has joined #ruby
[reed] has quit [Ping timeout: 264 seconds]
CrazyEddy has quit [*.net *.split]
alfiemax has quit [*.net *.split]
rhebz916 has quit [*.net *.split]
jamesaxl has quit [*.net *.split]
enterprisey has quit [*.net *.split]
esObe has quit [*.net *.split]
Iambchop has quit [*.net *.split]
JJonah has quit [*.net *.split]
Lloyd has quit [*.net *.split]
code_zombie_ has quit [*.net *.split]
coderphive has quit [*.net *.split]
linduxed has quit [*.net *.split]
hsiktas has quit [*.net *.split]
sparr has quit [*.net *.split]
rideh has quit [*.net *.split]
Zimsky has quit [*.net *.split]
justinweiss has quit [*.net *.split]
olivierjanss has quit [*.net *.split]
cttttt has quit [*.net *.split]
llua has quit [*.net *.split]
Tony-St4rk has quit [*.net *.split]
contradictioned has quit [*.net *.split]
Olipro has quit [*.net *.split]
pavelz has quit [*.net *.split]
Drakevr has quit [*.net *.split]
Nightmare has quit [*.net *.split]
zenspider has quit [*.net *.split]
Derperperd has quit [*.net *.split]
scott4000 has quit [*.net *.split]
DarkBushido has quit [*.net *.split]
cschneid has quit [*.net *.split]
jtperreault has quit [*.net *.split]
larissa has quit [*.net *.split]
kent\n has quit [*.net *.split]
caw__ has quit [*.net *.split]
wsmoak has quit [*.net *.split]
justizin has quit [*.net *.split]
peteretep has quit [*.net *.split]
swgillespie has quit [*.net *.split]
kapowaz has quit [*.net *.split]
ewilliam has quit [*.net *.split]
darthThorik has quit [*.net *.split]
ablackack_ has quit [*.net *.split]
Jicemo_ has quit [*.net *.split]
twe4ked has quit [*.net *.split]
tuelz has quit [*.net *.split]
coderphive_ is now known as coderphive
yCrazyEdd is now known as CrazyEddy
Derperpe- has joined #ruby
Drakevr has joined #ruby
troys is now known as troys_
jamesaxl has joined #ruby
href has quit [Ping timeout: 248 seconds]
hr3f is now known as href
lele has quit [Ping timeout: 272 seconds]
hsiktas has joined #ruby
[reed] has joined #ruby
[reed] has joined #ruby
[reed] has quit [Changing host]
bokayio has quit [Ping timeout: 240 seconds]
mitchellvanw has quit [Ping timeout: 260 seconds]
veloutin has quit [Ping timeout: 260 seconds]
llua has joined #ruby
cdolan has joined #ruby
lele has joined #ruby
veloutin has joined #ruby
bokayio has joined #ruby
mitchellvanw has joined #ruby
code_zombie_ has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
enterprisey has joined #ruby
JJonah has joined #ruby
esObe has joined #ruby
Lloyd has joined #ruby
Iambchop has joined #ruby
cttttt has joined #ruby
Tony-St4rk has joined #ruby
sparr has joined #ruby
Zimsky has joined #ruby
Nightmare has joined #ruby
justinweiss has joined #ruby
DarkBushido has joined #ruby
scott4000 has joined #ruby
Olipro has joined #ruby
olivierjanss has joined #ruby
cschneid has joined #ruby
rideh has joined #ruby
contradictioned has joined #ruby
jtperreault has joined #ruby
kapowaz has joined #ruby
wsmoak has joined #ruby
swgillespie has joined #ruby
peteretep has joined #ruby
twe4ked has joined #ruby
ewilliam has joined #ruby
darthThorik has joined #ruby
justizin has joined #ruby
Jicemo_ has joined #ruby
kent\n has joined #ruby
caw__ has joined #ruby
larissa has joined #ruby
tuelz has joined #ruby
caw__ has quit [Max SendQ exceeded]
sparr has quit [Max SendQ exceeded]
Olipro has quit [Max SendQ exceeded]
Olipro has joined #ruby
sparr has joined #ruby
caw__ has joined #ruby
cdolan has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby
bokayio has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Read error: Connection reset by peer]
bokayio has joined #ruby
TinkerTyper has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
CrazyEddy has quit [Ping timeout: 256 seconds]
biberu has joined #ruby
chmuri has quit [Excess Flood]
chmurifree has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
DmitryBochkarev has joined #ruby
cdolan has joined #ruby
CrazyEddy has joined #ruby
alfiemax has joined #ruby
SCHAPiE has joined #ruby
enterprisey has quit [*.net *.split]
esObe has quit [*.net *.split]
JJonah has quit [*.net *.split]
Lloyd has quit [*.net *.split]
Iambchop has quit [*.net *.split]
Zimsky has quit [*.net *.split]
rideh has quit [*.net *.split]
contradictioned has quit [*.net *.split]
olivierjanss has quit [*.net *.split]
justinweiss has quit [*.net *.split]
Tony-St4rk has quit [*.net *.split]
cttttt has quit [*.net *.split]
Nightmare has quit [*.net *.split]
cschneid has quit [*.net *.split]
jtperreault has quit [*.net *.split]
DarkBushido has quit [*.net *.split]
larissa has quit [*.net *.split]
scott4000 has quit [*.net *.split]
kent\n has quit [*.net *.split]
wsmoak has quit [*.net *.split]
justizin has quit [*.net *.split]
peteretep has quit [*.net *.split]
swgillespie has quit [*.net *.split]
kapowaz has quit [*.net *.split]
twe4ked has quit [*.net *.split]
Jicemo_ has quit [*.net *.split]
darthThorik has quit [*.net *.split]
ewilliam has quit [*.net *.split]
tuelz has quit [*.net *.split]
alfiemax_ has quit [Ping timeout: 248 seconds]
rhebz916_ has quit [Ping timeout: 260 seconds]
cdolan has quit [Ping timeout: 252 seconds]
bokayio has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
bokayio has joined #ruby
nadir has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
bkxd has joined #ruby
bkxd has quit [Max SendQ exceeded]
Mikasi has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
cdolan has joined #ruby
Jello_Raptor has quit [Ping timeout: 268 seconds]
Jello_Raptor has joined #ruby
konsolebox has quit [Ping timeout: 260 seconds]
gulp-gulp has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 252 seconds]
konsolebox has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
cdolan has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby
RougeT430 has quit [Ping timeout: 248 seconds]
guardianx has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
alex`` has joined #ruby
KeyJoo has joined #ruby
oleo has quit [Quit: Leaving]
konsolebox has quit [Ping timeout: 260 seconds]
fusta has quit [Ping timeout: 265 seconds]
troys_ is now known as troys
konsolebox has joined #ruby
fusta has joined #ruby
gulp-gulp has joined #ruby
pdcawley has quit [Ping timeout: 256 seconds]
meesles has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
cdolan has joined #ruby
gulp-gulp has quit [Ping timeout: 264 seconds]
troys has quit [Quit: Bye]
Zimsky has joined #ruby
Jicemo has joined #ruby
rideh has joined #ruby
esObe has joined #ruby
Nightmare has joined #ruby
kapowaz has joined #ruby
peteretep has joined #ruby
cttttt has joined #ruby
darthThorik has joined #ruby
jtperreault has joined #ruby
justizin has joined #ruby
swgillespie has joined #ruby
Lloyd has joined #ruby
JJonah has joined #ruby
DarkBushido has joined #ruby
DarkBushido has joined #ruby
cschneid has joined #ruby
scott4000 has joined #ruby
wsmoak has joined #ruby
enterprisey has joined #ruby
twe4ked has joined #ruby
larissa has joined #ruby
justinweiss has joined #ruby
Tony-St4rk has joined #ruby
contradictioned has joined #ruby
ewilliam has joined #ruby
Iambchop has joined #ruby
cdolan has quit [Ping timeout: 248 seconds]
olivierjanss has joined #ruby
kent\n has joined #ruby
ur5us has joined #ruby
bokayio has quit [Ping timeout: 240 seconds]
mitchellvanw has quit [Ping timeout: 240 seconds]
tuelz has joined #ruby
bokayio has joined #ruby
mitchellvanw has joined #ruby
rhebz916 has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
konsolebox has quit [Ping timeout: 252 seconds]
konsolebox has joined #ruby
amatas has joined #ruby
ShekharReddy has joined #ruby
Riddell has quit [Ping timeout: 240 seconds]
bkxd_ has joined #ruby
guardianx has quit []
Riddell has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby
coderxin has joined #ruby
pikislabis has joined #ruby
andikr has joined #ruby
cdolan has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
cdolan has quit [Ping timeout: 252 seconds]
ta_ has quit [Ping timeout: 264 seconds]
dionysus69 has joined #ruby
bkxd_ has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
ur5us has joined #ruby
ta_ has joined #ruby
MrSparkle has quit [Ping timeout: 248 seconds]
ta_ has quit [Remote host closed the connection]
TomyWork has joined #ruby
ta_ has joined #ruby
Burgestrand has joined #ruby
iamarun has quit [Ping timeout: 240 seconds]
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
huyderman has joined #ruby
ta_ has joined #ruby
Pekoe has joined #ruby
ta_ has quit [Remote host closed the connection]
MrSparkle has joined #ruby
abcd has joined #ruby
stealth[] has joined #ruby
Pekoe has quit [Quit: Page closed]
abcd has quit [Client Quit]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
ferr has joined #ruby
pikislabis has quit [Quit: pikislabis]
chmurifree is now known as chmuri
jp has joined #ruby
bkxd has joined #ruby
unreal has quit [Ping timeout: 256 seconds]
cdolan has joined #ruby
ana_ has joined #ruby
claudiuinberlin has joined #ruby
cdolan has quit [Ping timeout: 248 seconds]
InfinityFye has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
InfinityFye has left #ruby [#ruby]
bkxd has quit [Ping timeout: 248 seconds]
ta_ has joined #ruby
bkxd has joined #ruby
ur5us has quit [Remote host closed the connection]
techn1cs has quit [Ping timeout: 240 seconds]
ta_ has quit [Remote host closed the connection]
ur5us has joined #ruby
despai has joined #ruby
cdolan has joined #ruby
tomphp has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
enterprisey has quit [Remote host closed the connection]
pikislabis has joined #ruby
cdolan has quit [Ping timeout: 256 seconds]
coderxin has quit [Ping timeout: 252 seconds]
ur5us has quit [Remote host closed the connection]
despai has quit [Quit: ...]
ur5us has joined #ruby
gulp-gulp has joined #ruby
mark_66 has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 240 seconds]
konsolebox has joined #ruby
sundhell is now known as sundhell_away
unreal has joined #ruby
pikislabis has quit [Quit: pikislabis]
kapil___ has quit [Quit: Connection closed for inactivity]
ur5us has joined #ruby
conta has quit [Quit: conta]
konsolebox has quit [Ping timeout: 252 seconds]
gulp-gulp has quit [Remote host closed the connection]
pikislabis has joined #ruby
bkxd_ has joined #ruby
jaequery has joined #ruby
marr has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
bkxd__ has joined #ruby
jnyw has quit [Quit: WeeChat 2.0]
bkxd has quit [Ping timeout: 256 seconds]
cdolan has joined #ruby
konsolebox has joined #ruby
gulp-gulp has joined #ruby
duderono_ has joined #ruby
Burgestrand has quit [Read error: Connection reset by peer]
Burgestrand has joined #ruby
bkxd_ has quit [Ping timeout: 272 seconds]
yeticry has quit [Ping timeout: 255 seconds]
duderonomy has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
cdolan has quit [Ping timeout: 240 seconds]
yeticry has joined #ruby
alfiemax_ has joined #ruby
mikecmpbll has joined #ruby
gulp-gulp has quit [Remote host closed the connection]
itachi has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
cdg has quit [Ping timeout: 250 seconds]
iamarun has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ishido has quit [Remote host closed the connection]
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
code_zombie_ has quit [Ping timeout: 265 seconds]
Ishido has joined #ruby
kies has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
cdolan has joined #ruby
cdolan has quit [Ping timeout: 248 seconds]
pikislabis has quit [Quit: pikislabis]
duderonomy has joined #ruby
kies has joined #ruby
KeyJoo has quit [Ping timeout: 252 seconds]
cadillac_ has quit [Read error: Connection reset by peer]
pikislabis has joined #ruby
chichou has joined #ruby
konsolebox has quit [Ping timeout: 252 seconds]
itachi has quit [Quit: Leaving]
konsolebox has joined #ruby
cdolan has joined #ruby
Musashi007 has joined #ruby
mikhael_k33hl has joined #ruby
KeyJoo has joined #ruby
<mikhael_k33hl> Is it good practice to place multiple modules in one file? like I have a file named commons.rb and I'm planning to place all modules to be shared in that file
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
cdolan has quit [Ping timeout: 240 seconds]
Beams has joined #ruby
Serpent7776 has joined #ruby
bkxd__ has quit [Ping timeout: 252 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
bkxd_ has joined #ruby
vichib has quit [Read error: Connection reset by peer]
ledestin has joined #ruby
code_zombie_ has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
code_zombie_ has quit [Client Quit]
ur5us has quit [Ping timeout: 240 seconds]
fschuindt has joined #ruby
kits has joined #ruby
ur5us has joined #ruby
Dimik has quit [Remote host closed the connection]
dn` has quit [Quit: dn`]
dn` has joined #ruby
cdolan has joined #ruby
chichou has quit [Quit: WeeChat 2.0]
Drakevr has quit [Changing host]
Drakevr has joined #ruby
GodFather has quit [Read error: No route to host]
kits has quit [Quit: Leaving]
GodFather has joined #ruby
cdolan has quit [Ping timeout: 240 seconds]
Sina has quit [Quit: Connection closed for inactivity]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rhebz916 has quit [Quit: Leaving]
KeyJoo has quit [Ping timeout: 252 seconds]
sundhell_away is now known as sundhell
duderonomy has joined #ruby
Cavallari has joined #ruby
ur5us has quit [Remote host closed the connection]
hahuang65 has joined #ruby
Cavallari1 has joined #ruby
Cavallari has quit [Ping timeout: 252 seconds]
Cavallari1 is now known as Cavallari
chmuri has quit [Excess Flood]
ur5us has joined #ruby
chmurifree has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd_ has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
Musashi007 has quit [Quit: Musashi007]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
jameser has quit [Remote host closed the connection]
cdolan has joined #ruby
KeyJoo has joined #ruby
cdg has joined #ruby
cdolan has quit [Ping timeout: 252 seconds]
Musashi007 has joined #ruby
cdg has quit [Ping timeout: 265 seconds]
mostly-harmless has quit [Read error: Connection reset by peer]
Burgestrand has quit [Quit: Closing time!]
kies has quit [Ping timeout: 265 seconds]
coderxin has joined #ruby
fschuindt has quit [Quit: WeeChat 2.0]
vtx has joined #ruby
Musashi007 has quit [Quit: Musashi007]
vtx has quit [Client Quit]
lupine_ is now known as lupine
omphe has joined #ruby
<mikhael_k33hl> Anybody can recommend a good book/article for ruby threads/concurrency?
coderxin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
coderxin has joined #ruby
duderonomy has joined #ruby
alfiemax has joined #ruby
mikhael_k33hl has quit [Ping timeout: 260 seconds]
terens has joined #ruby
alfiemax_ has quit [Ping timeout: 256 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
bkxd_ has joined #ruby
milardovich has quit [Remote host closed the connection]
KeyJoo has quit [Ping timeout: 252 seconds]
bkxd has quit [Ping timeout: 240 seconds]
<terens> hi
DmitryBochkarev has joined #ruby
<terens> is there a good book for threads/concurency in rubyu?
drcode has joined #ruby
<apeiros> the "standard" books might have chapters on threads/concurrency, see topic for a list
kedare has joined #ruby
<apeiros> ping me if you find a good one so I can add it topically
alfiemax has quit [Remote host closed the connection]
bkxd has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
bkxd_ has quit [Ping timeout: 260 seconds]
bkxd has quit [Max SendQ exceeded]
<terens> I found it thnx
Azure|dc has quit [Read error: Connection reset by peer]
Azure has joined #ruby
bkxd has joined #ruby
iamarun has quit [Remote host closed the connection]
bkxd has quit [Max SendQ exceeded]
Ishido has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
AJA4350 has joined #ruby
Cavallari has quit [Quit: Cavallari]
vtx has joined #ruby
<vtx> hi guys, has anyone here used mongodb with ruby? some of my queries take 10-20 seconds to complete, and when i have a number of queries running as part of a single request, my request takes minutes to complete. i was wondering if anyone had experience of improving mongo performance with the ruby driver? or if there are some options i can provide that will speed up my query completion time?
amatas_ has joined #ruby
Ishido has joined #ruby
amatas_ has quit [Quit: amatas_]
pikislabis has left #ruby [#ruby]
amatas_ has joined #ruby
bkxd has joined #ruby
amatas_ has quit [Ping timeout: 260 seconds]
guille-moe has joined #ruby
al2o3-cr has joined #ruby
jaruga has joined #ruby
dima_ has joined #ruby
coderxin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mk[] has joined #ruby
coderxin has joined #ruby
DmitryBochkarev has quit [Ping timeout: 268 seconds]
Psybur has joined #ruby
sspreitz has quit [Ping timeout: 272 seconds]
bkxd has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
danielpclark has joined #ruby
bkxd_ has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
amatas_ has joined #ruby
alfiemax_ has joined #ruby
Psybur_ has joined #ruby
rabajaj has joined #ruby
sammi` has quit [Quit: Lost terminal]
jeffreylevesque has quit [Ping timeout: 260 seconds]
leitz has joined #ruby
Psybur has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby
coderxin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd_ has quit []
ur5us has joined #ruby
<mk[]> are there green threads for ruby?
hahuang65 has quit [Ping timeout: 240 seconds]
Puffball has joined #ruby
alfiemax has joined #ruby
kedare_ has joined #ruby
kedare has quit [Ping timeout: 268 seconds]
kedare_ is now known as kedare
ur5us has quit [Ping timeout: 240 seconds]
guille-moe has quit [Ping timeout: 272 seconds]
alfiemax_ has quit [Ping timeout: 260 seconds]
cadillac_ has joined #ruby
elphe has joined #ruby
RougeT430 has joined #ruby
marr has quit [Ping timeout: 240 seconds]
ShekharReddy has quit []
Psybur_ is now known as Psybur
plexigras has joined #ruby
vichib has joined #ruby
mk[] has left #ruby ["WeeChat 1.9.1"]
sylario has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
mostlybadfly has joined #ruby
synthroid has joined #ruby
k0mpa has joined #ruby
roshanavand has quit [Quit: Leaving]
coderxin has joined #ruby
milardovich has quit [Ping timeout: 272 seconds]
mtkd has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
<vtx> hi guys, when creating a `BSON::Regexp::Raw` instance with: BSON::Regexp::Raw.new(/^#{name}\/.*/), i get: “warning: flags ignored” how can i get rid of this warning?
Cavallari has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
k0mpa has quit [Ping timeout: 272 seconds]
alfiemax_ has joined #ruby
miskatonic has joined #ruby
mikhael_k33hl has joined #ruby
<apeiros> vtx: way to omit about all necessary context…
<mikhael_k33hl> how do I determine what ruby interpreter am I using?
<apeiros> vtx: BSON::Regexp::Raw is not from ruby, so maybe start by telling us where that comes from
<apeiros> mikhael_k33hl: ruby -v
<apeiros> mikhael_k33hl: within ruby, RUBY_VERSION, also various other RUBY_ constants for other details. like e.g. RUBY_ENGINE
<mikhael_k33hl> apeiros: ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
<mikhael_k33hl> apeiros: irb puts RUBY_VERSION doesn't display anything
alfiemax has quit [Ping timeout: 260 seconds]
Musashi007 has joined #ruby
<apeiros> you don't have to puts it. but that it shows nothing is rather weird. RUBY_VERSION exists for ages…
gnufied has joined #ruby
<vtx> apeiros: sorry, i’m using it when querying my mongodb, and i guess it’s the point at which i execute my query that i get the warning
gnufied__ has joined #ruby
hahuang65 has joined #ruby
<mikhael_k33hl> apeiros: hmmm, so how do I determine if I'm using MRI or something else?
<apeiros> vtx: is there more than just a single mongodb driver for ruby?
gnufied__ has quit [Client Quit]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> mikhael_k33hl: your `ruby -v` indicates that you're using MRI. no idea about your irb. that RUBY_VERSION is blank there is as said rather weird.
<apeiros> I'd probably check `which irb` and compare with `which ruby`
<vtx> apeiros: um im not sure, i’m using “require “mongo”” which i guess is the default choice?
<apeiros> vtx: great. that's what you next time should lead with :-p
<mikhael_k33hl> apeiros: I'm sorry but I'm fairly new to ruby, which part of ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux] indicates it is using MRI?
bmurt has joined #ruby
<vtx> apeiros: sorry
<apeiros> mikhael_k33hl: the part where it's missing any information about it being another engine. and yes, it means that you need to know that which isn't great.
<apeiros> mikhael_k33hl: e.g. jruby will contain "jruby" in that thingy
monodoh has joined #ruby
<mikhael_k33hl> apeiros: oh so MRI is the defacto okay got it thanks
<apeiros> vtx: funny. gem install mongo; pry -rmongo !> cannot load such file -- mongo
hahuang65 has quit [Ping timeout: 248 seconds]
<apeiros> vtx: since that happens, let me ask - which gem do you use which allows for a `require 'mongo'`
Musashi007 has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
jeffreylevesque has joined #ruby
<vtx> apeiros: so i have “gem "mongo", ">=2.4.3"” in my gemfile
cabotto has joined #ruby
<apeiros> yeah, mongo 2.4.3 is what it installed here.
<apeiros> oh dear
<apeiros> I'm not in the root dir, and the current dir has a Gemfile :D
<apeiros> vtx: ok, I don't get a warning with `name = "hello"; BSON::Regexp::Raw.new(/^#{name}\/.*/)`
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<apeiros> so I guess you'll have to reveal an actual value for name which causes the warning
Musashi007 has quit [Quit: Musashi007]
chocoelho has joined #ruby
al2o3-cr has joined #ruby
milardovich has joined #ruby
chocoelho has quit [Client Quit]
rabajaj has quit [Quit: Leaving]
dionysus69 has quit [Ping timeout: 265 seconds]
monodoh has quit [Quit: monodoh]
Cavallari has quit [Quit: Cavallari]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rabajaj has joined #ruby
rfoust has joined #ruby
pavelz_ is now known as pavelz
pavelz has quit [Changing host]
pavelz has joined #ruby
jobewan has joined #ruby
cdg has joined #ruby
sspreitz has joined #ruby
jameser has joined #ruby
balo has quit [Quit: leaving]
aupadhye has quit [Ping timeout: 240 seconds]
alex`` has quit [Ping timeout: 246 seconds]
balo has joined #ruby
dima_ has quit [Quit: This computer has gone to sleep]
alex`` has joined #ruby
JaccoP has joined #ruby
meesles has joined #ruby
nofxx has quit [Ping timeout: 248 seconds]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
terens2 has joined #ruby
shinnya has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
terens has quit [Ping timeout: 240 seconds]
mjolnird has joined #ruby
ur5us has joined #ruby
John___ has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 260 seconds]
ShekharReddy has joined #ruby
RougeT430 has quit [Ping timeout: 264 seconds]
webguynow has quit [Ping timeout: 248 seconds]
webguynow has joined #ruby
danielpclark has quit [Quit: Leaving]
ferr has quit [Quit: WeeChat 2.0]
cadillac_ has quit [Read error: Connection reset by peer]
jamiejackson has joined #ruby
<mikhael_k33hl> If I have a class named WorkerPool, and plan to instantiate subclsses called Worker and have them share data throu WorkerPool's variable, what's the best way for doing that?
RougeT430 has joined #ruby
jnollette has quit [Remote host closed the connection]
jnollette has joined #ruby
terens2 has quit [Remote host closed the connection]
<apeiros> class WorkerPool; @shared = {}; class << self; attr_reader :shared; end; end
<apeiros> and then WorkerPool.shared
<apeiros> if your worker pool is threaded, you should NOT provide a direct accessor. instead use gating methods, which synchronize over a mutex.
chocoelho has joined #ruby
<apeiros> mikhael_k33hl: ^
hays_ has joined #ruby
<hays_> I am looking for a better pattern than this for envirnoment overrides: ENV['FOO'] ? ENV['FOO'] : do_something_else
griffindy has joined #ruby
griffindy has quit [Client Quit]
<apeiros> ENV['foo'] || other
<apeiros> hays_: ^
GodFather has quit [Quit: Ex-Chat]
GodFather_ has joined #ruby
conta2 has joined #ruby
cadillac_ has joined #ruby
<apeiros> alternatively: ENV.fetch(key, default) or even ENV.fetch(key) { default }
Rapture has joined #ruby
conta2 has quit [Client Quit]
tvw has joined #ruby
<hays_> what if I've already set the value
<hays_> like foo = ENV['foo'] || foo ?
cadillac_ has quit [Read error: Connection reset by peer]
<mikhael_k33hl> apeiros: Oh so use a class instance variable, the WOrker Pool will run on the main thread but the instantiated subclasses will be threaded
ta_ has quit [Remote host closed the connection]
<apeiros> mikhael_k33hl: then as I said, don't provide direct access, provide access through synchronized methods
<apeiros> hays_: I don't follow
marr has joined #ruby
<hays_> apeiros: foo = ENV['foo'] || foo
<mikhael_k33hl> apeiros: Oh like Mutex, hmmm, i'm looking into celluloid at the moment btw
<hays_> apeiros: this would be the way to do it, but it seems also repetetive. This is the case where foo is already assigned
<apeiros> hays_: again, I don't follow
dinfuehr has quit [Ping timeout: 248 seconds]
Burgestrand has joined #ruby
_aeris_ has quit [K-Lined]
_aeris_ has joined #ruby
<hays_> apeiros: so if foo isn't assigned, then the pattern foo = ENV['foo'] || default_value works great--no repetition. However if foo is already assigned to a value and and I want to override if it there is an environment variable, I have to repeat the 'foo' at the end. So I'm wondering if there is a way to do this that is better than foo = ENV['foo'] || foo, which assigns foo to itself if ENV['foo'] is empty
dinfuehr has joined #ruby
<mikhael_k33hl> apeiros: For a ruby script using rsync, what are your recommendations? gems maybe?
r0ph has joined #ruby
<apeiros> hays_: I don't think there's a non-repetitive form of `a = b || a`
rabajaj has quit [Quit: Leaving]
RougeT430 has quit [Ping timeout: 248 seconds]
<apeiros> mikhael_k33hl: I don't have any. if you don't want to shell out, I'd search rubygems, then ruby-toolbox
nofxx has joined #ruby
al2o3-cr has joined #ruby
chocoelho has quit [Ping timeout: 272 seconds]
kedare has quit [Quit: kedare]
polishdub has joined #ruby
cadillac_ has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
elphe has quit [Ping timeout: 260 seconds]
Guest3691 has joined #ruby
<mikhael_k33hl> apeiros: pertaining the GIL on MRI, since only one thread is allowed to run, how to you put a thread that is currently syncing in the backgroud to allow other threads to run?
kedare has joined #ruby
JaccoP has quit [Remote host closed the connection]
<apeiros> you don't
<apeiros> that's what the scheduler does
kedare has quit [Client Quit]
JaccoP has joined #ruby
<apeiros> and that's why you have threads in the first place, so you do not have to manage what's run when.
<mikhael_k33hl> apeiros: hmmmm, is that handled automatically?
<mikhael_k33hl> apeiros: so when the interpreter detects that one thread is detecting that it is waiting some IO operations, it puts it in the background and let other threads run?
<apeiros> yes. that's - as said - the very point of threads.
<apeiros> not just when it waits on IO
chocoelho has joined #ruby
<apeiros> each thread gets a slice of time to progress on its code
<mikhael_k33hl> apeiros: oh okay, I get it now hmm better refactor my code, lol
Guest3691 has quit [Read error: Connection reset by peer]
<apeiros> this is also the reason why you have to protect shared resources.
cdg has quit [Remote host closed the connection]
<Burgestrand> fibers use cooperative scheduling though
<dminuoso> Burgestrand: Strictly speaking so do threads in 95% of all cases :P
<apeiros> dminuoso: no
<apeiros> dminuoso: cooperative would mean the thread controls the scheduling. they do not. apart from sleep.
<dminuoso> apeiros: They do. Preemption frequencies are really low to avoid high tlb pressure.
<dminuoso> apeiros: They do.
<dminuoso> apeiros: Almost every syscall calls the scheduler first.
<dminuoso> Which means any kernel interaction is essentially a cooperative yield
<Burgestrand> dminuoso It's hard to starve the other threads of CPU time though, no?
<apeiros> dminuoso: that's not what cooperative scheduling is.
<Burgestrand> (unless you do something funny in C and avoid calling any ruby methos :D)
<apeiros> dminuoso: the moment there is a scheduler, you do *not* have cooperative
mtkd has quit [Ping timeout: 248 seconds]
<dminuoso> apeiros: yes you do...
<apeiros> reread the definition. you're wrong.
<dminuoso> apeiros: You dont get to pick the next task.
cadillac__ has joined #ruby
<apeiros> you don't get to pick not to run another thread.
<dminuoso> apeiros: its not scheduling that conflicts with cooperation, its preemption.
<apeiros> other threads do not need *cooperation* from the running thread
elphe has joined #ruby
<apeiros> which is why it's called *cooperative* multithreading
Guest37853 has quit [Ping timeout: 264 seconds]
danielglh has quit [Ping timeout: 255 seconds]
mtkd has joined #ruby
sundhell is now known as sundhell_away
<dminuoso> Burgestrand: Well even then you cant realistically starve CPU time, but you can drastically decrease responsiveness of your system.
<Burgestrand> Yeeah, but I could do that by allocating gobs of memory too :)
<dminuoso> Burgestrand: If you're on a single CPU system and you're playing a movie, then highly computational code will seriously impact your experience if your kernel is configured with a low preemption frequency (which most linux kernels by default have)
<dminuoso> Yeah I guess
<Burgestrand> I don't think I'd pick ruby as my first choice for any kind of media playback to be fair :)
<Burgestrand> Because of the garbage collector
meesles has quit [Ping timeout: 268 seconds]
nahra` has joined #ruby
<dminuoso> apeiros: The thing is kernels *do* expect kernels to yield implicitly by making syscalls. This is done to drastically reduce unnecessary TLB pressure and pipeline flushes.
wolfshappen has quit [Ping timeout: 248 seconds]
<Burgestrand> What's a TLB?
<Burgestrand> dminuoso ^
<dminuoso> transaction lookaside buffer
<Burgestrand> Yeah not helping :p but I can google that!
<Papierkorb> *translation
nahra has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 252 seconds]
jnollette has quit [Ping timeout: 272 seconds]
<apeiros> dminuoso: that may all well be
<dminuoso> Burgestrand: Essentially the cache for virtual/physical page mapping
cabotto has quit [Ping timeout: 272 seconds]
<apeiros> dminuoso: it doesn't change the definition, though
<dminuoso> Burgestrand: Though come to think of it.. it doesn't increase TLB pressure. But it definitely causes pipeline flushes.
<dminuoso> (Whereas cooperative scheduling does not)
<Burgestrand> Ah, cool, the TLB reduces the cost of memory cache misses due to e.g. context switching?
<dminuoso> Burgestrand: Well there is an indirect relation. The TLB is fairly limited, so the less context switching happens the less evictions you get.
wolfshappen has joined #ruby
<Burgestrand> Fair enough, cache trashing is also a thing :)
<Burgestrand> … trashing or thrashing?
jnollette has joined #ruby
<Burgestrand> thrashing, TIL
<dminuoso> thrashing
cdg has joined #ruby
zautomata has joined #ruby
mjolnird has quit [Remote host closed the connection]
alfiemax_ has quit [Remote host closed the connection]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
oleo has joined #ruby
chocoelho has quit [Ping timeout: 252 seconds]
<hays_> is there a preferred way to do string formatting other than "%02d" % [foo]
balo has quit [Ping timeout: 248 seconds]
<Burgestrand> hays_ Not AFAIK, but there's always another way(tm)
balo has joined #ruby
<Burgestrand> I mean, string interpolation is probably even more used…
ineb has quit [Ping timeout: 248 seconds]
Guest29916 has quit [Ping timeout: 248 seconds]
tvw has quit []
<hays_> yeah. it just looks a little weird agains tthe "#{foo}" syntax
hahuang65 has joined #ruby
<hays_> but it works great
Flashynuff has joined #ruby
<Burgestrand> Well, it does have numerical padding unlike straight up string interpolation :)
<Burgestrand> e.g. adding spaces or zeroes to number to make them fit their desired width
guille-moe has joined #ruby
<Burgestrand> (String#lpad doesn't count)
ineb has joined #ruby
<apeiros> dminuoso: "all programs must cooperate for the entire scheduling scheme" (source: https://en.wikipedia.org/wiki/Cooperative_multitasking) - ruby's threads do not require cooperation. therefore *not* cooperative scheduling. that you *can* voluntarily give up process time does not change that.
<Burgestrand> :D
<apeiros> but apparently the controlling instance for threads in a cooperative multitasking env is still called "scheduler", so I guess I have to be more explicit there.
<apeiros> i.e. "presence of scheduler implies non-cooperative" was wrong. "presence of a scheduler which can forcedly change the scheduled thread implies non-cooperative" would be a better fit.
hahuang65 has quit [Ping timeout: 248 seconds]
<hays_> Burgestrand: maybe one way to do it would be to derive an object from Integer that overrides to_s
<Burgestrand> Ah, right, so if I'm sitting there and actively deciding which fiber to run then I'm the scheduler
<apeiros> yes
<Burgestrand> hays_ Absolutely, FixedWidthIntegerWithPadding(0) :D
IceDragon has joined #ruby
<Burgestrand> Darn, `.new(0)`
<apeiros> fibers are cooperative. but it has a scheduler (which afaik isn't you - or is there a way to explicitly state which fiber runs next?).
<Burgestrand> apeiros you can transfer control from one fiber to another one
<hays_> Celluloid is cool. I've used it once. The GIL is kind of a bummer though.
<apeiros> ok. so you can even be a scheduler with fibers :D
<Burgestrand> So in theory you could send a request to somebody's cellphone asking which fiber to run next
russt has quit [Ping timeout: 260 seconds]
* apeiros rebuilt the behavior of JS with threads once - should have used fibers. would have been much easier and probably more performant :D
<Burgestrand> hays_ Nah, most of the time people's issue with the GIL is just their issue with the GIL, and nothing much concrete
RougeT430 has joined #ruby
<Burgestrand> I mean, that's just my opinion, but I don't think it's as bad as it's been made out to be
<hays_> Burgestrand: well it prevents the use of multiple cores
<Burgestrand> I've written my fair share of concurrent software in ruby by now, the GIL turned out to be a problem only when I was doing some audio playback stuff on a raspberry pi :d
troys has joined #ruby
<Burgestrand> hays_ Yeah, and that's a bummer, but most of the time that doesn't matter and you'll be running multiple instances of your software on the same machine through multiple processes anyway!
<hays_> guess it depends on your use case for Celluloid
<Burgestrand> Absolutely!
russt has joined #ruby
<hays_> my use case was that I really wanted separate independent threads within the script/process
<Burgestrand> One of the larger celluloid projects I wrote was interaction with a game server to send semi-live positional data for in-game vehicles to a web frontend, and even then we could easily serve over 20k simultaneous users in a single ruby process
<hays_> it ended up working, but it did stress out some of the laptops we ran it with due to the single core. Then I tried jruby and found concurrency bugs that didn't show up with the GIL.
<Burgestrand> Ah yes, that'll bite you in the switch for sure, concurrency is hard!
<hays_> still don't know what it was--thought I had mutexes on everything. probably will never figure it out
<hays_> handed the project to an electrical engineer and now the code is pretty unmaintainable
<hays_> that may not have been the best idea
<Burgestrand> Hah
<hays_> anyone bored and want to help me figure out the best way to tie into an existing gem? I am using rmodbus, and I want to make some event-driven stuff when the server gets a query. trying to figure the best place to tie in
mikecmpb_ has joined #ruby
milardovich has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 264 seconds]
milardovich has joined #ruby
cadillac__ is now known as cadillac_
chocoelho has joined #ruby
Burgestrand has quit [Quit: Closing time!]
milardovich has quit [Ping timeout: 248 seconds]
RougeT430 has quit [Ping timeout: 248 seconds]
pastorinni has joined #ruby
miskatonic has joined #ruby
jolamb_ is now known as jolamb
mikecmpb_ has quit [Quit: inabit. zz.]
mark_66 has quit [Quit: Leaving.]
mikecmpbll has joined #ruby
milardovich has joined #ruby
jaequery has joined #ruby
cdg has quit [Remote host closed the connection]
alfiemax has joined #ruby
cdg has joined #ruby
cschneid_ has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
dinfuehr has quit [Ping timeout: 268 seconds]
dinfuehr has joined #ruby
neo95 has joined #ruby
apeiros has quit []
cdg has quit [Ping timeout: 265 seconds]
andikr has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 256 seconds]
kent\n has quit [Ping timeout: 255 seconds]
kent\n has joined #ruby
ana_ has quit [Quit: Leaving]
chocoelho has quit [Ping timeout: 252 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hays_ has quit [Remote host closed the connection]
cadillac_ has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
consti has joined #ruby
synthroid has quit [Remote host closed the connection]
neo95 has quit [Remote host closed the connection]
lxnr has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
hays_ has joined #ruby
consti has quit [Quit: consti]
<hays_> I am using this gem (rmodbus) and I'd like to modify its behavior. Specifically, I want to make the @holding_register = {} here (https://github.com/rmodbus/rmodbus/blob/434ad4921993d0f5419e3412f2d4437ef5188b00/lib/rmodbus/server.rb#L9) a custom class that implements the same API. How would I hook into the class to make this change?
<hays_> is overriding them as simple as assignment inside a new module block
consti has joined #ruby
lxnr has quit [Quit: WeeChat 2.0.1]
nofxx_ has joined #ruby
cadillac_ has joined #ruby
nofxx has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
<hays_> hrm. ok that didn't work
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikhael_k33hl has quit [Ping timeout: 260 seconds]
troys is now known as troys_
ur5us has quit [Ping timeout: 252 seconds]
nofxx_ has quit [Ping timeout: 248 seconds]
jaequery has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
raynold has quit [Quit: Connection closed for inactivity]
nofxx has joined #ruby
synthroid has joined #ruby
troys_ is now known as troys
<hays_> how am I thinking about this wrong? https://bpaste.net/show/0cae106a2c47
<hays_> I'm expecting that holding_register to be now wrapped in my new object
[Butch] has joined #ruby
cagomez has joined #ruby
cadillac_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
<hays_> do i need to override the getter/setter?
chocoelho has joined #ruby
rippa has joined #ruby
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 252 seconds]
<hays_> hrm. that didn't do it either
cadillac_ has quit [Read error: Connection reset by peer]
pabs has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
alex`` has quit [Quit: WeeChat 2.0]
RickHull has joined #ruby
mikecmpb_ has quit [Ping timeout: 248 seconds]
cadillac_ has joined #ruby
Serpent7776 has quit [Quit: Leaving]
cadillac_ has quit [Read error: Connection reset by peer]
alex`` has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
rfoust has joined #ruby
mtkd has joined #ruby
raynold has joined #ruby
hays_ has quit [Ping timeout: 248 seconds]
cadillac_ has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
guille-moe has quit [Ping timeout: 264 seconds]
dviola has joined #ruby
hahuang65 has joined #ruby
cadillac_ has joined #ruby
techn1cs has joined #ruby
techn1cs has quit [Changing host]
techn1cs has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
hahuang65 has quit [Ping timeout: 240 seconds]
jnollette has quit [Ping timeout: 272 seconds]
jnollette has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
goepsilongo has joined #ruby
[Butch] has joined #ruby
cadillac_ has joined #ruby
consti has quit [Quit: consti]
SeepingN has joined #ruby
sanscoeur has joined #ruby
safetypin has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Beams has quit [Quit: .]
FrostCandy has joined #ruby
skweek has quit [Ping timeout: 265 seconds]
anisha has quit [Quit: This computer has gone to sleep]
TomyWork has quit [Remote host closed the connection]
skweek has joined #ruby
omphe has quit [Quit: WeeChat 1.4]
orbyt_ has joined #ruby
r0ph has quit [Quit: Textual IRC Client: www.textualapp.com]
hahuang65 has joined #ruby
gizmore has joined #ruby
bmurt has joined #ruby
ta_ has joined #ruby
gizmore|2 has joined #ruby
falka has joined #ruby
gizmore|3 has joined #ruby
falka has left #ruby [#ruby]
[diecast] has quit [Changing host]
[diecast] has joined #ruby
[diecast] has joined #ruby
gizmore has quit [Ping timeout: 248 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
centrx has joined #ruby
centrx has quit [Changing host]
centrx has joined #ruby
gizmore|2 has quit [Ping timeout: 252 seconds]
cajone has quit [Ping timeout: 248 seconds]
orbyt_ has joined #ruby
dviola has quit [Quit: WeeChat 2.0]
dviola has joined #ruby
jeffreylevesque has quit [Ping timeout: 248 seconds]
troys is now known as troys_
ur5us has joined #ruby
dviola has quit [Client Quit]
ur5us has quit [Read error: No route to host]
cajone has joined #ruby
<gizmore|3> is there type hinting planned / avail in JRuby maybe? i have read about contracts gem in ruby.. is it almost same as type hinting?
<gizmore|3> isnt it a more horrible slowdown? .... a typesafe ruby is a dream
gizmore|3 is now known as gizmore
despai has joined #ruby
<RickHull> gizmore: crystal and elixir offer ruby-like aesthetics with additional type guarantees, catching type errors before runtime
<gizmore> neato.... they are not ruby tho...?
<gizmore> is there the normal gems?
alfiemax has quit [Remote host closed the connection]
<RickHull> gizmore: this video is not the easiest to follow, but here is some proposal for types in ruby https://www.youtube.com/watch?v=Fjv9GxPXtck
mjolnird has joined #ruby
<gizmore> i dislike videos... but i give it a try. thank you
<RickHull> gizmore: it's a pipe dream, I feel. ruby is fundamentally duck typed
<dminuoso> gizmore: elixir doesnt realistically give type guarantees.
<RickHull> to add powerful typing to ruby would make it not ruby
<dminuoso> gizmore: Dialyzer is horrid to use.
<dminuoso> By gizmore I meant RickHull.
<RickHull> dminuoso: you get guarantees like pattern matched functions
<RickHull> but yes, I am not a fan of dialyzer -- last I looked
<RickHull> but you do get some errors at "compile time" rather than runtime
<dminuoso> gizmore: type hints are on the roadmap though.
cagomez has quit [Remote host closed the connection]
<gizmore> dminuoso: thank you!
TomyLobo has joined #ruby
<gizmore> would be awesome to have typehints in ruby
cagomez has joined #ruby
<RickHull> what is the programmer UX for type hints?
<RickHull> what are the wins?
<gizmore> what is UX? user exp?
<RickHull> yes
<gizmore> your IDE can easily create links in the src
<gizmore> like aptana studio could easily allow ctrl+click to jmp between funcs
<RickHull> so it's primarily about IDE stuff, not detecting errors?
<gizmore> yes
<gizmore> for my side... yes
<gizmore> "mostly"
<dminuoso> RickHull: What are the wins? Is that question serious?
<dminuoso> RickHull: Let's say you have this situation:
<gizmore> not 100%.. but 95% .... the error catching is indeed a nice to have
<dminuoso> f :: (String -> Bool) -> String -> String
<dminuoso> And you call it with a double.
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RickHull> the question is serious :) I like discussing things that I am fuzzy on
<dminuoso> Why should it not hit you in the face when you save?
amatas_ has quit [Quit: amatas_]
<RickHull> is that a type hint or strong typing?
<dminuoso> It's obviously wrong. To defer this error to runtime is just hiding bugs.
<dminuoso> RickHull: type hints are a necessity from incomplete typing systems.
<gizmore> in PHP there is auto conversion even.... like foo(string $bar) is auto converted to string
<RickHull> i understand the wins from strong typing -- I'm a true believer
<RickHull> i am asking about mere type hints
<dminuoso> RickHull: Im not talking about strong typing.
<gizmore> aptana studio could need type hinting :(
<gizmore> type hint might be a win:win
<gizmore> type hint might be a win:win:win
<dminuoso> RickHull: Type hints a) document usage (something you will do in rdoc anyway) and augment an incomplete type system when inference is not total.
cagomez has quit [Ping timeout: 248 seconds]
<RickHull> is it distinct from type annotations? or would that cover strong typing as well?
<RickHull> i also like the idea of type inference
xco has joined #ruby
<dminuoso> RickHull: Nah, its just a synonymous expression.
<dminuoso> RickHull: And stop talking about strong typing.
<dminuoso> C++ for example is somewhat weakly type.
cagomez has joined #ruby
<dminuoso> *typed
<xco> i want to grab the first and last names of a User and interpolate it in a view. I have this, it doesn’t look pretty, is there a better way to do it? <%= "Reviewer: " + User.where(id: image_response.reviewed_by).pluck(:first_name, :last_name).first.to_s %>
jeffreylevesque has joined #ruby
<RickHull> by strong typing, I mean that type checking occurs and where the check fails, there is an error
<RickHull> what is the term for that?
<dminuoso> xco: Dont trigger queries in your views.
<dminuoso> RickHull: Typing.
<RickHull> so ruby has types, right?
<dminuoso> RickHull: Ruby is singly typed.
<dminuoso> It has the one single type: Dynamic.
<RickHull> what is weak about c++ types?
<dminuoso> RickHull: type promotions, type conversions, reinterpret casts
<xco> dminuoso: what can i do instead?
<dminuoso> xco: pre calculate it before you feed it into the view.
hays_ has joined #ruby
<xco> dminuoso: in the Model you mean?
<RickHull> in the controller, presumably
<RickHull> or the model, depending
orbyt_ has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
<hays_> how am I thinking about this wrong? https://bpaste.net/show/0cae106a2c47
<RickHull> xco: I like this from railsconf https://www.youtube.com/watch?v=HctYHe-YjnE
GodFather_ has quit [Ping timeout: 272 seconds]
<hays_> I'm expecting that holding_register to be now wrapped in my new object
meesles has joined #ruby
gizmore|2 has joined #ruby
<hays_> how am I misunderstanding this concept? I thought changes like this were possible in Ruby
jeffreylevesque has quit [Ping timeout: 252 seconds]
<RickHull> hays_: are you aware that @holding_registers is a "class instance variable" and not a normal ivar?
<RickHull> because of the scope where you assign it
<RickHull> (I think that's the case)
<RickHull> you would typically assign an ivar within a method definition
alfiemax has joined #ruby
<hays_> yeah, I think that is the case as well
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<RickHull> ok, I see -- it's that way in the gem too
<hays_> RickHull: I've also tried defining a holding_register function to overload the attr_accessor
<dminuoso> RickHull: For example in Haskell its impossible to feed an Integer into a place that expects a Double. Types don't automatically convert.
<dminuoso> RickHull: But the real weak thing about C++ is reinterpret_cast.
marr has quit [Ping timeout: 268 seconds]
gizmore has quit [Ping timeout: 252 seconds]
<RickHull> hays_: I wouldn't expect that to help. I see that holding_registers is sometimes a method parameter and other times referring to the "class instance variable" (or would it be "module instance variable"?)
raul782 has joined #ruby
<dminuoso> hays_: You shouldnt poke into internals like that. It will break rmodbus.
ledestin has joined #ruby
<RickHull> to me, this gem's design is confusing
<dminuoso> hays_: The gem makes assumptions about how holding_registers is used.
fChanX has joined #ruby
<hays_> dminuoso: ok. well I'm trying to figure out how to trigger an action whenever @holding_registers is changed
<hays_> so I'd like to replace it with something that is wrapped
<RickHull> hays_: I see that it's nominally an array -- why would you try to substitute a hash?
<dminuoso> hays_: Is this for debugging purposes?
<hays_> RickHull: yeah, brain fart on my part
<fChanX> Hello. :) I am wondering, what do you guys use ruby for? I have seen a lot of Rails things, but I am wondering if people are using it for anything else?
<hays_> dminuoso: no
<dminuoso> hays_: Then at the very least derive from Array and dont observably change its interface.
<hays_> dminuoso: its not working. the code has no effect
<dminuoso> fChanX: I don't.
<fChanX> You don't use Rails?
rippa has joined #ruby
<havenwood> fChanX: It's popular for dev ops (Chef, Puppet, etc), other web frameworks (Sinatra, Hanami, Roda, etc), telephony (Adhearsion), modeling automobile or aircraft hardware and software, and so on.
<hays_> dminuoso: @holding_registers = MyArray.new seems to have no effect on the code
<hays_> RickHull: I agree the gem is very confusing
<dminuoso> fChanX: I dont use Ruby.
<dminuoso> Outside of the 2 rails apps. Nowadays.
<fChanX> Oh ok.
elphe has quit [Ping timeout: 248 seconds]
<hays_> it works in just an irb session (the deriving from Array)
<fChanX> Thanks guys!
<hays_> but setting @holding_registers = MyArray.new doesn't seem to actually do anything
fChanX has left #ruby [#ruby]
<RickHull> one thing that I'm confused by -- can an instance method refer (properly) to a class instance variable?
<RickHull> it seems to me that rmodbus wants @holding_registers to be both an ivar and a class-ivar
<RickHull> and i'm not sure if they correspond or are totally distinct
<RickHull> when referring to @holding_registers in an instance method -- I think this is only the ivar and not the class-ivar
<RickHull> so I'm not sure what purpose the class-ivar serves
<hays_> maybe I need to modify TCPServer somehow
<RickHull> i believe @holding_registers only refers to the class-ivar in a class context -- and so again, not sure what purpose it serves
<hays_> like rerun include Server somehow?
<RickHull> now, it could be that modules which are mixed in -- their class-ivars might get plonked into the ivar space -- but I doubt it
<hays_> so that "include Server" would seem to add it in as an instance variable?
<RickHull> my guess is that the @holding_registers class-ivar is totally useless and irrelevant
<RickHull> hays_: yes, that is a remote and unlikely possibility, but ruby and mixins are pretty weird so I can't rule it out
<RickHull> hays_: probably what you want to do is `srv.holding_registers = MyThing.new`
<hays_> hmm
<dminuoso> 20:07 RickHull | one thing that I'm confused by -- can an instance method refer (properly) to a class instance variable?
<dminuoso> no
apeiros_ has joined #ruby
<dminuoso> RickHull: class instance variables are not "special"
<dminuoso> they are instance variables like any other instance variable.
<RickHull> so it's pretty weird that rmodbus defines class instance variables
Cavallari has joined #ruby
<RickHull> but doesn't deign to use them
<dminuoso> The only "confusing" thing is the name "class instance variables"
<dminuoso> They are just regular instance variables of the class object itself.
<RickHull> that's what I thought, but it appears rmodbus didn't get the memo
mjolnird has quit [Remote host closed the connection]
sameerynho has joined #ruby
<hays_> RickHull: I like your idea of just modifying the array like that
<hays_> that also however doesn't seem to do the trick
<hays_> srv.holding_registers = MyArray.new [0]*11000
<hays_> interestingly, this works when I access it directly in the code, but not when I make the change via the server
<RickHull> git grep tells me that rmodbus's class-ivars are indeed totally useless and irrelevant
<RickHull> call it 90-95% certain
alfiemax has quit [Remote host closed the connection]
<RickHull> hays_: in that case, it is a method arg
<RickHull> it's not using the ivar
<RickHull> this gem is ... interesting
<hays_> so.. srv.holding_registers = MyArray.new [0]*11000 won't effec tit?
dviola has joined #ruby
<RickHull> hard to say -- I'm not really interested in untangling the logic :/
neo95 has joined #ruby
<RickHull> but you understand the difference between a method arg and an ivar? holding_registers is effectively local to the method and does not affect the ivar
sameerynho has quit [Quit: WeeChat 1.9.1]
nofxx_ has joined #ruby
<RickHull> you'll have to figure out what calls #exec_req and what is passed to it
nofxx has quit [Read error: Connection reset by peer]
<hays_> yeah, ok. I see what you are saying
<hays_> yeah, its a method arg here srv.holding_registers = MyArray.new [0]*11000
<RickHull> it seems silly to not just reference the ivar in the exec_req method
<RickHull> it also seems silly to define and never use class-ivars
<RickHull> v0v
<RickHull> i *would* expect your ivar setting to affect what is passed in
<RickHull> but perhaps #exec_req is called before you set your ivar
<apeiros_> RickHull: not every gem author is an A class ruby programmer
vichib has quit [Remote host closed the connection]
despai_ has joined #ruby
apeiros_ is now known as apeiros
<RickHull> for sure -- but I always assume I'm the one who doesn't get it -- so I give lots of benefit of the doubt
meesles has quit [Ping timeout: 248 seconds]
<RickHull> I assume the code is intentional and does stuff for a reason
despai has quit [Ping timeout: 256 seconds]
<RickHull> and I sympathize with those using the code as a reference for hacking on it, and getting confused
<apeiros> space/tab mixed for indent causes me to have a strong bias
<dminuoso> 20:27 apeiros_ | RickHull: not every gem author is an A class ruby programmer
<dminuoso> They should be.
<dminuoso> We should set up a tribunal.
<apeiros> disagree
<RickHull> trial by codewars
<hays_> this is interesting. setting the holding_registers with my wrapped array actually breaks the code
<apeiros> but it'd be nice if there was a segmentation system in rubygems to see at least a basic code quality classification
<RickHull> i'm not sure this "confusion" can be detected systematically (easily)
<hays_> Am I doing this right? https://bpaste.net/show/bbf1803cbb4f
<RickHull> using the same thing conceptually with the same name as class-ivar, ivar, and method arg
<hays_> like, this ^^ should essentially do nothing, but it breaks the code.
<RickHull> what's broken?
<dminuoso> RickHull: Ignoring things like XXX_eval or instance_Variable_set, yes.
<dminuoso> (A parser will reveal this information quickly)
<RickHull> well -- it could be that it's useful to have the class-ivar, ivar, and method arg
<RickHull> i assumed it was
<RickHull> and further inspection showed it was useless and irrelevant
<RickHull> as far as I looked, anyway
nofxx_ has quit [Ping timeout: 252 seconds]
<RickHull> if only we had rick-as-a-service
<hays_> RickHull: the connection resets
<hays_> pdu = func.chr + (params[:quant] * 2).chr + holding_registers[params[:addr],params[:quant]].pack('n*')
<RickHull> hays_: i'd guess your assignment is blowing away state in the old array
<hays_> hm. what is somearray[0,1]
<RickHull> a slice, i think
<hays_> guess i need to look at function prototype of [] and []=?
<RickHull> yeah, they do more than you think
<RickHull> just go to the rdoc
<RickHull> &ri Array#[]
netherwolfe has joined #ruby
coderxin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
netherwolfe has quit [Client Quit]
nofxx has joined #ruby
pabs has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<hays_> RickHull: i don't know how to interpret that-- you can pass into the [] a 1,2 and the 2 is a length... does that come in as a single argument?
<hays_> like def [] idx
<RickHull> `def [](*args)`
<RickHull> aka variadic args
mtkd has quit [Ping timeout: 252 seconds]
<RickHull> are you familiar with splat?
<hays_> I'll need to read about it
conta2 has joined #ruby
<RickHull> >> def foo(*args); args.map { |a| a**2 }; end; foo(1,2,3)
<ruby[bot]> RickHull: # => [1, 4, 9] (https://eval.in/923955)
eckhardt has joined #ruby
<hays_> *args ok it comes in as an array i guess
<hays_> hm so []=[*args, val] ? does that make sense?
mtkd has joined #ruby
<hays_> hm. guess so
<hays_> that's pretty flexible
<hays_> money.got it
<hays_> thanks
<hays_> that's a wonderful solution, to just assign srv.holding_registers
<hays_> now I just need to learn all the ways items will come into the array
ShekharReddy has quit [Quit: Connection closed for inactivity]
<hays_> which the above doc helps with
raul782 has quit [Remote host closed the connection]
reber has quit [Quit: Leaving]
alfiemax has joined #ruby
<hays_> should I be using .class to distinguish between an Integer, a Range, and other things coming into Array?
<apeiros> hays_: no. almost never.
<apeiros> a.is_a?(b) >>> a.class == b
<apeiros> also note that you can do: case obj; when Integer then … when Range then … …
elementaru has joined #ruby
<apeiros> and last but not least - if it is your code, IMO avoid coming into this situation instead.
<hays_> well im just overriding Array
<dminuoso> apeiros: Wow you just made me stare in total confusion.
<dminuoso> I just read >>> as something completely different.
<dminuoso> for 2 minutes.
<apeiros> dminuoso: :-p
<apeiros> hays_: uh, what? how about: don't?
<apeiros> if you do, I really hope you have a very strong case to
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xenial64-user has joined #ruby
<hays_> a gem expects me to assign something as an array, and then it uses it. so it seemed sensible to reimplement the interface
<hays_> since I want to tie in at that point and do something whenever that array is modified
<hays_> seems like case is a good way to go
conta2 has quit [Quit: conta2]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
claudiuinberlin has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has quit [Quit: xco]
<apeiros> hays_: that's not necessarily "overriding Array". the only sensible interpretations in ruby for that to me was that you either monkey patched array or did `class MyArray < Array`
<hays_> #2
ur5us has joined #ruby
<apeiros> well, then: bad :)
reber has joined #ruby
<apeiros> does it test for the class or inheritance? if not, use duck-typing
jenrzzz has quit [Ping timeout: 252 seconds]
alfiemax has quit [Remote host closed the connection]
<hays_> im basically going to have a dict of function objects for read and writing actions to the array, and whenever the array is accessed, it will look for an object associated with that index and execute the function object associated with that index, if any.
marr has joined #ruby
<apeiros> no, I meant does the library where you want to pass your array-replacement explicitly test whether it is an array?
<apeiros> if not, you don't need (and absolutely should not) to inherit from Array
<hays_> it does not
<hays_> so you are going to argue for composition right?
<hays_> if I do that, don't I have to pick through the code and find every Array method it uses and write passthroughs?
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
vee__ has quit [Quit: WeeChat 1.9.1]
rippa has joined #ruby
orbyt_ has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
darkhanb has joined #ruby
alfiemax has joined #ruby
<darkhanb> Hey guys, that's the ruby on rails channel?
<havenwood> ?rails darkhanb
<ruby[bot]> darkhanb: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<havenwood> darkhanb: #rubyonrails
zanshin has quit [Quit: WeeChat 1.9.1]
<darkhanb> thanks
orbyt_ has quit [Client Quit]
coderxin has joined #ruby
<dminuoso> o/ havenwood
<havenwood> dminuoso: \o
zanshin has joined #ruby
zanshin has quit [Client Quit]
zanshin has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
orbyt_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
Psybur_ has joined #ruby
jaruga has quit [Quit: jaruga]
cdg has joined #ruby
Psybur has quit [Ping timeout: 248 seconds]
cagomez has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
Psybur_ has quit [Ping timeout: 252 seconds]
raul782 has joined #ruby
workmad3 has joined #ruby
guille-moe has joined #ruby
guille-moe1 has joined #ruby
guille-moe1 has quit [Remote host closed the connection]
alfiemax has joined #ruby
Guest79992 has quit [Ping timeout: 265 seconds]
guille-moe has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
tsglove has quit [Quit: Leaving]
fredx_ has quit [Quit: Leaving]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cavallari has quit [Quit: Cavallari]
Psybur has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
KeyJoo has joined #ruby
meesles has joined #ruby
vtx has quit [Quit: vtx]
jaequery has joined #ruby
coderxin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782 has quit [Remote host closed the connection]
kies has joined #ruby
jaequery has quit [Client Quit]
dionysus69 has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
hays_ has quit [Ping timeout: 240 seconds]
Silthias has joined #ruby
Silthias has left #ruby [#ruby]
xenial64-user has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 272 seconds]
nso95- has joined #ruby
nso95 has quit [Ping timeout: 256 seconds]
DLSteve has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has joined #ruby
chichou has joined #ruby
cagomez has quit [Remote host closed the connection]
[Butch] has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
coderxin has joined #ruby
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
orbyt_ has quit [Client Quit]
cagomez has joined #ruby
connor_goodwolf has quit [Ping timeout: 240 seconds]
connor_goodwolf has joined #ruby
orbyt_ has joined #ruby
cagomez has quit [Ping timeout: 264 seconds]
chichou has quit [Quit: WeeChat 2.0]
jamesaxl has quit [Quit: WeeChat 1.9.1]
nogic has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
cadillac_ has joined #ruby
mtkd has quit [Ping timeout: 264 seconds]
FrostCandy has quit []
raul782 has joined #ruby
John__ has joined #ruby
mtkd has joined #ruby
John___ has quit [Ping timeout: 252 seconds]
jaequery has joined #ruby
jaequery has quit [Client Quit]
pastorin_ has joined #ruby
pastorinni has quit [Ping timeout: 248 seconds]
meesles has quit [Ping timeout: 252 seconds]
hays_ has joined #ruby
hays_ has quit [Changing host]
hays_ has joined #ruby
jnyw has joined #ruby
jaequery has joined #ruby
synthroid has quit []
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Remote host closed the connection]
reber has quit [Remote host closed the connection]
hays_ has quit [Ping timeout: 240 seconds]
halt has joined #ruby
jnyw has quit [Client Quit]
tomphp has joined #ruby
halt is now known as Guest18813
Guest18813 has quit [K-Lined]
centrx has quit []
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
troys_ is now known as troys
cdg has quit [Ping timeout: 250 seconds]
kapil___ has joined #ruby
vtx has joined #ruby
postmodern has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has joined #ruby
tomphp has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
webguynow has quit [Ping timeout: 252 seconds]
webguynow has joined #ruby
orbyt_ has joined #ruby
JaccoP has quit [Quit: Leaving]
pastorin_ has quit [Remote host closed the connection]
pastorinni has joined #ruby
Riddell has quit [Changing host]
Riddell has joined #ruby
cdolan has joined #ruby
rfoust has quit [Ping timeout: 265 seconds]
cdolan has quit [Client Quit]
Flashynuff has quit [Quit: Connection closed for inactivity]
safetypin has quit [Ping timeout: 272 seconds]
nogic has quit [Ping timeout: 272 seconds]
amatas has quit [Quit: amatas]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore has joined #ruby
kn-928 has joined #ruby
gizmore|2 has quit [Ping timeout: 240 seconds]
RougeT430 has joined #ruby
SyntaxASI has joined #ruby
zapata has quit [Quit: WeeChat 2.0]
coderxin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
stealth[] has quit [Quit: Leaving]
adac has joined #ruby
zapata has joined #ruby
<adac> how can i fetch a page content if the page is protected by cloudflare?
<adac> always getting ERROR 503: Service Temporarily Unavailable
milardovich has quit [Ping timeout: 260 seconds]
skweek has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
Psybur has quit [Ping timeout: 248 seconds]
polishdub has quit [Quit: leaving]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
cagomez has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
lytol_ has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
orbyt_ has joined #ruby
milardovich has joined #ruby
orbyt_ has quit [Client Quit]
milardovich has quit [Client Quit]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
kn-928 has quit [Quit: WeeChat 2.0.1]
milardovich has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
cdg has joined #ruby
vtx has quit [Quit: vtx]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
romeoh has joined #ruby
cdg has quit [Ping timeout: 265 seconds]
<adac> anyone?
<Papierkorb> adac: Are you sure that page isn't simply down?
meesles has joined #ruby
<adac> Papierkorb, yes it is online. but the cloudflare protection is enabled
<adac> qhere one has to wait up to 5 seconds
<adac> *where
<adac> open_http': 503 Service Temporarily Unavailable (OpenURI::HTTPError)
<Papierkorb> Well, in that case, you're trying to circumvent a security measure, in which case sharing full implementations of such isn't the best idea. You'll have to analyze that "checking your browser" page and then implement its algorithm to proof you're a browser (Which you're not), or you actually use a Browser (e.g. through selenium)
despai_ has quit [Quit: ...]
<adac> Papierkorb, yes I think selenium is an idea
<adac> will try that tomorrow
<adac> thanks and good night!
Musashi007 has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
monodoh has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
hahuang65 has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
alfiemax has joined #ruby
romeoh has quit []
alfiemax has quit [Remote host closed the connection]
chocoelho has quit [Ping timeout: 240 seconds]
leitz has quit [Quit: Nappy time]
vyorkin has joined #ruby
Musashi007 has quit [Quit: Musashi007]
vyorkin has quit [Client Quit]
John__ has quit [Read error: Connection reset by peer]
vyorkin has joined #ruby
biberu has quit []
_whitelogger has joined #ruby
adac has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
DTZUZO has joined #ruby
k0mpa has joined #ruby
TomyLobo has quit [Ping timeout: 264 seconds]
sanscoeu_ has joined #ruby
hahuang65 has joined #ruby
jnyw has joined #ruby
hahuang65 has quit [Client Quit]
sanscoeur has quit [Ping timeout: 264 seconds]