<olensen>
what does "bypasses the strong parameters protection" mean?
asteros has joined #ruby
asteros has quit [Client Quit]
GhettoJava has quit [Quit: This computer has gone to sleep]
<mozzarella>
usually you need to specify attributes which can safely be modified when using mass assignment
<mozzarella>
because the user could add attributes that they shouldn't be able to modify
<mozzarella>
like admin=true, things like that
snath has joined #ruby
<olensen>
so this vuln works the same as mass agisment vulnerability?
GhettoJava has joined #ruby
<olensen>
*assigment
Peter_ has joined #ruby
<mozzarella>
usually it would raise an error because it's not safe, and you'd need to use the params permit stuff, but create_with wasn't checking that, if I understand correctly
echooo has joined #ruby
<olensen>
ok, thanks :)
linojon has joined #ruby
icebourg has joined #ruby
tanath has joined #ruby
razrunelord has quit [Remote host closed the connection]
<mozzarella>
#rubyonrails would have been a better place to ask, btw
<olensen>
ok thanks
wjimenez_ has quit [Remote host closed the connection]
jezebel has quit [Remote host closed the connection]
wjimenez_ has joined #ruby
olensen has left #ruby [#ruby]
klmlfl has joined #ruby
klmlfl has left #ruby [#ruby]
nfk has quit [Quit: yawn]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thams has quit [Quit: thams]
klmlfl has joined #ruby
bearish has joined #ruby
dyreshark has quit [Quit: I just dont know what went wrong!]
andrewjanssen has quit [Quit: Leaving...]
mockra_ has joined #ruby
diegoviola has joined #ruby
nahtnam has joined #ruby
fold has joined #ruby
wjimenez_ has quit [Ping timeout: 250 seconds]
sevenseacat has joined #ruby
sea_local has quit [Remote host closed the connection]
sea_local has joined #ruby
sevvie has quit [Ping timeout: 250 seconds]
bearish has quit [Ping timeout: 245 seconds]
tkuchiki has joined #ruby
PanPan has joined #ruby
jack_rabbit_ has quit [Quit: Leaving]
goleldar has quit [Remote host closed the connection]
Ankhers has joined #ruby
skolman_ has joined #ruby
sea_local has quit [Ping timeout: 245 seconds]
goleldar has joined #ruby
patrick99e99 has quit [Ping timeout: 245 seconds]
sevvie has joined #ruby
<Spami>
So, I think Array.rotate! is burning a lot of memories
<Spami>
I basically have 100 scripts each rotating and array of 2000 entries. It goes up to 30GB of memory used, before all the script get killed. Any idea how to verify my suspicions ?
Ankhers has quit [Remote host closed the connection]
troyready has quit [Ping timeout: 245 seconds]
goleldar has quit [Ping timeout: 264 seconds]
Pharaoh2 has joined #ruby
tris- has joined #ruby
GhettoJava has quit [Quit: Leaving]
skolman__ has joined #ruby
bricker`work has quit [Ping timeout: 260 seconds]
mockra_ has quit [Remote host closed the connection]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mockra has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoyak has quit [Quit: Computer has gone to sleep.]
Pharaoh2 has quit [Ping timeout: 245 seconds]
saltsa_ has quit [Ping timeout: 250 seconds]
skolman_ has quit [Ping timeout: 240 seconds]
nanoyak has joined #ruby
saltsa has joined #ruby
skolman__ has quit [Ping timeout: 246 seconds]
alexju has quit [Remote host closed the connection]
philcrissman has joined #ruby
mockra has quit [Ping timeout: 240 seconds]
Kricir has joined #ruby
philcrissman has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
philcrissman has joined #ruby
linojon has quit [Quit: linojon]
Ankhers has joined #ruby
dayepa has joined #ruby
sevvie has quit [Ping timeout: 246 seconds]
Kricir has quit [Ping timeout: 260 seconds]
Peter_ has quit [Remote host closed the connection]
rubytor has joined #ruby
klmlfl has quit [Remote host closed the connection]
sylvanica has quit [Ping timeout: 260 seconds]
bmurt has quit [Ping timeout: 245 seconds]
philcrissman has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
sevvie has joined #ruby
cndiv has joined #ruby
bmurt has joined #ruby
modernbob has quit []
jonr22 has joined #ruby
toastynerd has joined #ruby
roobie has quit [Quit: leaving]
Cheezebox has quit [Remote host closed the connection]
optiz0r has quit [Ping timeout: 260 seconds]
toastynerd has quit [Remote host closed the connection]
_reset has joined #ruby
Pharaoh2 has joined #ruby
sparrovv has joined #ruby
jonr22 has quit [Ping timeout: 244 seconds]
<zorak>
hi
ddv has quit [Ping timeout: 260 seconds]
reset has quit [Ping timeout: 264 seconds]
_reset has quit [Ping timeout: 240 seconds]
klmlfl_ has joined #ruby
<zorak>
I have a problem and i dont know how formulate he question
nanoyak has quit [Quit: Computer has gone to sleep.]
<zorak>
I have an IF
tokik has joined #ruby
jottr_ has quit [Quit: WeeChat 0.4.3]
<zorak>
that check that one hour be later that 9pm
Pharaoh2 has quit [Ping timeout: 255 seconds]
<zorak>
AND sooner that 4am of the next day
<zorak>
in this way
<zorak>
if entradas[n] >= pm_9(entradas[n]) && salidas[n] <= am_4(entradas[n])
Cheezebox has joined #ruby
sparrovv has quit [Ping timeout: 246 seconds]
lw has joined #ruby
<zorak>
the prblen is that am_4 is gonna check the 4am of the past day
ixti has joined #ruby
<zorak>
maybe with + 24.hours ??
wallerdev has quit [Quit: wallerdev]
dyreshark has joined #ruby
zubov has joined #ruby
fuzzyhorns has joined #ruby
<fuzzyhorns>
so i am trying to read the ruby spec for refinements which is here:
<fuzzyhorns>
and I am failing to have my brain take in the information necessary to answer "why arent active refinements active inside a refine block?"
<fuzzyhorns>
can anyone help my dumb brain :c?
<czaks>
refinements are done per-file
Ankhers has quit [Ping timeout: 264 seconds]
<czaks>
so if you have liba.rb, libb.rb and app.rb, and you enable refinement in app.rb
<czaks>
then the refinement is only avail for this file and not liba, libb
<fuzzyhorns>
lemme cut you off there
<fuzzyhorns>
using allows me to use a refinement defined in one module elsewhere
<fuzzyhorns>
so if I have say, module A
<fuzzyhorns>
where i've defined a refinement
<czaks>
in which file?
<fuzzyhorns>
then I do module B
<fuzzyhorns>
all in the same file, say
<czaks>
ok
<fuzzyhorns>
EOF is not the only thing at play here, but even so, ignoring it
<fuzzyhorns>
module B has using A
<fuzzyhorns>
then I define a refinement in module B
<fuzzyhorns>
but within module B's refinement, it is unaware of using A
<czaks>
i remember i had issues when i tried to do using inside a module
<fuzzyhorns>
and it works on line 6
<fuzzyhorns>
and works on line 16
<fuzzyhorns>
but not within the scope of 5-15, where the refine block is going
<fuzzyhorns>
so I am trying to figure out, based on the spec, is it a lexical thing?
<fuzzyhorns>
ie, spec says:
<fuzzyhorns>
The scope of a refinement is lexical in the sense that, when control is transferred outside the scope (e.g., by an invocation of a method defined outside the scope, by load/require, etc...), the refinement is deactivated.
<czaks>
i see
<czaks>
well i'm not sure about it
AzureDiamond has quit [Ping timeout: 260 seconds]
Photism has quit [Quit: Leaving]
icebourg has quit []
SCHAAP137 has quit [Remote host closed the connection]
<czaks>
i, personally, would recommend against using refinements
<czaks>
esp. that when i last used them
peret has quit [Remote host closed the connection]
<czaks>
a warning was thrown
wjimenez_ has joined #ruby
tfittsy has quit [Read error: Connection reset by peer]
ddv has joined #ruby
<fuzzyhorns>
czaks: i like them, and what i am doing iwht them is outside their main use case i think
jerikl has joined #ruby
<fuzzyhorns>
czaks: i definitely think they should be used carefully though
tfittsy has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
icole has quit [Ping timeout: 240 seconds]
<czaks>
true
djbkd has quit [Remote host closed the connection]
aspires has quit []
optiz0r has joined #ruby
voodoofish1 has joined #ruby
icebourg has joined #ruby
axilla has quit [Ping timeout: 260 seconds]
cndiv has quit [Ping timeout: 260 seconds]
voodoofish has quit [Ping timeout: 245 seconds]
Channel6 has joined #ruby
<czaks>
fuzzyhorns: possibly also ruby version comes into play
<czaks>
i last used ruby 2.0 i believe and i was only able to use refinements for a whole file, not modules
philcrissman has quit [Remote host closed the connection]
philcrissman has joined #ruby
bmurt has quit []
rdavila has quit [Quit: rdavila]
cy has quit [Quit: :q!]
riotjone_ has joined #ruby
cy has joined #ruby
<fuzzyhorns>
czaks: im on 2.1.1 atm
Chris- has joined #ruby
oo_ has quit [Remote host closed the connection]
<zorak>
do you think this is go to work as i think?
<zorak>
59 def enganche(n)
<zorak>
60 descanso = entrada[n+1] - salida[n]
oo_ has joined #ruby
philcrissman has quit [Ping timeout: 250 seconds]
Chris- has quit [Remote host closed the connection]
Soliah has quit [Read error: Connection reset by peer]
Chris- has joined #ruby
riotjones has quit [Ping timeout: 246 seconds]
modernbob has joined #ruby
<fuzzyhorns>
zorak: i cant understand the language i am afraid :c
<zorak>
enganche(0) => entrada[1] - salida[0]
<fuzzyhorns>
can you translate to english?
emocakes has joined #ruby
Chris- has quit [Read error: Connection reset by peer]
<zorak>
the 'n' and the 'n+1' insede the [] is what matters
fabrice31 has joined #ruby
yetanotherdave has quit [Ping timeout: 244 seconds]
klmlfl_ has quit [Remote host closed the connection]
wallerdev has joined #ruby
Hobogrammer has joined #ruby
Lewix has joined #ruby
arup_r has joined #ruby
<pontiki>
zorak, what is the actual question?
fabrice31 has quit [Ping timeout: 245 seconds]
davedev24_ has quit [Read error: Connection reset by peer]
wallerdev has quit [Client Quit]
bthesorceror has joined #ruby
wallerdev has joined #ruby
Kricir has joined #ruby
davedev24_ has joined #ruby
Ankhers has joined #ruby
<zorak>
if the 'n+1' inside the [] works
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
ixti has quit [Quit: WeeChat 0.4.3]
jgrevich has quit [Ping timeout: 260 seconds]
klmlfl has joined #ruby
<pontiki>
is that it? yes. that will work. seems like a simple enough thing to just try, though, isnt' it?
toastynerd has joined #ruby
sea_local has joined #ruby
flowerhack has joined #ruby
<zorak>
yes, you are right
Kricir has quit [Ping timeout: 240 seconds]
butblack has joined #ruby
Kilo`byte has quit [Ping timeout: 255 seconds]
oo_ has quit [Remote host closed the connection]
echooo has quit [Ping timeout: 264 seconds]
oo_ has joined #ruby
mockra has joined #ruby
dayepa has quit [Quit: dayepa]
dayepa has joined #ruby
Kilo`byte has joined #ruby
echooo has joined #ruby
thomasxie has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
jerikl has quit [Quit: jerikl]
klmlfl has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
klmlfl has joined #ruby
bthesorceror has quit [Quit: bthesorceror]
maletor has quit [Quit: Computer has gone to sleep.]
klmlfl has quit [Ping timeout: 245 seconds]
radic has joined #ruby
Cheezebox has quit [Remote host closed the connection]
hamakn has joined #ruby
sinkensabe has joined #ruby
davispuh has quit [Ping timeout: 245 seconds]
dayepa has quit [Quit: dayepa]
radic_ has quit [Ping timeout: 260 seconds]
dayepa has joined #ruby
arup_r has quit [Quit: Leaving.]
zubov has quit [Ping timeout: 260 seconds]
oo_ has quit [Remote host closed the connection]
Pharaoh2 has joined #ruby
oo_ has joined #ruby
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
kaspergrubbe_ has quit [Remote host closed the connection]
sinkensabe has quit [Ping timeout: 264 seconds]
wjimenez_ has quit [Remote host closed the connection]
klmlfl has joined #ruby
Pharaoh2 has quit [Ping timeout: 250 seconds]
Cheezebox has joined #ruby
bearish has joined #ruby
mockra has quit [Ping timeout: 240 seconds]
sea_local has quit [Remote host closed the connection]
butblack has quit [Quit: butblack]
dayepa has quit [Quit: dayepa]
sea_local has joined #ruby
dayepa has joined #ruby
TorpedoSkyline has joined #ruby
klmlfl has quit [Remote host closed the connection]
bearish has quit [Ping timeout: 246 seconds]
klmlfl has joined #ruby
Ulrike_Rayne has joined #ruby
tanath_ has joined #ruby
Kricir has joined #ruby
sea_local has quit [Ping timeout: 260 seconds]
Asher has quit [Quit: Leaving.]
djbkd has joined #ruby
sevvie has quit [Ping timeout: 250 seconds]
crdpink has joined #ruby
tanath has quit [Ping timeout: 264 seconds]
tanath__ has joined #ruby
nobitanobi has joined #ruby
klmlfl has quit [Ping timeout: 246 seconds]
tanath__ is now known as tanath
icebourg has quit []
tanath_ has quit [Ping timeout: 264 seconds]
Kricir has quit [Ping timeout: 260 seconds]
GinoMan has quit [Ping timeout: 260 seconds]
Spami has quit [Quit: This computer has gone to sleep]
<nobitanobi>
I am trying to play with inheritance in a Stack implementation, and I fail to see what is going on when I am calling super on the initializer: https://gist.github.com/novito/9d94594acd5f96379f90
<nobitanobi>
Ok, I shouldn't be doing super.push, but just super.
jamooo has quit [Ping timeout: 250 seconds]
jamooo has joined #ruby
zeroNones has quit [Ping timeout: 250 seconds]
skolman_ has joined #ruby
thumpba_ has joined #ruby
patric100e99 has joined #ruby
braincra- has quit [Quit: bye bye]
thumpba_ has quit [Remote host closed the connection]
krz has joined #ruby
pu22l3r has joined #ruby
fuzzyhorns has left #ruby [#ruby]
patric100e99 has quit [Ping timeout: 250 seconds]
djbkd has quit [Remote host closed the connection]
agrinb has joined #ruby
sdwrage_ has quit [Quit: This computer has gone to sleep]
io_syl has quit [Ping timeout: 245 seconds]
braincrash has joined #ruby
hephaestus_rg has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
Hien has quit [Quit: leaving]
Hien has joined #ruby
axsuul has quit [Ping timeout: 255 seconds]
shevy has quit [Read error: Connection reset by peer]
mfmfmfmfmfmf has quit [Remote host closed the connection]
mfmfmfmfmfmf has joined #ruby
Spami has joined #ruby
nobitanobi has quit [Remote host closed the connection]
InhalingPixels has quit [Remote host closed the connection]
nanoyak has joined #ruby
Peter has joined #ruby
Peter is now known as Guest96437
oo_ has quit [Remote host closed the connection]
qpls_ has quit [Ping timeout: 240 seconds]
InhalingPixels has joined #ruby
<pontiki>
nobitanobi: are you doing anything else in StackWithMin#push ? if not, you don't even need to define it
gremax has quit [Ping timeout: 240 seconds]
gremax has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
froggy__ has joined #ruby
nobitanobi has quit [Remote host closed the connection]
spastorino has quit [Quit: Connection closed for inactivity]
qpls has joined #ruby
froggy_ has quit [Ping timeout: 246 seconds]
icebourg has joined #ruby
sparrovv has joined #ruby
oo_ has joined #ruby
Pharaoh2 has joined #ruby
saarinen has joined #ruby
bradleyprice has joined #ruby
sevvie has joined #ruby
bahamas10 has joined #ruby
jshultz has quit [Quit: Connection closed for inactivity]
sparrovv has quit [Ping timeout: 260 seconds]
<bahamas10>
a = {'foo' => 1}, b = {'foo' => 1, 'bar' => 2}... is there a method to see if b contains everything that a does? (in this case, return true)
<bahamas10>
ie. find all of the keys that a has, and make sure they are in b and are the same value... deeply
Pharaoh2 has quit [Ping timeout: 250 seconds]
bricker`LA has quit [Ping timeout: 244 seconds]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jmbrown412 has joined #ruby
sevvie has quit [Ping timeout: 264 seconds]
<waxjar>
a.all? { |k,v| b[k] == v }
bricker`LA has joined #ruby
SilkFox_ has joined #ruby
Kricir has joined #ruby
philcrissman has joined #ruby
echooo has joined #ruby
Kricir has quit [Ping timeout: 245 seconds]
deric_skibotn has quit [Ping timeout: 245 seconds]
<bahamas10>
waxjar: ! perfect, thanks!... the .all? method is really handy i didn't know about it
bmurt has joined #ruby
bmurt has quit [Remote host closed the connection]
jko_ has joined #ruby
yacks has quit [Ping timeout: 250 seconds]
<pontiki>
does that go deep?
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
<bahamas10>
pontiki: AFAICT it does not... i'm just going to code some logic to do that .each if is_a? Array, and recursively call itself on is_a? Hash
siwica has joined #ruby
<pontiki>
nod
osvico has joined #ruby
kristofferR has joined #ruby
bearish has joined #ruby
fabrice31 has joined #ruby
yacks has joined #ruby
dayepa has joined #ruby
_cake has quit [Ping timeout: 245 seconds]
danijoo has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
danijoo has joined #ruby
juz88 has quit [Ping timeout: 245 seconds]
bearish has quit [Ping timeout: 245 seconds]
juz88 has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
bthesorceror has joined #ruby
earthquake has joined #ruby
zz_anildigital is now known as anildigital
rubytor has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
jerikl has joined #ruby
tfitts has joined #ruby
Ankhers has joined #ruby
axsuul has joined #ruby
tfittsy has quit [Ping timeout: 240 seconds]
nobitanobi has quit [Ping timeout: 260 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
zubov has joined #ruby
lillipad has joined #ruby
lillipad has quit [Client Quit]
lillipad57 has joined #ruby
lillipad57 has quit [Client Quit]
IrishGringo_ has joined #ruby
pu22l3r_ has joined #ruby
djbkd has joined #ruby
pu22l3r has quit [Ping timeout: 255 seconds]
thomasxie has quit [Ping timeout: 240 seconds]
skolman_ has quit [Remote host closed the connection]
Ankhers has quit [Ping timeout: 264 seconds]
skolman has joined #ruby
maletor has joined #ruby
pranny has joined #ruby
cy has quit [Quit: quack]
kidoz has quit [Quit: Ухожу я от вас]
dayepa has quit [Quit: dayepa]
dayepa has joined #ruby
dayepa has quit [Client Quit]
pu22l3r_ has quit [Remote host closed the connection]
dayepa has joined #ruby
Aaaal has joined #ruby
G________ has joined #ruby
dayepa has quit [Client Quit]
ghr has joined #ruby
rezzack has quit [Quit: Leaving.]
dayepa has joined #ruby
dayepa has quit [Client Quit]
JoshGlzBrk has joined #ruby
mikepack has joined #ruby
dayepa has joined #ruby
dayepa has quit [Client Quit]
echevemaster has joined #ruby
Asher has joined #ruby
ghr has quit [Ping timeout: 255 seconds]
OffTheRails_ has joined #ruby
dayepa has joined #ruby
oo_ has quit [Remote host closed the connection]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
sinkensabe has joined #ruby
Channel6 has quit [Remote host closed the connection]
InhalingPixels has quit [Remote host closed the connection]
lw has joined #ruby
Pharaoh2 has joined #ruby
nobitanobi has joined #ruby
<nobitanobi>
pontiki: sorry for late reply. Yes, I am doing other stuff in push (I simplified it to see what was going on).
Pharaoh2 has quit [Read error: Connection reset by peer]
sinkensabe has quit [Ping timeout: 255 seconds]
sea_local has joined #ruby
Pharaoh2 has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
agrinb has quit [Remote host closed the connection]
emocakes has joined #ruby
hellangel7 has joined #ruby
Sauvin has joined #ruby
Sauvin has quit [Max SendQ exceeded]
dayepa has quit [Quit: dayepa]
anildigital is now known as zz_anildigital
Sauvin has joined #ruby
Cheezebox has quit [Remote host closed the connection]
Pharaoh2 has quit [Ping timeout: 250 seconds]
G________ has quit [Ping timeout: 246 seconds]
thomasxie has joined #ruby
arup_r has joined #ruby
io_syl has joined #ruby
lw has quit [Quit: s]
tectonic has joined #ruby
postmodern has quit [Quit: Leaving]
jko_ has quit [Remote host closed the connection]
bearish has joined #ruby
alexju has joined #ruby
Kricir has joined #ruby
Lewix has quit [Remote host closed the connection]
devyn has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
jobewan has joined #ruby
devyn has joined #ruby
User458764 has joined #ruby
Cheezebox has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
king313 has quit [Quit: .]
devyn has quit [Read error: Connection reset by peer]
Lewix has quit [Ping timeout: 240 seconds]
saarinen has quit [Quit: saarinen]
devyn has joined #ruby
OffTheRails_ has quit [Ping timeout: 260 seconds]
earthquake has quit [Quit: earthquake]
zubov has quit [Ping timeout: 250 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
bp___ has joined #ruby
whyy has joined #ruby
emocakes has quit []
TheTopBloke has joined #ruby
EvanGuru has joined #ruby
dayepa has joined #ruby
dayepa has quit [Client Quit]
sea_local has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
kevb has joined #ruby
Sht0 has joined #ruby
icebourg has quit []
kevb has left #ruby [#ruby]
kevb has joined #ruby
kevb has left #ruby [#ruby]
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zz_anildigital is now known as anildigital
Lewix has joined #ruby
kyun has joined #ruby
koderok has joined #ruby
<Hanmac>
EvanGuru: google instance variable VS class instance variable
anildigital is now known as zz_anildigital
koderok has quit [Client Quit]
<Hanmac>
EvanGuru: you defined a class instance variable (an instance variable inside the class itself) but you called it as a instance variable (an instance variable inside the instance of the class)
IrishGringo_ has quit [Ping timeout: 250 seconds]
<EvanGuru>
so should I convert everything to @@
saarinen has joined #ruby
mfmfmfmfmfmf has joined #ruby
<EvanGuru>
well that seemed to work
<EvanGuru>
Thanks Hanmac, been doing ruby for like 15 minutes now
kenneth has joined #ruby
<Hanmac>
hm no @@ variables are totally different and maybe not what you want ...
timonv_ has joined #ruby
bartj3 has quit [Ping timeout: 244 seconds]
bartj3 has joined #ruby
timonv_ has quit [Remote host closed the connection]
<Hanmac>
EvanGuru: just add the @handlers = [] thing inside the initialize method
timonv_ has joined #ruby
<EvanGuru>
Hanmac, no these variables should be instance specific
<Hanmac>
yes THAN they should be in initialize ... otherwise they are for ALL instances the same and that is not what you want
<EvanGuru>
yeah I fixed it
<EvanGuru>
Thanks Hanmac
jimmyhoughjr has quit [Ping timeout: 240 seconds]
asteve has joined #ruby
everett has quit [Ping timeout: 250 seconds]
tlarevo has joined #ruby
tlarevo_ has joined #ruby
asteve has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
charliesome has quit [Quit: zzz]
Kerber0s has joined #ruby
everett has joined #ruby
emocakes has joined #ruby
tlarevo has quit [Ping timeout: 240 seconds]
Cheezebox has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
emocakes has quit [Client Quit]
jerikl has quit [Quit: jerikl]
kyb3r_ has joined #ruby
emocakes has joined #ruby
timonv_ has quit [Remote host closed the connection]
bluOxigen has joined #ruby
bearish has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 260 seconds]
rdark has joined #ruby
timonv_ has joined #ruby
Wolland has joined #ruby
echooo1 has joined #ruby
oo_ has joined #ruby
thomasxie has quit [Ping timeout: 264 seconds]
the_dude has quit [Ping timeout: 260 seconds]
tagrudev has joined #ruby
echooo has quit [Ping timeout: 260 seconds]
starkhalo has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
hellangel7 has quit [Remote host closed the connection]
bthesorceror has quit [Quit: bthesorceror]
sysx1000 has joined #ruby
wjimenez_ has joined #ruby
matcouto has joined #ruby
saarinen has quit [Quit: saarinen]
Pharaoh2 has joined #ruby
hellangel7 has joined #ruby
wjimenez_ has quit [Remote host closed the connection]
roolo has joined #ruby
agrinb has joined #ruby
nobitanobi has quit []
bthesorceror has joined #ruby
sinkensabe has joined #ruby
timonv_ has quit [Remote host closed the connection]
jmbrown412 has quit [Remote host closed the connection]
Pharaoh2 has quit [Ping timeout: 240 seconds]
agrinb has quit [Ping timeout: 250 seconds]
emocakes has quit []
spicerack has joined #ruby
fabrice31 has joined #ruby
sea_local has joined #ruby
oo_ has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
GregWittman has joined #ruby
shlomo has joined #ruby
siwica has quit [Remote host closed the connection]
Kricir has joined #ruby
spicerack has quit [Client Quit]
<shlomo>
Is there a method for combining enumerators? I want to know if there is a shorter way to write this: "Rooms.each do |room| Hour.each do |hour| ... end end" (Rails)
andikr has quit [Remote host closed the connection]
<shevy>
atmosx so many things to do, a lack of time and a lack of motivation to do them all, plus now I am slightly sick so my mood is even worse
<atmosx>
shevy: I'll give you a medicine!
<atmosx>
shevy: start with olanzapine, then combine it with some SSRI to get serotonin syndrome
krisquigley has joined #ruby
<atmosx>
e.g. fluoxetine (just an idea)
ghr has joined #ruby
<atmosx>
shevy: maybe you should try to pursue a lower number of tasks.
<shevy>
atmosx my current task is to generate textfiles called .star files. these are used as intermediary format between several different programs that are used for visualizing datasets derived from electron-microscopy and cryo-electronmicroscopy mostly
mozzarella has quit [Ping timeout: 240 seconds]
<shevy>
basically they are like CSV files actually
<atmosx>
cool, you can use ruby to do that.
<atmosx>
I see
tyrone_ has joined #ruby
<atmosx>
I've worked with the CSV library to dump some data into an SQLite3 database some time before.
<atmosx>
it's old but works fine IIRC
<atmosx>
shevy: that's 1 task, you have others too?
cirn0 has joined #ruby
<atmosx>
shevy: is this for your degree/master's degree or something?
<shevy>
they typically have between 3 up to about 12 fields... name of the image file, x-axis, y-axis, z-axis, correction values, voltage of the microscopy in used... Angstrom/pixel ratio ... and stuff like that
yfeldblum has joined #ruby
<zenspider>
that actually sounds pretty cool
<shevy>
atmosx haha they are so funny ... indeed that is one task, the head of the lab however wants me to do something else now, which is to test out some program written by chinese (???) authors - their english and the documentation is so awful, lemme try to find out what it was
<tyrone_>
I am trying to connect to a server using Direct Socket Interface using SSL. does anyone know why I should have a successful syswrite but not be able to EVER read anything back? I am supposed to get a response message but pending bytes is always 0 whether a given message was valid or not.
<zenspider>
watch out w/ software from .edu's... they're "special" :P
<shevy>
it's basically like this all the time... C++ and Python ... C++ and Python ... C++ and Python ...
ndrei has joined #ruby
<atmosx>
shevy: well python should be pretty similar to ruby, plus you're familiar with py IIRC
ghr has quit [Ping timeout: 240 seconds]
<atmosx>
shevy: cheer up, it's python! hahah
teddyp1cker has quit [Remote host closed the connection]
<shevy>
http://ncmi.bcm.edu/ncmi/software/mpsa/team "Xiangan Liu" "Chuan Hong" "Wen Jiang" they reside in Houston... but are all asian dudes ... with still rather awful english haha :P
<tyrone_>
atmosx, you mean the remote server? It should it is a sandbox for www.forte.net a payment processor. I am wondering about SSL version differences etc. I have submitted a ticket but can't imagine why their system would be borked as I am not the only person using it.
<shevy>
atmosx yeah but it is frustrating, everyone is using python to bridge into C++
LiohAu has joined #ruby
<shevy>
atmosx it's not for my degree, I realized that I don't want to do with any of that really... right now. There is a lack in creativity, I hate that... they are mostly just using stuff written by other people
cirn0 has quit [Ping timeout: 245 seconds]
elaptics`away is now known as elaptics
<atmosx>
tyrone_: I'm trying to understand where the problem is, actually. From what I understand you're able to write to the DB but not read data. Can you test this without SSL to make sure the SSL is the problem?
<zenspider>
rebooting server. ugh.
Magnus has joined #ruby
<atmosx>
shevy: and then why don't you quit?
teddyp1cker has joined #ruby
Pharaoh2 has quit [Quit: Leaving...]
<sevenseacat>
thats a bit of a kneejerk reaction
<zenspider>
tyrone_: man... payment processors are OFTEN borked
<shevy>
atmosx yeah I will quit actually :)
davedev24_ has quit [Remote host closed the connection]
techsethi has quit [Ping timeout: 245 seconds]
<sevenseacat>
'dont like it? just quit'
krisquigley has quit []
teddyp1cker has quit [Read error: No route to host]
<tyrone_>
zenspider, good to know
zenspider has quit [Quit: bye]
davedev24_ has joined #ruby
<xfz>
Hanmac: thank you
<atmosx>
shevy: you can become a famous Rails developer like sevenseacat!!! Reach true happiness
<shevy>
atmosx I am mostly just trying to finish up on stuff before I do quit
<shevy>
omg
teddyp1cker has joined #ruby
<sevenseacat>
o.O
<atmosx>
sevenseacat: which seas are the 7 seas?!
<sevenseacat>
i... what?
<atmosx>
sevenseacat: I'm just poking you.
<shevy>
I think it is a cat that came from the seventh sea
<bricker`LA>
A Chef IDE would be nice.
<tyrone_>
atmosx, I can lodge a transaction and it reflects in their virtual terminal but I can never get a response to say anything like assign an id for my transaction so basically I have to blindly send and hope for the best and never find my transaction reliably again... which is obviously not an acceptable state of affairs.
<atmosx>
shevy: oh good thing then.
Pumukel has joined #ruby
<Hanmac>
xfz: i tested it, without sync File::open does update the mtime, and File#close does it only, not File#write, with sync, File#write does update mtime too (because without File#close and sync = false, the data is not written to the harddrive)
zettam has joined #ruby
<atmosx>
tyrone_: you said this is a payment system or something? Shouldn't they have a support team/center somehwre?
echevemaster has quit [Ping timeout: 250 seconds]
<atmosx>
do you people write tests first?
<atmosx>
like in TDD?
<atmosx>
do really people do that?
<sevenseacat>
sometimes
dayepa has quit [Read error: Connection reset by peer]
mozzarella has joined #ruby
<sevenseacat>
i did earlier today when fixing a bug
<atmosx>
sevenseacat: doesn't stall development incredibly? Do you get the tests right the first time?!
dayepa has joined #ruby
<atmosx>
I see
<atmosx>
I can't get my head around that, I always end up writing the tests after.
<Hanmac>
hm if i know how the api will look like i can do write tests first ... for most of my projects i dont even know how the api will look in the end
davedev24_ has quit [Ping timeout: 250 seconds]
<tyrone_>
atmosx, different timezone. I have a deadline for the end of the week and all I got was ... please send us some sample code that you are using to access our system. so it's a bit like carrier pigeon speed communicating like this.
<sevenseacat>
it went like play in console to find cause of bug -> write tests to verify bug -> write tests for wanted behaviour (after bug was fixed) -> fix bug
Anarch_ is now known as Anarch
JBreit has quit [Read error: Connection reset by peer]
<atmosx>
Hanmac: Exactly, I don't know how my pages will look... What data will they have... Basically I don't know what to test, excpet maybe paths. (for sinatra)... Rails has the testing framework build in, is kinda easier.
dayepa has quit [Client Quit]
sparrovv has joined #ruby
<tyrone_>
atmosx, so thought I would check if there was an obvious answer with someone that knows more than me hence logging on here :)
dayepa has joined #ruby
techsethi has joined #ruby
dj_zubehoer has joined #ruby
<atmosx>
tyrone_: I see :-/
<Hanmac>
most of my stuff is not easy testable because they are GUI or rendering libs
<atmosx>
Hanmac: mine is, becuase it's all lame sinatra apps... You could test every CSS anchor (id, class, data, results...)
<atmosx>
but still I don't know from the beginning how the page will look like.
<atmosx>
anyway
<atmosx>
gonna read some more about anti-psychotics, bbl
<sevenseacat>
you're not testing what the page looks like
<atmosx>
sevenseacat: what do you test?
<sevenseacat>
sinatra is even easier than rails stuff to test
<atmosx>
sevenseacat: paths?
<sevenseacat>
a lot less moving parts
dayepa has quit [Read error: Connection reset by peer]
<sevenseacat>
you test what you care about
<atmosx>
sevenseacat: paths & data.
<sevenseacat>
if you care that when you hit a certain URL, a certain action gets called, then thats what you test
<sevenseacat>
if you care that when you git a certain action, that a certain template gets rendered, then you test that
<sevenseacat>
if you care that when you render a certain template, it prints out a certain piece of data, then you test that
<shevy>
the cat is drunk
Xeago has quit [Remote host closed the connection]
<sevenseacat>
the cat is tired beyond belief and drugged out of her mind
dayepa has joined #ruby
TheTopBloke has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
<atmosx>
sevenseacat: at least you program for food.
DEA7TH has joined #ruby
<sevenseacat>
mmm food
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
<atmosx>
pizza
dayepa has quit [Client Quit]
io_syl has quit []
roolo has joined #ruby
yfeldblum has quit [Remote host closed the connection]
JBreit has joined #ruby
yfeldblum has joined #ruby
GregWittman has quit [Quit: WeeChat 1.0]
axsuul has joined #ruby
zenspider has joined #ruby
benzrf is now known as benzrf|offline
Hobogrammer has quit [Ping timeout: 240 seconds]
Kricir has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
kedare has quit [Quit: WeeChat 0.4.1]
AlexRussia has quit [Ping timeout: 260 seconds]
arup_r has joined #ruby
duncannz has joined #ruby
dayepa has joined #ruby
ephemerian has joined #ruby
ephemerian has quit [Client Quit]
_cake has joined #ruby
zenspider has quit [Client Quit]
Kilo`byte has quit [Ping timeout: 246 seconds]
Kricir has quit [Ping timeout: 244 seconds]
sk87 has joined #ruby
dayepa has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
kedare has joined #ruby
dayepa has joined #ruby
Kilo`byte has joined #ruby
dayepa has quit [Client Quit]
dayepa has joined #ruby
ghr has joined #ruby
cpruitt has joined #ruby
<bricker`LA>
wtf is up with `nginx -v`
klmlfl has joined #ruby
<bricker`LA>
its output is nothing, you can't grep it
rjhunter has quit [Remote host closed the connection]
sevenseacat has quit [Quit: Leaving.]
Kryptonical has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
rjhunter has joined #ruby
timonv_ has joined #ruby
max06 has joined #ruby
dayepa has quit [Client Quit]
dayepa has joined #ruby
<shevy>
bricker`LA come to lighttpd!
<bricker`LA>
shevy: lol
Kilo`byte has quit [Ping timeout: 264 seconds]
ringarin has joined #ruby
poulet_a has joined #ruby
rjhunter has quit [Ping timeout: 250 seconds]
anarang has quit [Ping timeout: 260 seconds]
noshi has quit [Quit: o/]
anarang has joined #ruby
jobewan has quit [Quit: Leaving]
ringarin has quit [Read error: Connection reset by peer]
ringaring has joined #ruby
_cake has quit [Read error: Connection reset by peer]
proxie has quit []
teddyp1cker has quit [Remote host closed the connection]
olivier_bK has joined #ruby
j416 has joined #ruby
dayepa has quit [Quit: dayepa]
dayepa has joined #ruby
dayepa has quit [Client Quit]
mr-foobar has quit [Read error: Connection reset by peer]
vdmo has joined #ruby
dayepa has joined #ruby
mr-foobar has joined #ruby
dayepa has quit [Client Quit]
<vdmo>
hi
rjhunter has joined #ruby
mfmfmfmfmfmf has quit [Remote host closed the connection]
Nahra has joined #ruby
Takle has joined #ruby
gaussblurinc1 has joined #ruby
tectonic has quit []
rjhunter has quit [Remote host closed the connection]
Wolland has quit [Remote host closed the connection]
axsuul has joined #ruby
Wolland has joined #ruby
andikr has joined #ruby
Azulinho has joined #ruby
dayepa has joined #ruby
emocakes has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
Wolland has quit [Ping timeout: 240 seconds]
siwica has joined #ruby
dayepa has quit [Client Quit]
Aranshada|W has quit [Ping timeout: 260 seconds]
dayepa has joined #ruby
anaeem1 has quit [Quit: Leaving...]
anaeem1_ has joined #ruby
Takle has quit [Remote host closed the connection]
thomasxie has joined #ruby
sectionme has joined #ruby
Takle has joined #ruby
Takle has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
emmesswhy has quit [Quit: This computer has gone to sleep]
oo_ has joined #ruby
W0rmDr1nk has joined #ruby
iamjusthatdude has joined #ruby
Xeago has joined #ruby
ringaring has quit [Ping timeout: 264 seconds]
LiohAu has quit [Quit: LiohAu]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
jhass|off is now known as jhass
Takle has joined #ruby
tyrone_ has quit [Quit: Leaving]
lolmaus has quit [Quit: Konversation terminated!]
Xeago has quit [Remote host closed the connection]
einarj has joined #ruby
Aaaal has joined #ruby
AlexRussia has joined #ruby
timonv_ has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 250 seconds]
InhalingPixels has joined #ruby
klmlfl has quit []
Xeago has joined #ruby
Beoran__ has quit [Ping timeout: 250 seconds]
klmlfl has joined #ruby
dj_zubeh_ has joined #ruby
elstif has joined #ruby
Kricir has joined #ruby
<klmlfl>
theme test
sparrovv has quit [Remote host closed the connection]
InhalingPixels has quit [Ping timeout: 245 seconds]
dj_zubehoer has quit [Ping timeout: 260 seconds]
Kricir has quit [Ping timeout: 240 seconds]
<wasamasa>
test harder
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
marr has joined #ruby
ssvo has quit [Ping timeout: 264 seconds]
ringarin has joined #ruby
ssvo has joined #ruby
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
patrick99e99 has joined #ruby
dayepa has quit [Quit: dayepa]
dayepa has joined #ruby
ringarin has quit [Client Quit]
HelperW has joined #ruby
Beoran__ has joined #ruby
moritzs has joined #ruby
ringarin has joined #ruby
<shevy>
hard tests
banister has quit [Ping timeout: 250 seconds]
Psy-Q_ is now known as Psy-Q
jottr has joined #ruby
patrick99e99 has quit [Ping timeout: 245 seconds]
claymore has joined #ruby
qba73 has joined #ruby
emocakes has quit []
timonv_ has joined #ruby
LnL has joined #ruby
<gaussblurinc1>
hi
<gaussblurinc1>
how to read binary content of file and put it to post request?
emocakes has joined #ruby
<canton7>
break the problem down. 1) how to read binary files, 2) how to make http requests, 3) how to make post requests, 4) how to add content to a post request
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby
xcv has joined #ruby
mooru has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mattias_>
canton7: I guess you are right, but when I tries with results.to_a.values or just results.values it complains about that an array can't do that
hamakn has quit [Ping timeout: 246 seconds]
<canton7>
well Array is no #values method - it doesn't make sense
<canton7>
but Hash does
<canton7>
so 'results.values' should work
klmlfl has quit [Read error: No route to host]
klmlfl has joined #ruby
klmlfl has quit [Remote host closed the connection]
tvw has joined #ruby
<mattias_>
canton7: Thanks :)
klmlfl has joined #ruby
klmlfl has quit [Read error: Connection reset by peer]
klmlfl has joined #ruby
ringarin has joined #ruby
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby
timgauthier has joined #ruby
mooru has joined #ruby
mityaz has quit [Quit: Leaving]
klmlfl has quit [Remote host closed the connection]
Avahey_ has quit [Quit: Connection closed for inactivity]
klmlfl has joined #ruby
dumdedum has quit [Quit: foo]
decoponio has joined #ruby
oo_ has quit [Remote host closed the connection]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dayepa has quit [Quit: dayepa]
klmlfl has quit [Ping timeout: 264 seconds]
dayepa has joined #ruby
Xeago has quit [Remote host closed the connection]
klmlfl has joined #ruby
klmlfl has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
blueOxigen has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
DaveTaboola has joined #ruby
bluOxigen has quit [Ping timeout: 250 seconds]
Photism has joined #ruby
Kricir has joined #ruby
duncannz has quit [Ping timeout: 244 seconds]
sk87 has joined #ruby
oo_ has joined #ruby
klmlfl has joined #ruby
Takle has quit [Remote host closed the connection]
mk2014 has joined #ruby
Kerber0s has quit [Ping timeout: 245 seconds]
gaussblurinc1 has quit [Quit: Leaving.]
decoponio has quit [Read error: Connection reset by peer]
klmlfl has quit [Remote host closed the connection]
Takle has joined #ruby
CorpusCallosum has joined #ruby
kaspertidemann has joined #ruby
decoponio has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
Takle has quit [Remote host closed the connection]
Kilo`byte has joined #ruby
gaussblurinc1 has joined #ruby
anarang has quit [Quit: Leaving]
tkuchiki_ has joined #ruby
crdpink has quit [Quit: q term]
<mk2014>
Hi guys, I have an array of hashes that contain duplicate hashes.
PanPan has quit [Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140716183446]]
<timgauthier>
that sounds a like like "i'd like to gather these bitches", but that isn't politically correct.
hamakn has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 260 seconds]
schubam has quit [Ping timeout: 240 seconds]
tkuchiki_ has quit [Ping timeout: 240 seconds]
<DaveTaboola>
hey all, i'm trying to make the google_bigquery module for logstash to be able saving files as gz (using the Zlib library) and while the file is being written i can't extract it :\
<mk2014>
@timgauthier to my surprise it actually does!
<mattias_>
I have an array with filenamnes, and a string variable with a file name that is in the array... but array.include?(filename) gives me false.. Any ideas?
<timgauthier>
i was going to suggest map. thanks jhass ! :D i'm not so shitty at this stuff anymore!
<jhass>
mk2014: if you don't want new hashes, use each and []=
arup_r has quit [Ping timeout: 240 seconds]
phoo1234567 has quit [Max SendQ exceeded]
tvw has quit [Remote host closed the connection]
<gaussblurinc1>
uh, net/http too lowlevel, can anybody advise more highlevel http-wrapper?
phoo1234567 has joined #ruby
<jhass>
mattias_: please provide a gist that reproduces
<jhass>
gaussblurinc1: faraday
<jhass>
httparty, rest_client, open-uri
<wasamasa>
patron?
<DaveTaboola>
anyone? :(
<wasamasa>
DaveTaboola: did you try `file output.gz`?
<mk2014>
@jhass works like a charm
<mk2014>
cheers ;)
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<DaveTaboola>
wasamasa: what do you mean ? (just to make sure i get it right)
<wasamasa>
DaveTaboola: you open a terminal emulator and use the file command on what you think is a gzipped file
<wasamasa>
DaveTaboola: this will tell you what this utility thinks it is
<wasamasa>
DaveTaboola: I assume you're on linux, osx or something other unix-like
<DaveTaboola>
wasamasa: you assume right :)
<jhass>
DaveTaboola: also you provided a huge pile of code and a "doesn't work". Provide actual error messages with tracebacks
mooru has quit [Ping timeout: 240 seconds]
schubam has joined #ruby
<wasamasa>
good, windows people shouldn't be using gz :P
sandelius has joined #ruby
<DaveTaboola>
wasamasa: hum i'll check it out
schubam has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
<wasamasa>
DaveTaboola: it's a very useful command for figuring out what something is
<DaveTaboola>
jhass: i dont get any exceptions, thats the thing, i just can't extract the gz file
nfk has joined #ruby
<jhass>
I doubt ruby or whatever says "Can't extract gz file"
Takle has joined #ruby
<DaveTaboola>
i'm trying to extract it using the os
<wasamasa>
"file /usr/share/man/man1/man.1.gz"
<wasamasa>
"/usr/share/man/man1/man.1.gz: gzip compressed data, max compression, from Unix"
schubam has joined #ruby
<DaveTaboola>
i dont need to do that programatically as i'm sending it to a different location
<krz>
jhass: thats fugly
<jhass>
krz: make it nicer
kyun has quit [Quit: ChatZilla 0.9.90.1 [Firefox 31.0/20140716183446]]
schubam has quit [Remote host closed the connection]
anaeem1_ has quit [Remote host closed the connection]
root3d has quit [Quit: Leaving]
teddyp1cker has quit [Ping timeout: 250 seconds]
<jhass>
krz: still waiting
mattias_ has quit [Quit: leaving]
anaeem1_ has joined #ruby
<DaveTaboola>
wasamasa: i get the following answer : trc-bq-logstash_daves-mpb.local_2014-08-28.part000.log.gz: gzip compressed data
<wasamasa>
DaveTaboola: hmm, sounds good
<wasamasa>
DaveTaboola: I sense PEBKAC :P
<DaveTaboola>
:'( haha
<wasamasa>
`file` looks at the first few bytes, so it's very likely it is indeed gzip compressed data
<wasamasa>
but it could be something screwed the rest up
<DaveTaboola>
the thing i'm "worried" that i'm not doing well
<DaveTaboola>
is the last part of the code, is the fsync and closer
fabrice31 has quit [Remote host closed the connection]
schubam has joined #ruby
<jhass>
DaveTaboola: what does gunzip on that file do?
<jhass>
what's it's exact output?
<DaveTaboola>
gunzip: data stream error gunzip: trc-bq-logstash_daves-mpb.local_2014-08-28.part000.log.gz
<DaveTaboola>
datastream error
<DaveTaboola>
jhass: sounds like a problem with the fsync and close, right?
arup_r_ has quit [Remote host closed the connection]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
end_guy has quit [Remote host closed the connection]
mk2014 has left #ruby [#ruby]
keen________ has joined #ruby
tvw has joined #ruby
linojon has joined #ruby
vdmo has quit [Quit: Leaving]
keen_______ has quit [Ping timeout: 260 seconds]
krz has quit [Quit: WeeChat 1.0]
end_guy has joined #ruby
<DaveTaboola>
anyone ? :(
roolo has quit [Quit: Leaving...]
<jhass>
DaveTaboola: tbh. I'm not sure I can follow your code
<jhass>
so the file is written in receive ?
fella7s has joined #ruby
<DaveTaboola>
jhass: the writting of lines is being done in the receive, yeah
fella6s has quit [Ping timeout: 250 seconds]
<DaveTaboola>
there is a section that deals with the following: opening the current file, files rotation, deletion, write, name generator, upload, and verification
<DaveTaboola>
thats on one leg :P
<jhass>
okay, I have an idea
<jhass>
you call @temp_file.close
<jhass>
which is an IOWriter
<jhass>
that hits its method_missing
bayed has joined #ruby
<jhass>
if the underlying IO is a gzip writer, you forward to to_io.close
<jhass>
which doesn't call GZipWriter#close
<jhass>
and thus it can't properly write the gzip footer
<jhass>
just an idea
<DaveTaboola>
jhass: :D i think you have more than a point!
aspiers has quit [Ping timeout: 260 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
cirn0 has joined #ruby
<DaveTaboola>
so basically i can create a method that called close which will call the GZipWriter.close call
EasyCo has quit [Quit: Connection closed for inactivity]
fabrice31 has joined #ruby
<jhass>
mmh, no I'm wrong
Macaveli has joined #ruby
<jhass>
you already directly forward if the object responds to it
<jhass>
so the close should be forwarded correctly
aspiers has joined #ruby
mikeric has joined #ruby
cirn0 has quit [Ping timeout: 260 seconds]
bearish has quit [Remote host closed the connection]
bearish has joined #ruby
hellangel7 has quit [Read error: Connection reset by peer]
tlarevo_ is now known as tlarevo
Weirdstormer is now known as Snowstormer
Takle has quit [Remote host closed the connection]
agjacome has joined #ruby
Lewix has quit [Remote host closed the connection]
<jhass>
maybe it's that you open the file in append mode and then write a new gzip header
Sht0 has quit [Ping timeout: 240 seconds]
arup_r has joined #ruby
<jhass>
DaveTaboola: why do you need to open the file in append modeß
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has quit [Remote host closed the connection]
oo_ has quit [Remote host closed the connection]
Kricir has joined #ruby
DrCode has quit [Remote host closed the connection]
DrCode has joined #ruby
<gaussblurinc1>
I have this part of request as curl: curl -X POST -F app_file=@../path/to/zip/archive.zip . how to configure request for it in net/http? I am confused about 'app_file' and passing parameter as path_to_file, not a binary content
yeticry has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
armanghassemi_ has quit [Ping timeout: 272 seconds]
tokik has quit [Ping timeout: 245 seconds]
Kricir has quit [Ping timeout: 260 seconds]
yeticry has joined #ruby
armanghassemi_ has joined #ruby
sandelius has joined #ruby
Takle has joined #ruby
szuletett has joined #ruby
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
singleton has quit [Ping timeout: 246 seconds]
dblessing has joined #ruby
KnownSyntax__ has joined #ruby
banister has joined #ruby
CorpusCallosum has quit [Remote host closed the connection]
timgauthier has joined #ruby
KnownSyntax_ has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 264 seconds]
andikr has quit [Remote host closed the connection]
dorei has joined #ruby
SCHAAP137 has joined #ruby
schubam has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roolo has joined #ruby
schubam has joined #ruby
timgauthier has quit [Remote host closed the connection]
pierre1_ has joined #ruby
timgauthier has joined #ruby
Takle has quit [Remote host closed the connection]
hamakn has joined #ruby
pagios has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
hamakn has quit [Ping timeout: 244 seconds]
MCDev has quit [Ping timeout: 250 seconds]
bearish has joined #ruby
Takle has joined #ruby
timonv_ has joined #ruby
Takle has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
ldnunes has joined #ruby
arup_r has quit [Remote host closed the connection]
georgesmith has joined #ruby
linojon_ has joined #ruby
linojon has quit [Ping timeout: 245 seconds]
linojon_ is now known as linojon
nuck has quit [Ping timeout: 264 seconds]
nuck has joined #ruby
Aaaal has quit [Quit: Aaaal]
yfeldblum has quit [Ping timeout: 246 seconds]
jottr has joined #ruby
oo_ has quit [Remote host closed the connection]
Aaaal has joined #ruby
Xeago has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
sigurding has joined #ruby
fold has quit [Ping timeout: 240 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
sk87 has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
jottr has quit [Ping timeout: 240 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
Takle has joined #ruby
banister has joined #ruby
oo_ has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<shevy>
use function My\Full\functionName as func;
<DefV>
wow
<DefV>
the crazies won over the pragmatists
<DefV>
it seems
agrinb has joined #ruby
AlSquire has joined #ruby
AlSquirrel has joined #ruby
AlSquire has quit [Read error: Connection reset by peer]
DaveTaboola has quit [Ping timeout: 246 seconds]
<Hanmac>
yeah in ruby that would be: Another = My::Full::Classname; and define_method(:func,&My::Full.method(:functionName))
ejnahc has quit [Quit: Changing server]
Kricir has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
linojon has quit [Quit: linojon]
rimenes has quit [Ping timeout: 240 seconds]
DivineEn1ity has quit [Quit: Lost terminal]
spider-mario has joined #ruby
butblack has joined #ruby
rimenes has joined #ruby
yfeldblum has joined #ruby
Kricir has quit [Ping timeout: 250 seconds]
jottr has joined #ruby
arup_r has joined #ruby
Takle has quit [Remote host closed the connection]
flowerhack has quit [Remote host closed the connection]
anarang has joined #ruby
oo_ has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
pranny has quit [Quit: Leaving.]
ejnahc has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roolo has quit [Quit: Leaving...]
linojon has joined #ruby
tvw has quit []
ringaring has joined #ruby
mooru has joined #ruby
ringarin has quit [Ping timeout: 245 seconds]
Sgeo has quit [Read error: Connection reset by peer]
thomasxie has left #ruby [#ruby]
freerobby has joined #ruby
tvw has joined #ruby
roolo has joined #ruby
banister has joined #ruby
ringaring has quit [Ping timeout: 240 seconds]
aclearman037 has joined #ruby
Catzby has joined #ruby
noopq has quit [Ping timeout: 260 seconds]
lkba has joined #ruby
teddyp1cker has joined #ruby
qwyeth has joined #ruby
oo_ has quit [Remote host closed the connection]
szuletett has quit [Quit: Leaving]
quarcu_ is now known as quarcu
mkaesz has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
flowerhack has joined #ruby
teddyp1cker has quit [Ping timeout: 240 seconds]
kiri has joined #ruby
Fire-Dragon-DoL has joined #ruby
sandelius has joined #ruby
<timgauthier>
what?
<timgauthier>
i don't even understand shevy anymore
oo_ has joined #ruby
techsethi has joined #ruby
pranny has joined #ruby
axsuul has joined #ruby
<Hanmac>
timgauthier: 6 years ago there was books sellable for PHP6 ... currently 2014, only PHP5.5 is available, so they will likey jump the version directly to PHP7 to avoid confusion
oo_ has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
<timgauthier>
books sellable?
<tobiasvl>
have they decided on that?
<tobiasvl>
last I heard they were fighting on whether or not to skip 6
sk87 has joined #ruby
rimenes has quit [Read error: Connection reset by peer]
<DefV>
so if I were to now publish a book on PHP 7 full of things that aren't relevant
<totimkopf>
hi, so far I've just seen how singleton objects implement the use of respond_to?() but I'm trying to think of how I'd use it inside a class definition, any suggestions?
<DefV>
they'd skip to 8?
<Hanmac>
DefV: i would not be surprised if they did ;P
rimenes has joined #ruby
alexju has joined #ruby
<Hanmac>
totimkopf: method_defined?
flowerhack has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 246 seconds]
<totimkopf>
Hanmac: ah, so it wouldn't make sense to use respond_to? outside the context of singleton objects, right?
DaniG2k has joined #ruby
<Hanmac>
totimkopf: say you have the Class object ... are you looking now for instance methods defined in this class, or for singleton methods defined for that object?
axilla has joined #ruby
<shevy>
timgauthier php has become so crazy
<timgauthier>
become?
<shevy>
yeah
<shevy>
they use \ for namespacing
<timgauthier>
they smoked a bowl of something, and created a programming... thing
<timgauthier>
instaed of @?
Squarepy has joined #ruby
<shevy>
I think most languages will use ::
arup_r has quit [Remote host closed the connection]
<shevy>
I dunno how python does it... they use import foo.bar as ble ? where ble becomes the new base name?
<totimkopf>
Hanmac: okay so respond_to? for singleton methods, method_defined? for instance methods, got it :)
schubam has quit [Remote host closed the connection]
jfutbol has joined #ruby
bthesorceror has joined #ruby
spastorino has joined #ruby
szuletett has quit [Remote host closed the connection]
kenneth has joined #ruby
mikesplain has quit []
aganov has quit [Quit: Leaving]
ptrrr has joined #ruby
mikesplain has joined #ruby
gsd has joined #ruby
agrinb has quit [Remote host closed the connection]
LiohAu_ has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sambao21 has joined #ruby
carraroj has joined #ruby
toastynerd has quit [Remote host closed the connection]
agrinb has joined #ruby
ringaroses2 has joined #ruby
schubam has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
agrinb_ has joined #ruby
jshultz has joined #ruby
sdwrage has joined #ruby
starkhalo has joined #ruby
ringaring has quit [Ping timeout: 246 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has joined #ruby
agrinb has quit [Ping timeout: 260 seconds]
WillAmes has joined #ruby
Kricir has joined #ruby
obscured has joined #ruby
fantazo has joined #ruby
patrick99e99 has joined #ruby
cocotton has joined #ruby
schubam has quit [Remote host closed the connection]
Fire-Dragon-DoL has joined #ruby
Snowstormer is now known as Bjork
IceDragon has joined #ruby
Sawbones has joined #ruby
terlar has quit [Quit: WeeChat 1.0]
fabrice31 has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
Bjork is now known as Snowstormer_
lw has quit [Quit: s]
patrick99e99 has quit [Ping timeout: 264 seconds]
anildigital is now known as zz_anildigital
ringaring has joined #ruby
Sonny|3oy has joined #ruby
Snowstormer_ is now known as Snowstormer
ValicekB has quit [Ping timeout: 250 seconds]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton has joined #ruby
renderful has quit [Ping timeout: 264 seconds]
Takle has quit [Remote host closed the connection]
renderful has joined #ruby
ringaroses2 has quit [Ping timeout: 264 seconds]
schubam has joined #ruby
yfeldblum has joined #ruby
zz_anildigital is now known as anildigital
Macaveli has joined #ruby
snath has joined #ruby
<Phrogz>
Hack workaround: copying all files into one and packaging Shoes app as a single file. :p
volk_ has joined #ruby
Takle has joined #ruby
agjacome has quit [Quit: leaving]
rubytor has quit [Quit: No Ping reply in 180 seconds.]
yfeldblum has quit [Ping timeout: 264 seconds]
<borodin>
anybody here build the ruby binary on linux who can advise me?
<volk_>
hey guys im running a select on an array inside an loop. how do i return the element it finds from inside the loop without some extra variable being instantiated outside?
TheTopBloke has joined #ruby
TheTopBloke has quit [Read error: Connection reset by peer]
rubytor has joined #ruby
<havenwood>
borodin: Whatcha trying to do?
<Phrogz>
borodin: I've build Ruby from sources on OS X before. Is it gentle help you need, or Linux-specific?
dte has joined #ruby
zorak has quit [Ping timeout: 255 seconds]
<Phrogz>
volk_: Like a `loop do` loop?
<volk_>
.each loop
zeroNones has quit [Read error: Connection reset by peer]
<havenwood>
volk_: Use an instance variable?
<Phrogz>
volk_: `each` always returns the enumerable it is operating on. You either need an outside variable to close over, or you need to use a different iterator.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
devdazed has joined #ruby
* Phrogz
tries to think of an iterator like `find` that returns a single result, but has it mapped.
<toretore>
what's it called when you set a variable to some value?
<Phrogz>
My best (bad) idea so far is .map{ }.compact.first
<Phrogz>
toretore: assignment?
<havenwood>
toretore: assignment
<havenwood>
volk_: show the codE?
<toretore>
that's it thanks :)
<borodin>
havenwood: Phrogz I'm setting up a process where I gram the latest stable source, download it, compile it and wrap it in an RPM
<volk_>
seems like just using an instance variable does what i need!
<volk_>
:)
Snowstormer is now known as ^banana^
ddv has joined #ruby
ddv has quit [Changing host]
<toretore>
do you happen to know if (instance) variable assignment in ruby is atomic too?
terlar has joined #ruby
<Phrogz>
toretore: I believe so. (I can't imagine how it could not be.)
drizz has quit [Quit: leaving]
axsuul has joined #ruby
<toretore>
i'm talking about a simple `foo = true`
<Phrogz>
Right.
<toretore>
actually forget i asked, it's obvious now :)
<toretore>
it's never going to be in an in-between state
ValicekB has joined #ruby
<havenwood>
toretore: `+=` etc are not atomic though
<toretore>
yeah
<Phrogz>
borodin: What's the issue/question?
<havenwood>
borodin: Sounds like a good idea. ;)
Meeh has quit [Read error: Connection reset by peer]
terlar has quit [Read error: Connection reset by peer]
<Phrogz>
Is it wrong that I'm weirded out that there isn't a find_map in Enumerable?
cpruitt has quit [Ping timeout: 240 seconds]
<borodin>
I'm looking through the stuff that come sin the package stable-snapshot.tar.gz - there doesn't seem to be any thing that says "this is 2.1.2"
phutchins has joined #ruby
<borodin>
so if I'm creating an RPM I'd like to give it the ruby version number as well. ruby-stable-snapshot.noarch.rpm won't do :)
<Phrogz>
borodin: You could ruby -e "p RUBY_VERSION"
<Phrogz>
after compiling
<borodin>
YOU ARE A SMART FELLER
<borodin>
thanks!
<Phrogz>
:)
<Phrogz>
Perhaps replacing `p` with `puts` or `print` to drop the quotes, oops.
<borodin>
or maybe a fart smeller? hmmm
noopq has joined #ruby
<Phrogz>
hmmmm
<Phrogz>
Why does it have to be either/or?
chrishough has joined #ruby
ghostmoth has joined #ruby
mikepack has quit [Remote host closed the connection]
drizz has joined #ruby
jmbrown412 has joined #ruby
Sonny|3oy has quit [Quit: Leaving]
cpruitt has joined #ruby
sectionme has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac>
hm i hope thats not the versions you currently have installed too .. because i prefer to have as less versions of a gem installed as possible
klmlfl_ has quit [Read error: No route to host]
sigurding has quit [Quit: sigurding]
klmlfl_ has joined #ruby
<timgauthier>
i had been directed in the past by someone, i think in here, to an article that led me to modifying my bash to have a cooler prompts etc, i can't remember where that was. :( any ideas how to try and find that again?
<canton7>
there are tons of them on google
<kalusn>
probably zshell
<timgauthier>
yea no it was to just change the profile of the default mac bash
<timgauthier>
yeah thats the problem canton7, too many! :P
<timgauthier>
good news, new SSD in my MBA, bad news, lost my cool bash config :P
<timgauthier>
is there any way to save those files and then re-institute them on a fresh install from a .sh file?
siwica1 has quit [Quit: siwica1]
michaeldeol has joined #ruby
hellangel7 has joined #ruby
<dorei>
timgauthier: commit them ;-)
<Phrogz>
timgauthier: Mount the HD separately, browse your ~/.profile, and copy them?
chipotle has quit [Quit: cya]
<timgauthier>
dorei i'm okay with comitting to a git, i'd prefer it a private one, but my knowledge is lacking in ability to actually just drop them back in on my new mac when i run my setup-macbook-air.sh file
Xeago has joined #ruby
rdavila has joined #ruby
cocotton has quit [Remote host closed the connection]
klmlfl_ has quit [Ping timeout: 260 seconds]
<kalusn>
unless you buy a new computer every 2 weeks i think it would be easier to just copy your .profile over
qwyeth has quit [Remote host closed the connection]
<Phrogz>
mage_: No idea, but you could just download the .gem for that version directly and then install from that file?
<mage_>
yep, but I would like to understand why it doesn't work as I have 10+ apps to deploy ..
jerikl has joined #ruby
toastynerd has joined #ruby
<havenwood>
mage_: Looks like you have `source` set to `http` not `https`
<Hanmac>
mage_ what happens id you try it again?
<Phrogz>
Getting a 403 looks to me like either the gem server is hiccupping, or you have stuff in your way. Are you behind a corporate firewall that would perhaps be blocking the domain via DNS?
Xeago has quit [Remote host closed the connection]
MrRobot has quit [Remote host closed the connection]
sambao21 has joined #ruby
Xeago has joined #ruby
pygospa has joined #ruby
mikeg has quit [Quit: Leaving...]
razrunelord has joined #ruby
<Phrogz>
On the topic of parsing options from the command line, I tried a few gems back in the day but always ended up rolling my own. They always have a pattern like this: https://gist.github.com/Phrogz/f867101f7c3de9c42837
razrunelord has quit [Remote host closed the connection]
<Phrogz>
It is not terse, for sure, but it's not that complicated either; once you have this in place it's easy to see how to add new arguments.
<waxjar>
Phrogz: have you tried Clap?
wallerdev has joined #ruby
<Phrogz>
waxjar: It does not ring a bell, so I suspect not. If it's been started more recently than 2008, almost certainly I have not. :)
<waxjar>
the only thing it doesn't do is aliases. there's a pull request, but it hasn't been merged :(
groot_ has joined #ruby
<Phrogz>
Yup, looks like it's newer than when I was last investigating command-line parsing.
pietr0 has joined #ruby
<Lewix>
hi guys
<Phrogz>
<rant> I really dislike the lazy documentation strategy: "Just check the unit tests if you have questions."
<Phrogz>
Good morning, Lewix.
wallerdev has quit [Client Quit]
FDj_ is now known as FDj
dte has joined #ruby
<Lewix>
Phrogz: Morning to you
Peter_ has joined #ruby
<Phrogz>
Evening for you, I suppose.
Peter_ has quit [Read error: Connection reset by peer]
pranny has joined #ruby
timgauthier is now known as timgauthier_isaw
roolo has quit [Quit: Leaving...]
noopq has quit [Ping timeout: 260 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
klmlfl_ has joined #ruby
sysx1000 has quit [Quit: drive never ends]
noopq has joined #ruby
cirn0 has joined #ruby
wjimenez_ has joined #ruby
<agrinb_>
Is there anything about this syntax that's wrong? I get the right output with puts, but Rspec tests fail with undefined method `<<' for nil:NilClass
<mostlybadfly>
i was wondering why the return is necessary here, i always read it should be excluded but i get a stack level too deep error
omosoj has joined #ruby
<mostlybadfly>
why is that?
<wallerdev>
which return?
<DEA7TH>
How do I uninstall *everything* related to Ruby? I want to reinstall. Too many issues. After my first reinstall attempt, gem is still using the wrong ruby directory, which should have disappeared.
<mostlybadfly>
either
<TieSoul>
alright, Hanmac, I tried your solution but it doesn't support \0.
<wallerdev>
the first one is necessary because if you dont return itll run the next line
Ilyas has quit [Read error: Connection reset by peer]
<wallerdev>
return will exit the method early
<wallerdev>
the 2nd one isnt needed
<mostlybadfly>
oooh right
<havenwood>
^
shackleford has quit [Ping timeout: 240 seconds]
alexju has quit [Remote host closed the connection]
<mostlybadfly>
that totally makes sense now, should've known :P thanks wallerdev
<Hanmac>
TieSoul: do you mean \0 as char inside the string?
<Phrogz>
agrinb_: Probably it's because you are using an instance variable and RSpec is using some sort of instance_eval that is changing the scope?
<TieSoul>
I'm making an s/regex/replacement/ script and I need to find a way to replace the nth instance of a regex in a string, with '\0' support in the replacement.
<wallerdev>
np
agjacome has joined #ruby
<TieSoul>
like
pygospa has quit [Ping timeout: 264 seconds]
<havenwood>
mostlybadfly: just remove explicit returns when it'll already implicitly return
<mostlybadfly>
waxjar: i wanted to make it so it goes up to that number assuming i dont know how many numbers it is
<Phrogz>
agrinb_: I'm glad it helped! Note that I think that @@ is possibly the worst choice (though I don't know your code at all). That seems like a super-dangerous change, but it's up to you.
gregf has joined #ruby
<waxjar>
mostlybadfly: look into Ranges
volk_ has joined #ruby
<_cmosguy>
i was curious if anyone knew about the issues of windows 7 + ruby failing compile with compass, there is something about my enviornment that causes compass to fails
<wallerdev>
probably the issue is using windows
<Phrogz>
mostlybadfly: Regarding "memoization" basically you write a methods that says "When I am called with this parameter (or parameters), if I have already seen them before, I'll just return the same thing as last time."
ghostmoth has quit [Ping timeout: 245 seconds]
<mostlybadfly>
my initial solution was to enumerate through an array of 1..32 given the 32nd place is the last even under 4000000
skolman_ has quit [Remote host closed the connection]
skolman has joined #ruby
<mostlybadfly>
Phrogz: i guess i dont know how those hints help but i'll play around with it. seems interesting
lynxbat has joined #ruby
<Phrogz>
mostlybadfly: In practice: @fibs = {}; def fib(n) n<=2 ? n : @fibs[n] ||= fib(n-1)+fib(n-2); end
bayed has quit [Quit: Connection closed for inactivity]
pagioss has joined #ruby
stef_204 has joined #ruby
<Phrogz>
mostlybadfly: I'm not sure that my hints with respect to evens->integers and sum(1..n) are helpful for the particular problem. Been a long time since I Euler'd, and don't remember the specific question.
ghostmoth has joined #ruby
pygospa has quit [Ping timeout: 246 seconds]
hellangel7 has joined #ruby
klmlfl has joined #ruby
<Phrogz>
mostlybadfly: With @fibs[n] ||= ... what happens is that if you have already calculated n it will immediately return the value, otherwise it will calculate and store (and return) it.
<Hanmac>
TieSoul: yours would currently look like that
<Hanmac>
>> "Hello".gsub(/./).with_index(1) {|s,i| i == 2 ? "#$~#$~" : s }
<DEA7TH>
I tried reinstalling and it's still using a wrong directory
Takle has joined #ruby
<mostlybadfly>
that does help a lot for the method
<mostlybadfly>
i figure i still need to loop through so i'll look into memoization
<Hanmac>
DEA7TH: how do you reinstall?
<mostlybadfly>
to get to the actual result i need
claymore has quit [Ping timeout: 245 seconds]
<TieSoul>
ooh, thanks Hanmac, will try that
shackleford has joined #ruby
shackleford has quit [Read error: Connection reset by peer]
rubytor has quit [Quit: No Ping reply in 180 seconds.]
shackleford has joined #ruby
rubytor has joined #ruby
<DEA7TH>
Hanmac: I removed all Rubies from RVM (I installed RVM today, and Ruby - months earlier); I did sudo apt-get remove ruby; I did sudo apt-get remove rubygems.
<Hanmac>
TieSoul: otherwise you need to write your own function that does understand what "/./\0\0/2" means
<mostlybadfly>
Phrogz: worked much better, thanks for the example, learned something new
nanoyak has joined #ruby
claymore has joined #ruby
<mostlybadfly>
got the same result using the same loop but modified the method
claymore has quit [Changing host]
claymore has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
klmlfl has quit [Ping timeout: 260 seconds]
Peter_ has joined #ruby
sparrovv has joined #ruby
echevemaster has joined #ruby
<Phrogz>
nice
<mostlybadfly>
Phrogz: so what you're saying basically is it'll immediately return the value for what i'm using it rather than storing it at all
<mostlybadfly>
this is completely new to me so i'm kind of trying to understand it, but i like how quickly it processed
oldbay has joined #ruby
_yez has joined #ruby
orolo has joined #ruby
skolman has quit [Remote host closed the connection]
Kricir has quit []
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
bearish has quit [Remote host closed the connection]
sarkis has joined #ruby
<sarkis>
is there a way to see what version of a gem is available without installing it?
agjacome has joined #ruby
<Macaveli>
Can you do something like this >> if Settings.shared.start_maintenance < Time.now < Settings.shared.end_maintenance
<sarkis>
hoping via gem cli
<Macaveli>
in ruby
<centrx>
Macaveli, Time.now.between?(low, high)
<Macaveli>
nice one centrx
eeezkil has joined #ruby
<waxjar>
sarkis: gem search gemname
<DEA7TH>
I just checked all environment variables, and all variables inside rubygems - they point to the correct ruby directory. Still, when I try to install a gem, it uses the old directory
<DEA7TH>
And I already removed rubygems and installed it again - didn't help
bthesorceror has quit [Quit: bthesorceror]
seitensei has quit [Read error: Connection reset by peer]
ghostmoth has quit [Ping timeout: 260 seconds]
MatthewsFace has joined #ruby
<havenwood>
DEA7TH: Where's the gem binary you're using?: which gem
Azulinho has quit [Ping timeout: 255 seconds]
<havenwood>
DEA7TH: Are there other Ruby packages installed?: sudo update-alternatives --config ruby
Obversity has joined #ruby
<havenwood>
DEA7TH: Are you prefixing `sudo` to your Ruby commands?
<sarkis>
thanks
<havenwood>
DEA7TH: If you want, come over to #rvm for help getting it working.
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
albedoa has quit [Ping timeout: 240 seconds]
<DEA7TH>
havenwood: the gem binary is inside the RVM directory - the same directory where the "correct" Ruby is also
sambao21 has quit [Quit: Computer has gone to sleep.]
<DEA7TH>
the command returned 'error: no alternatives for ruby'
<havenwood>
DEA7TH: Okay, so no sneaky apt Rubies lingering.
ylluminate has joined #ruby
<DEA7TH>
I'm prefixing sudo to gem commands, otherwise they don't work. ah, I'll try without sudo
<havenwood>
DEA7TH: no sudo with RVM
<DEA7TH>
It worked without sudo.
DootBot has joined #ruby
skolman has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
DEA7TH: there is an `rvmsudo` if you need it
<TieSoul>
I got the s/// thing to work
<havenwood>
\o/
ghostmoth has joined #ruby
<TieSoul>
s/./\0\0/3
<DootBot>
TieSoul: Regex /./ not found.
<TieSoul>
wot
<TieSoul>
s/./\0\0/3
<DootBot>
TieSoul: TieSoul actually meant: wott
sambao21 has joined #ruby
<DEA7TH>
It didn't work without sudo previously, reinstalling must have helped.
<toretore>
it's not run within the scope of ruby's thread scheduler
Riking has joined #ruby
Riking has quit [Remote host closed the connection]
Lewix has joined #ruby
<apeiros>
use jruby :-)
cirn0 has joined #ruby
txdv has quit [Read error: Connection reset by peer]
Riking has joined #ruby
ringaroses2 has joined #ruby
shlomo has quit [Quit: WeeChat 1.0]
<toretore>
(i should say "it might not run within the scope of ruby's thread scheduler" as i don't know)
ghr has quit [Ping timeout: 245 seconds]
txdv has joined #ruby
djbkd has quit [Remote host closed the connection]
parduse has quit []
parduse has joined #ruby
lw has quit [Quit: s]
MatthewsFace has joined #ruby
djbkd has joined #ruby
cocotton has joined #ruby
parduse has quit [Client Quit]
cocotton has quit [Remote host closed the connection]
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
jheg has joined #ruby
cocotton has joined #ruby
Peter_ has quit []
St_Marx has joined #ruby
ringaring has quit [Ping timeout: 260 seconds]
eeezkil has quit [Ping timeout: 250 seconds]
Xeago_ has quit [Read error: Connection reset by peer]
parduse has quit [Client Quit]
<pipework>
jrubby! :D
parduse has joined #ruby
pygospa has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
pygospa has joined #ruby
<apeiros>
toretore: it does run within the scope of it, but it's atomic to it. as all native methods are which don't explicitly yield to the scheduler.
<havenwood>
Is Maglev fading? Seemed like such a neat idea but seemingly no action since the VMWare acquisition.
sambao21 has joined #ruby
lynxbat has joined #ruby
<borodin>
http://kwski.net/linux/1202/ tells me that certain packages are required to properly build ruby. but other than that cool page, is there anything inside the source package that tells me that?
<borodin>
but still - nothing *within the source package*?
Neomex has joined #ruby
mikepack has joined #ruby
jimms has joined #ruby
ValicekB has quit [Ping timeout: 263 seconds]
bbloom has joined #ruby
<TieSoul>
does Timeout::timeout work in JRuby then?
jheg has joined #ruby
<havenwood>
TieSoul: yes
<TieSoul>
okay good
DrCode has quit [Ping timeout: 264 seconds]
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
andrewjanssen has joined #ruby
schubam has quit [Ping timeout: 260 seconds]
elaptics is now known as elaptics`away
reset has joined #ruby
tlarevo_ has quit [Remote host closed the connection]
bearish has joined #ruby
pu22l3r has quit [Ping timeout: 264 seconds]
DrCode has joined #ruby
momomomomo has joined #ruby
anildigital is now known as zz_anildigital
MatthewsFace has quit [Quit: This computer has gone to sleep]
pu22l3r has joined #ruby
jfutbol has joined #ruby
claymore has quit [Quit: Leaving]
bearish has quit [Ping timeout: 260 seconds]
JohnBat26 has quit [Ping timeout: 240 seconds]
MatthewsFace has joined #ruby
MatthewsFace has quit [Client Quit]
ari-_-e has quit [Ping timeout: 246 seconds]
ValicekB has joined #ruby
starless has joined #ruby
axsuul has quit [Ping timeout: 250 seconds]
ari-_-e has joined #ruby
ari-_-e has quit [Max SendQ exceeded]
jheg has quit [Quit: jheg]
<havenwood>
borodin: you could look in ext/Setup
ari-_-e has joined #ruby
<havenwood>
borodin: but no, there's no place in the Ruby source that list RedHat package deps
<havenwood>
lists*
parduse has quit []
parduse has joined #ruby
<TieSoul>
my regex code doesn't work in JRuby for some reason
axsuul has joined #ruby
<havenwood>
:O
yalue has quit [Quit: Leaving]
<TieSoul>
oh wait
<TieSoul>
nevermind
<TieSoul>
I'm dum
jheg has joined #ruby
CodeBunny has joined #ruby
mikepack has quit [Remote host closed the connection]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cnj has quit [Ping timeout: 240 seconds]
decoponio has quit [Quit: Leaving...]
gsd has joined #ruby
cnj has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
emmesswhy has quit [Quit: This computer has gone to sleep]
Rylee has quit [Max SendQ exceeded]
Rylee has joined #ruby
rubytor has quit [Quit: No Ping reply in 180 seconds.]
neersighted has quit [Ping timeout: 240 seconds]
jradd has joined #ruby
rubytor has joined #ruby
djbkd has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
djcp has joined #ruby
<borodin>
havenwood: in this case, I need to maintain a list of dependencies for rhel on my own - this is separate from the ruby package, and if the ruby package changes dependencies in the future I need to update my list
timgauthier is now known as timgauthier_isaw
ghr has joined #ruby
timgauthier_isaw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Hanmac>
rhel? like in centos? ;P i dont feel sorry for you, bro ;P
statianzo has joined #ruby
statianzo has quit [Client Quit]
ari-_-e has quit [Ping timeout: 246 seconds]
<jradd>
rhel/centos 7 is flippin awesome though
ari-_-e has joined #ruby
<jradd>
you should check it out if you are a hater :)
<pipework>
my condolences.
<Hanmac>
centos ... outdated since centurios
Rylee has quit [Max SendQ exceeded]
<Hanmac>
jradd: i needed to work with that ... i am allowed to be a hater
ghr has quit [Ping timeout: 246 seconds]
robbyoconnor has joined #ruby
<jradd>
CentOS 7 released a month ago and is going to redifine the way ubuntu does a lot of things you mark my word :)
<havenwood>
borodin: for now you'd have to track Ruby releases to see if a dep is added or dropped
<pipework>
It probably will, but they'll probably just do it a different way than how CentOS does it to spite them.
Rylee has joined #ruby
<jradd>
debian has followed suite with systemd, and ubuntu will when it grows up. (sorry this is probably off topic and i will stop)
djbkd has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac>
i tell you the da will come then ruby does not support 2.0 or 2.1 anymore and then the centos users does come because they still have problems with 1.8.7
<jradd>
hahaha
zeroNones has joined #ruby
statianzo has joined #ruby
statianzo has quit [Client Quit]
<pipework>
jradd: Actually, Ubanto has plans to use systemd already.
<pipework>
Has for months.
andrewjanssen has quit [Quit: Leaving...]
<jradd>
pipework: why don't you just take a shit in my cheerios while you are at it :( (JK)
<pipework>
jradd: I already took a dump in your shoes.
<jradd>
it isn't easy to make fun of ubuntu!
<jradd>
haha
<pipework>
It's true. Kinda hard to make fun of a self-deprecating comedian.
momomomomo has quit [Quit: momomomomo]
moritzs has joined #ruby
moritzs has quit [Max SendQ exceeded]
rubytor has quit [Quit: No Ping reply in 180 seconds.]
<jradd>
I thrive in deprecation. you where talking about me and not Ubuntu right? lol
moritzs has joined #ruby
rubytor has joined #ruby
<wasamasa>
woohoo
<wasamasa>
handed in my first ruby-related pull request
<havenwood>
borodin: though right now they aren't Ruby version dependant for supported Rubies. if some new version does something crazy with the deps, that ^ logic might change.
<borodin>
cool
cuppscakes has joined #ruby
<borodin>
one line prevents me from saving and filing away a list
ringaring has joined #ruby
pu22l3r has quit [Ping timeout: 264 seconds]
MatthewsFace has joined #ruby
cpruitt has quit [Quit: cpruitt]
bthesorceror has quit [Quit: bthesorceror]
nhhagen has joined #ruby
ringaroses2 has quit [Ping timeout: 246 seconds]
qba73 has joined #ruby
sigurding has quit [Quit: sigurding]
jottr_ has joined #ruby
ndrei has joined #ruby
Rylee has quit [Max SendQ exceeded]
LangeOortjes has quit []
bthesorceror has joined #ruby
davispuh has joined #ruby
Rylee has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
pietr0 has quit [Quit: pietr0]
Hanmac has quit [Ping timeout: 260 seconds]
renderfu_ has joined #ruby
cocotton has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
Takle has quit [Remote host closed the connection]
Xeago has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
lynxbat has joined #ruby
renderful has quit [Ping timeout: 250 seconds]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv_ has quit [Remote host closed the connection]
rubytor has quit [Quit: No Ping reply in 180 seconds.]
carraroj has quit [Quit: Konversation terminated!]
Xeago_ has quit [Ping timeout: 260 seconds]
Sonny|3oy has joined #ruby
axsuul has joined #ruby
sea_local has quit [Remote host closed the connection]
sea_local has joined #ruby
sevvie has quit [Ping timeout: 240 seconds]
rubytor has joined #ruby
moritzs has quit [Ping timeout: 264 seconds]
LnL has quit [Ping timeout: 245 seconds]
mskaesz has quit [Ping timeout: 255 seconds]
sigurding has joined #ruby
albedoa has joined #ruby
pu22l3r has joined #ruby
sea_local has quit [Ping timeout: 260 seconds]
bearish has joined #ruby
Takle has joined #ruby
Hanmac has joined #ruby
michaeldeol has joined #ruby
gsd has joined #ruby
braincra- has joined #ruby
Sonny|3oy has quit [Quit: Leaving]
bradleyprice has quit [Remote host closed the connection]
obs has joined #ruby
<Phrogz>
Oof. Too much lunch.
bradleyprice has joined #ruby
djcp has left #ruby ["WeeChat 1.0"]
bearish has quit [Ping timeout: 244 seconds]
braincrash has quit [Ping timeout: 245 seconds]
<Phrogz>
havenwood: My thanks to you for contributing. What area do you work on?
mkaesz has joined #ruby
crazydiamond has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
<havenwood>
Phrogz: right now i'm working on adding support for installing precompiled binaries
linojon has quit [Quit: linojon]
sevvie has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
obscured has quit [Quit: leaving]
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
bradleyprice has quit [Ping timeout: 264 seconds]
ovoraptor has joined #ruby
sylvanica has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Ping timeout: 250 seconds]
TorpedoSkyline has joined #ruby
saarinen has joined #ruby
TorpedoSkyline has quit [Max SendQ exceeded]
windblown has joined #ruby
<windblown>
hello
rubytor has quit [Quit: No Ping reply in 180 seconds.]
bthesorceror has quit [Quit: bthesorceror]
<havenwood>
hi
<windblown>
I need help. Anybody want to be my hero?
rubytor has joined #ruby
mikepack has joined #ruby
<mostlybadfly>
I can be your hero babyyyyy
<windblown>
thanks badfly
<TieSoul>
erm
hephaestus_rg has joined #ruby
<TieSoul>
guys
<Phrogz>
windblown: Please just ask your question. Don't ask if you can ask, or if someone can help. We will if we can.
<mostlybadfly>
Oh I was just singing the song I'm somewhat of a noon sorry but I'm happy to try
sylvanica has joined #ruby
<mostlybadfly>
But everyone here is very helpful and nice so ask away
<TieSoul>
Timeout::timeout seems to not work with jruby_sandbox
alexju has joined #ruby
Wolland has quit [Ping timeout: 255 seconds]
<Phrogz>
TieSoul: Perhaps #jruby folks will know more?
cuppscakes has quit [Quit: Whoops, AFK.]
TorpedoSkyline has joined #ruby
echevemaster has quit [Remote host closed the connection]
<windblown>
I have a block of ruby code I want to execute. I have a functioning rails environment. I want to execute a piece of (bumbed) code and get a JSON response. I need to display that response, after parsing with the JSON module. It might be quite long.
<Phrogz>
(not sure what "bumbed" is, but carry on with your question)
<windblown>
I don't know *where* to put the code.
Obversity has quit [Ping timeout: 240 seconds]
<windblown>
I mean I am not writing the routine, it is an example from a help file.
<shevy>
in the garage
<Phrogz>
windblown: By "display" you mean "send it from the server to the client as part of a request"?
Wolland has joined #ruby
<windblown>
Hold on...
thams has joined #ruby
<Phrogz>
windblown: (a) I want to make sure that you are clear about where Ruby code runs versus client code, how client/server communication works with web apps.
agrinb_ has quit [Remote host closed the connection]
wldcordeiro has quit [Remote host closed the connection]
<Phrogz>
windblown: (b) Perhaps instead of saying what you are trying to code, you might try to describe the experience you want the end user to have.
agrinb has joined #ruby
mikepack has quit [Ping timeout: 244 seconds]
djbkd has quit [Remote host closed the connection]
<windblown>
You guys are great, but the firehose is faster than I can absorb. I can't respond to your chat quickly enough.
<Phrogz>
I'm done typing now. Carry on :)
<havenwood>
windblown: Is this an existing Rails app you're adding a feature to?
pietr0 has joined #ruby
ovoraptor has quit [Read error: Connection reset by peer]
<havenwood>
If it's a new app, let us try to talk you out of Rails. If it's an existing one, #rubyonrails is probably the best place. ;)
<windblown>
havenwood, only in the sense that I have a rails app that says "hello wold"
<havenwood>
aha
<windblown>
sorry world
djbkd has joined #ruby
<Phrogz>
:)
<windblown>
This is entirely to show that the query routine works and can be expanded upon.
<mostlybadfly>
Oh are you guys not fans of rails?
ovoraptor has joined #ruby
<havenwood>
Not for the task you mention above.
<Phrogz>
windblown: Can you tell us what you want the user to do, and see as a result, and what the server should do instead?
<mostlybadfly>
Ah ok
<Phrogz>
mostlybadfly: I'm personally a Sinatra fan, but Rails is alright IMHO.
<mostlybadfly>
I'm going to a thing called project Euler sprint?
kiri has quit [Ping timeout: 240 seconds]
<mostlybadfly>
It's my first ruby related meet up even though you can answer in any language
<Phrogz>
My personal gripe with Rails is that there is SO much to put in your head. Like programming for OS X, there are so so so many methods.
<havenwood>
mostlybadfly: So you want to make an HTTP request, get JSON back, parse and serve it up to GET requests?
agrinb has quit [Ping timeout: 245 seconds]
fabrice31 has joined #ruby
sevvie has quit [Ping timeout: 244 seconds]
<mostlybadfly>
havenwood: I don't know enough about rails to say sorry. I only asked because it's shat I just started learning
Hobogrammer has quit [Ping timeout: 250 seconds]
<mostlybadfly>
What not shat :)
ghr has joined #ruby
Hobogrammer has joined #ruby
<cocotton>
Hey guys, I want to set 4 variables (var1, var2, var3, var4) if they match a condition. I would normaly write something like var1 = hostname == 'someHostname' (set var 1 = hostname if hostname == 'someHostname'. I'm writing this like for every variable, but I'm sure I could put this in a loop, yet don't know how. Can someone give me a hint?
<windblown>
Hey Phrogz, I "see" a list of available search terms with single or multi-select and a "query" button. The button executes the query that returns a JSON package. I getting my mind around routes and I can just about route the request to blah/search/term to pass the term and launch the response routine.
<Phrogz>
havenwood: precompiled binaries of gems, or ruby interpreters?
<havenwood>
mostlybadfly: There're many good ways. One option would be to use the HTTP gem to fetch the JSON, JSON.parse it, and use Hobbit to serve it up.
<jhass>
cocotton: that wasn't very clear, can you make a gist with your current code?
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
cocotton: gist the code you currently have please
<cocotton>
@jhass Sure!
<havenwood>
Phrogz: Ruby interpreter
<Phrogz>
windblown: OK, so: you want your web page to make a request to your web server using JS/AJAX, your Ruby server to prepare a JSON response, and then the JavaScript on the receiving page should handle that JSON and make results.
<mostlybadfly>
Thanks havenwood were you trying to reply to windblown?
<mostlybadfly>
I didn't ask about this
<havenwood>
mostlybadfly: oops, yup
<havenwood>
mostlybadfly: sry
<havenwood>
windblown: ^
bahamas10 has left #ruby ["WeeChat 0.3.8"]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: zzz]
<windblown>
yes Phrogz, that sounds like exactly what I want to do.
<mostlybadfly>
I was so confused haha
shackleford has quit [Remote host closed the connection]
<windblown>
Let me examine the example from havenwood.
<Phrogz>
cocotton: The simplest hint is that instead of discrete variables you probably want to be setting parts of a Hash or Array.
djbkd has joined #ruby
<havenwood>
windblown: I may have misunderstood what you're trying to do. Unsure.
rezzack has joined #ruby
<havenwood>
ccooke: [var1, var2...].all? { |var| var ... }
<apeiros>
cocotton: you assign true/false to all four vars?
<cocotton>
@Phrogz I'll go read about that :)
<Phrogz>
windblown: If what I described is what you want to do, then there are three discrete parts: write JavaScript on your web page that makes the AJAX request in response to the user action; also write JavaScript on the web page that receives the JSON response and does _whatever_you_want_ with the results; and thirdly, receive a request from the client (like any other) and return JSON.
<Phrogz>
windblown: Which of those three are you having trouble with?
<cocotton>
@apeiros Yes! The test is running on each 4 nodes, so every time I got to find which one it is and then run the specific test
<cocotton>
@apeiros After finding the nodes, the matching test block will be ran
<windblown>
havenwood-> In the example routes file are the separate "/" blocks intended to be "/something" and "/something_else" or are they "/something" and then "something_related_to_the_first_thing"?
<apeiros>
then expect(command "gluster peer status | grep #{node_name}")
<apeiros>
instead of having 4 separate code blocks
<apeiros>
which you will have to increase every time you add a node…
shackleford has quit [Remote host closed the connection]
nanoyak has quit [Quit: Computer has gone to sleep.]
<jhass>
a, b are really bad variable names though
<cocotton>
node1: :node2 is the new way of writing 'node1' => node2 ?
<Phrogz>
really, really terrible :)
<jhass>
I'd choose current and peer
matcouto has joined #ruby
doodlehaus has joined #ruby
jay has joined #ruby
<Phrogz>
cocotton: a: :b is the same as :a => :b
<jhass>
cocotton: no, :node1 => :node2
klmlfl has joined #ruby
<jhass>
and not that new, since 1.9 possible
chrishough has joined #ruby
<windblown>
->Phrogz i am trying to not use js if possible. I had intended to use routes if possible to navigate the JSON return set. I can't deviate to do any js if I can just dump the results to a list of links in the browser.
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cocotton>
I never really used symbols :S but I<ll get used to them
shackleford has joined #ruby
nanoyak has joined #ruby
cuppscakes has joined #ruby
Bumptious has joined #ruby
cuppscakes has quit [Max SendQ exceeded]
nobitanobi has joined #ruby
<Phrogz>
windblown: When your web server (using any server-side language, or static content) sends content to the web browser, it is no longer active. If you want the web browser to do anything, you MUST make a new request to the server. This can be either a normal HTTP get--load a whole new page...
cuppscakes has joined #ruby
cuppscakes has quit [Max SendQ exceeded]
shackleford has quit [Remote host closed the connection]
cirn0 has joined #ruby
sinkensabe has joined #ruby
<Phrogz>
...or it can be a JSON response. If the former, then you can use <a> or <form> in HTML to make the web browser make a new request. But if you want JSON, you must write *some* JavaScript.
cuppscakes has joined #ruby
diegoviola has quit [Ping timeout: 250 seconds]
<havenwood>
windblown: something and something else
CodeBunny has quit [Ping timeout: 260 seconds]
tvw has joined #ruby
BBBThunda has joined #ruby
<havenwood>
windblown: like if your site is site.com: site.com/something and site.com/something_else
<Phrogz>
You can reduce the amount of JavaScript you write by—for example—transforming the response into raw HTML on the server (in Ruby) and sending that back, so that it's easier to do _whatever_you_want_ with it, but JavaScript still must receive the AJAX response and handle it.
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<project2501a>
hey. noobie question: so basically :symbols are strings turned into light objects?
autochthon has joined #ruby
<zenspider>
everything is an object
cirn0 has quit [Ping timeout: 244 seconds]
<zenspider>
symbols are just values that represent themselves
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
OffTheRails has quit [Ping timeout: 250 seconds]
<Phrogz>
project2501a: Basically. Strings can be mutable, Symbols cannot. There is only ever one copy internally of the symbol :foo, but there might be many strings with the content "foo".
<apeiros>
just like numbers can represent themselves
<jhass>
I don't think comparing Symbols to Strings makes any sense, they have different usecases
<apeiros>
1, 2, 3 etc.
<n_blownapart>
symbols are only stored once. their reference in memory is faster.
<zenspider>
their reference in memory is faster? no
Morkel has quit [Quit: Morkel]
<project2501a>
heh. serves me right trying to submit code to puppet without knowing what i am doing.
<windblown>
Phrogz=> I was under the impression that after I executed the query (by setting q = query (blah blah blah), I could redirect to another route that would display the parsed JSON. I don't understand why js is neccessary, but I am deeply ignorant of current web technology.
<zenspider>
that doesn't make sense. everything takes the same amount of time to reference
<zenspider>
jhass: comparing them makes sense because they look similar.
shackleford has joined #ruby
michaeldeol has joined #ruby
<zenspider>
tho initially symbols were implemented as numbers
Wolland has quit [Ping timeout: 245 seconds]
<Phrogz>
windblown: It is possible that Rails has crazy magic methods that write all the JavaScript for you and send that to the client. I do not know. What I am describing is the end result that must be send to the browser, but it is possible that Rails hides this from you.
mkaesz has quit [Read error: Connection reset by peer]
cocotton_ has joined #ruby
<dorei>
i think symbols are not garbage collected
<jhass>
zenspider: I've only seen people getting confused by saying things like "they are interned strings"
<Phrogz>
(Which, as an old curmudgeon, would be one more reason that I don't like Rails -- too much blurring the client/server line.)
<havenwood>
dorei: *soon*
<zenspider>
correct. the symbol table always holds onto them
<windblown>
=>havenwood I was gonna parse it with the JSON module in ruby into a plain old hash. I thought JSON was passed as text, like XML.
<havenwood>
dorei: Ruby 2.2
<zenspider>
jhass: they ARE interned strings. See String#intern
<Phrogz>
windblown: You are correct that all transmission over http is done as text, including JSON markup.
<dorei>
havenwood: how come?
<jhass>
zenspider: but that's implementation detail, strings and symbols share as much usecases as strings and numbers
<havenwood>
windblown: Yeah, you can do this all in Ruby. No JavaScript is involved (except for your serializer, which uses a notation based on JS).
<havenwood>
windblown: In think that was all Phrogz point was ^.
<zenspider>
jhass: that they have different usecases has no affect on the fact that symbols are interned strings and that they look similar and are thus easy to confuse /compare
<n_blownapart>
I thought if you have three identical strings with differing object i.d.s , and one symbol that can be referred to multiple times, it was essentially faster. my bad zenspider
<havenwood>
dorei: The new GC, ah yup you found.
* Phrogz
is unsure if that was his point, but it's all good :)
<jhass>
zenspider: my point being that explaining what they are is counterproductive to explaining what they are good for
<jhass>
thus we should stop comparing them to strings
<zenspider>
n_blownapart: memory access is memory access. we don't have different types of pointers w/ different speeds of access.
<windblown>
At any rate, I appreciate the help. Thank you. I am going back into sublime for a bit to see if I can get this to work.
pu22l3r has quit [Ping timeout: 250 seconds]
<Phrogz>
windblown: Good luck! And also consider #rubyonrails
<zenspider>
n_blownapart: what you're probably conflating is comparison. symbols just look at object identitiy (pointer value) where the strings have to compare contents
<havenwood>
Phrogz: how's javascript involved then :O
chrishough has joined #ruby
cocotton has quit [Ping timeout: 240 seconds]
pygospa has quit [Ping timeout: 264 seconds]
<zenspider>
jhass: you cannot stop people from comparing them to strings. it just ain't gonna happen. idealism is neato, but entirely unrealistic
<havenwood>
Phrogz: imagine you've disabled javascript on your browser, what's the problem?
<n_blownapart>
zenspider: can't wait to start studying ruby again. love it.
cocotton_ has quit [Ping timeout: 240 seconds]
<jhass>
zenspider: I can try to convince a few people
<havenwood>
Phrogz: If the point wasn't the JS part of JSON i'm at a loss. :P
<Phrogz>
havenwood: My understanding of windblown's requirements was that he wanted to send a page to a user, have the user look at a search box, and then fetch some results via AJAX (without reloading the page).
<zenspider>
jhass: there's a wall. enjoy beating your head against it.
<wasamasa>
hmm
pygospa has joined #ruby
<havenwood>
Phrogz: ooooh, i so didn't get that...
wallerdev has joined #ruby
sylvanica has quit [Quit: sylvanica]
<jhass>
zenspider: thanks, enjoy your fatalistic life
<Phrogz>
havenwood: My understanding of the requirements may have been incorrect. Or, possibly, his requirements may be flexible enough to allow a standard http request for the results instead of needing AJAX.
<wasamasa>
there doesn't happen to be a thing like perl's strict mode for ruby
diegoviola has joined #ruby
<havenwood>
Phrogz: i'll go back to just being confused ;P been doing a lot of that today..
<wasamasa>
or anything else that prevents me from accessing a non-existent index in an array and getting an error
<wasamasa>
instead of just a nil
<zenspider>
wasamasa: nope. sorry. we've got -w but too many libraries are "dirty"
<wasamasa>
it is convenient for quick and dirty scripts, but haunts me for more reliable ones
<zenspider>
s/fatalistic/realistic and ok with it/
<wasamasa>
where I hunt bugs for an hour and find out it's just a missing letter
<wasamasa>
in a hash key
<wasamasa>
I mean, seriously?
<zenspider>
wasamasa: eh. we seem to be doing ok overall. write more tests. do TDD. seems to balance out
<Phrogz>
wasamasa: You can use #fetch() instead of #[]
robbyoconnor has joined #ruby
<havenwood>
+1 fetch
<Phrogz>
"Tries to return the element at position index, but throws an IndexError exception if the referenced index lies outside of the array bounds."
<zenspider>
even in perl I was usually doing something like $hash[key] || die "wtf"
<zenspider>
you can still do that in ruby
<jhass>
wasamasa: you didn't get a NoMethodError on nil? Sounds like you used #[] where you should've used #has_key?
<Phrogz>
Both are method calls, though one doesn't look like it, so it's just a bit more typing if being safe in this regards matters to you.
<wasamasa>
jhass: it blew up on the nil later
_lexjm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
what about Hash.new { raise 'key not found' } :P
tjr9898 has joined #ruby
<havenwood>
it was an Array but now is a Hash
kvad32 has joined #ruby
pygospa has quit [Ping timeout: 240 seconds]
<havenwood>
wasamasa: if it's really an Array, fetch with no block is perfect for the IndexError
<havenwood>
wasamasa: or is it a Hash?
<wasamasa>
havenwood: it happens to me with both
<havenwood>
ah
<wasamasa>
havenwood: both return nil if something's not right
Deele has quit [Ping timeout: 244 seconds]
<Phrogz>
"Returns a value from the hash for the given key. If the key can’t be found, there are several options: With no other arguments, it will raise an KeyError exception; if default is given, then that will be returned; if the optional code block is specified, then that will be run and its result returned."
<Phrogz>
Hash also has #fetch
gccostabr has quit [Quit: ZZZzzz…]
<wasamasa>
hmm
<wasamasa>
how crazy would it be to build a library that turns lenient method calls into stricter ones
<havenwood>
>> [].fetch 0
<eval-in>
havenwood => index 0 outside of array bounds: 0...0 (IndexError) ... (https://eval.in/185005)
<apeiros>
havenwood: yeah, it's annoying. also I couldn't figure a good reason for them removing it
klmlfl has quit [Ping timeout: 260 seconds]
britneywright has quit [Ping timeout: 245 seconds]
hephaestus_rg has quit [Quit: Lost terminal]
cpruitt has joined #ruby
livingstn has quit []
thams has quit [Quit: thams]
whatasunnyday has joined #ruby
weems|mac has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<doug1>
Phrogz: any ideas?
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hellangel7 has quit [Remote host closed the connection]
ringaroses2 has joined #ruby
<Phrogz>
doug1: Same result for me, but then 1.1.1.1 for me is unreachable, so that makes sense. Is 1.1.1.1 a valid Internet IP that you can normally reach?
momomomomo has quit [Quit: momomomomo]
<doug1>
Phrogz: No, that's the whole point
_yez has quit [Ping timeout: 260 seconds]
<Phrogz>
Oh. Ha! So...sorry, what are you hoping to have happen? :)
djbkd has quit [Remote host closed the connection]
<Phrogz>
You want it to wait 3 seconds before giving you the error message?
<doug1>
Yah
<Phrogz>
I don't know much about HTTP timeouts, but my belief is that if the underlying OS says "WTF, that's address is not available" immediately, the code has no reason to wait for a time out. I think that's what's happening here.
ringaring has quit [Ping timeout: 245 seconds]
michaeldeol has joined #ruby
<Phrogz>
doug1: Oh! Remove the "http://" from your .new call.
<doug1>
Phrogz: I tried that
<Phrogz>
I am wrong, and then it works for me.
<Phrogz>
#=> Timeout due to connecting
pierre1_ has joined #ruby
jinie has quit [Ping timeout: 260 seconds]
<doug1>
Phrogz: are you serious? That's horrid
<doug1>
it works for you if you remove http:// ?
<Phrogz>
doug1: Yes, it 'works' insofar as I get the timeout. Note that I'm on Ruby 1.9.3, so maybe that's the difference.
<doug1>
if I remove http:// I get "`initialize': the scheme http does not accept registry part: 1.1.1.1:80:80 (or bad hostname?)"
<Phrogz>
ha!
<doug1>
ffs
<doug1>
i really really hate ruby
<Phrogz>
doug1: Do you have two :80 there?
toretore has quit [Quit: This computer has gone to sleep]
toretore has joined #ruby
<doug1>
nope, I have "http = Net::HTTP.new("1.1.1.1:80")"
toretore has quit [Remote host closed the connection]
<doug1>
i'd call this completely jacked up
<Phrogz>
Remove the :80, perhaps?
LudicrousMango has joined #ruby
* Phrogz
is just guessing
<doug1>
part of the reason I have such a strong dislike of ruby
<havenwood>
doug1: Just don't use Net::HTTP. There're a myriad of fantastic HTTP gems.
jinie has joined #ruby
<Phrogz>
Are there? That's good to know. Got one you recommend, to stick in my brain?
<havenwood>
doug1: HTTP for example: Timeout.timeout(3) { HTTP.get('http://1.1.1.1:80').to_s }
<doug1>
havenwood: say your saying the basic ruby library can't connect to a URL with a timeout?
<doug1>
i can keep looking but every single example is completely different
_cake has joined #ruby
<Phrogz>
doug1: I did not see him type that. I understand that you are frustrated, and that documentation on net/http is not as complete or correct as you'd like.
<havenwood>
doug1: I'm saying pure Ruby gems like HTTPClient are better maintained, better code, and less quirky than Net::HTTP.
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kirun has quit [Quit: Client exiting]
Ankhers has quit [Ping timeout: 264 seconds]
<doug1>
zenspider: i'll take the one that's apparently working now then :)
mary5030_ has joined #ruby
<whatasunnyday>
Hey friends, I was wondering if anyone knew if there’s a way to supress warnings and debug statements from YARD. I’ve done my best google fu and reading over the documenation. I cross posted this to #yard but its a pretty dead channel.
Zesty has quit [Quit: Leaving...]
RandyT has quit [Read error: Connection reset by peer]
roolo has quit [Quit: Leaving...]
itspots has quit [Ping timeout: 250 seconds]
RandyT has joined #ruby
<atmosx>
which one is easier to implement to a Sinatra application (and generally work with): Delayed_job, sidekiq or resque?
djbkd has joined #ruby
riotjone_ has quit [Ping timeout: 240 seconds]
thams has joined #ruby
ylluminate has quit [Quit: Bye!]
mikesplain has quit [Ping timeout: 246 seconds]
<aedorn>
atmosx: Sidekiq
mary5030 has quit [Ping timeout: 240 seconds]
<atmosx>
aedorn: but it require redis?!
ptrrr has quit [Quit: ptrrr]
sea_local has quit [Ping timeout: 250 seconds]
<aedorn>
so does resque, and delayed_job requires at least AR
Zesty has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikesplain has joined #ruby
_yez has joined #ruby
<atmosx>
awesome, all of them shitty little things
<atmosx>
maybe I should with good old cron jobs
<atmosx>
hm redis took something like 15 seconds to get installed, that's cool.
LudicrousMango has quit []
<aedorn>
redis is ridiculously easy =p
borodin has quit [Quit: Page closed]
<atmosx>
yeah...
<atmosx>
I'm falling in love
<atmosx>
there's no setup, I feel like a ninja
<havenwood>
atmosx: another advantage of rescue and sidekiq is that you could switch to goworker if you ever needed to: http://www.goworker.org
geggam has joined #ruby
sylvanica has quit [Ping timeout: 260 seconds]
treehug88 has quit []
Zesty has quit [Client Quit]
<atmosx>
havenwood: hahaha coool
<havenwood>
(only if you really needed the speed)
<atmosx>
make a worker.go is that really that fast?
WormDrink has quit [Ping timeout: 260 seconds]
<zenspider>
whatasunnyday: I solve that by using rdoc
<atmosx>
no I don't need speed (as of today) but that's so cool it's hard to resist
deric_skibotn has quit [Ping timeout: 250 seconds]
jottr_ has quit [Ping timeout: 245 seconds]
<havenwood>
even they claim it's premature optimization to use their tool over sidekiq unless you need it
fabrice31 has joined #ruby
Wolland has joined #ruby
<whatasunnyday>
zenspider: unfortunately its a hard dependency for what i’m doing
jheg has quit [Quit: jheg]
<zenspider>
doubt it
Lewix has quit [Remote host closed the connection]
devdazed has quit [Quit: Computer has gone to sleep.]
<atmosx>
Note: because of the high performance nature of Redis, it is possible to try a lot of passwords in parallel in very short time, so make sure to generate a strong and very long password so that this attack is infeasible.
<atmosx>
hahahah
cpruitt has quit [Quit: cpruitt]
<atmosx>
awesome things arounod and I never tried them :-(
ValicekB has quit [Ping timeout: 245 seconds]
cndiv has quit [Ping timeout: 260 seconds]
<wasamasa>
better late than never
nanoyak has quit [Quit: Computer has gone to sleep.]
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24_ has joined #ruby
Cheezebox has quit [Remote host closed the connection]
<aedorn>
whatasunnyday: I honestly found that reading the source, because I almost never do -h over --help for whatever reason, and didn't know that either until now. heh
<whatasunnyday>
aedorn: yeah me either. that is… funny.
Takle has quit [Remote host closed the connection]
Lewix has joined #ruby
<zenspider>
guess I'm glad I almost always use -h :D
sparrovv has quit [Ping timeout: 264 seconds]
volk_ has quit [Quit: volk_]
<aedorn>
zenspider: but then you don't get the commands list, only the option flags! lol
<doug1>
me and ruby don't get along... http://pastebin.com/Yai3njz7 ... says "undefined method `body' for Net::HTTPSuccess:Class" at line #34... (this is chef btw)
WormDrink has joined #ruby
matcouto has joined #ruby
ghr has joined #ruby
<zenspider>
doug1: res = Net::HTTPSuccess
<zenspider>
what's that do?
<zenspider>
more specifically: if res = Net::HTTPSuccess then
<doug1>
zenspider: what's it do?
<zenspider>
it assigns the class to res
<doug1>
zenspider: i thought it was the way to check if I got a 200
<doug1>
oh
<doug1>
bugger me
<doug1>
==
<zenspider>
right
<zenspider>
first skill to build up is reading error messages
<zenspider>
"undefined method `body' for Net::HTTPSuccess:Class" at line #34
<doug1>
i blame the other confusing ruby syntax blocking my view :)
MrL0ngbowman has joined #ruby
<zenspider>
that :Class part is the first hint
<zenspider>
run with -w and it would tell you that you assigned in a conditional
<doug1>
zenspider: tis chef, so I can't really do that
<havenwood>
atmosx: the cake is a lie :O (don't tell)
<havenwood>
:cake:
Wolland has joined #ruby
Takle has joined #ruby
timgauthier has joined #ruby
<whatasunnyday>
havenwood: you live in topanga?
timgauthier has quit [Client Quit]
<atmosx>
hehe
<havenwood>
whatasunnyday: i do
agjacome has quit [Quit: leaving]
mgin has joined #ruby
<whatasunnyday>
whatasunnyday: i grew up in chatsworth. quite a bit north of you but not too far.
<atmosx>
I always avoided Redis because I've read somewhere that you need at least 4 GB of RAM just for running it... which was not true (from I see). I can get around 1 mil of items stored in 100 MB of DB.
<atmosx>
err of RAM
zorak has quit [Ping timeout: 245 seconds]
<Lewix>
havenwood: what do you do in your day job
<mgin>
hey we are having trouble with a ruby app, and I have a question about ruby I was hoping someone could answer...
<atmosx>
Lewix: obviously havenwood is a baker
<whatasunnyday>
what is that thing irc command that says just ask a question instead of asking about a question
<atmosx>
mgin: no way anyone here would answer a ruby related question
phoo1234567 has quit [Quit: Leaving]
toastynerd has quit [Remote host closed the connection]
<mgin>
well we are running apache/rails/ruby 1.8.7... some requests require making an HTTP request, e.g. using Net:HTTP ... those calls seems to be blocking every other request until they complete
<atmosx>
candlestick takes a lot of courage
cuppscakes has quit [Quit: Whoops, AFK.]
<atmosx>
ruby1.8.7 <- sounds like shit waiting to hit the fan
sectionme has joined #ruby
<jhass>
mgin: 1.8.7 is out of official support
<atmosx>
mgin: I don't know even know if 1.8.7 support fibers/thread.. IIRC threads yes, fiber now.
<atmosx>
err no
chipotle has quit [Quit: cya]
<mgin>
yeah it will be hell to update everything. just curious if I'm missing an easy option here...
<doug1>
ugh. Now when I have a connection refused I'm getting an error on the timeout rescue bit "uninitialized constant Net::OpenTimeout" *sigh*
rubytor has quit [Quit: No Ping reply in 180 seconds.]
<mgin>
tried putting it in its own thread, that doesn't help. still seems to block every request until it completes
<havenwood>
whatasunnyday: ahh, my sister works in chatsworth sometimes
rubytor has joined #ruby
<jhass>
doug1: comment the rescue and look at the exception class again
<atmosx>
doug1: rescue-it
<havenwood>
whatasunnyday: i work remotely, coding
ringaring has joined #ruby
<whatasunnyday>
havenwood: smallish world. topanga is beautiful. pretty good place to remote.
<atmosx>
havenwood: I envy you
<doug1>
jhass: worked before, but ok, I'll check it
sevvie has joined #ruby
<atmosx>
havenwood: you live in the US?
Wolland_ has joined #ruby
klmlfl has joined #ruby
<dorei>
remote work for everyone xD
<havenwood>
atmosx: yup, in LA
<mgin>
thoughts?
alexju has quit [Remote host closed the connection]
<atmosx>
mgin: without knowing actually *what* are you trying to do, it's hard to imagine any solution other then vague things like 'threading'.
<doug1>
well hell I dunno. it works fine standalone but not in chef
<atmosx>
mgin: that said, you should upgrade your ruby no matter what. There are huge performance boost and new features from which you could probably benefit.
maniaca__ has joined #ruby
<havenwood>
whatasunnyday: when you first said topanga i was baffled since i'm connected to irc via tor, then i realized, githubs...
apeiros has quit [Remote host closed the connection]
<atmosx>
havenwood: yeah goodl is a bitch
<atmosx>
s/goodl/google
Wolland has quit [Ping timeout: 260 seconds]
<whatasunnyday>
whatasunnyday: lol. yeah, i checked out your gem and what else you’ve published. always like to say thank you if you wrote something i’m using :).
<mgin>
simple, someone makes a web request into to the ruby app, and we have to make an HTTP request via Net:HTTP or similar to serve them their result
_lexjm has joined #ruby
<doug1>
chef is failing with "Timeout::Error"
apeiros has joined #ruby
ringaroses2 has quit [Ping timeout: 240 seconds]
<whatasunnyday>
whoops that was supposed to be to havenwood
<doug1>
but the same code in a standalone script works fine, it's caught ok with Net::OpenTimeout
<havenwood>
identity crisis
sectionme has quit [Ping timeout: 260 seconds]
<atmosx>
mgin: sounds like a threaded app to me.
<Lewix>
dorei: I'm in the market
<jhass>
doug1: go to #chef and blame them
maniacal_ has quit [Ping timeout: 245 seconds]
<doug1>
jhass: meh
cirn0 has joined #ruby
<atmosx>
doug1: retry, count tries and retry it.. if it fails X times exit
JoshGlzBrk has joined #ruby
maniaca__ has quit [Read error: Connection reset by peer]
ringaroses2 has joined #ruby
klmlfl has quit [Ping timeout: 255 seconds]
<atmosx>
can I start sidekiq from configu.ru? When I fire-up the rack http server?
<doug1>
atmosx: I can't catch the error tho. oh wait, yes I can. in chef I have to use Timeout::Error it seems. In a standalone ruby script that does not work and I use standard Net::OpenTimeout
<doug1>
ah ruby
<dorei>
Lewix: getting myself a remote job is the best thing ever happened to me (work-related), no more waking up early :)
<Lewix>
dorei: haha, i used to work remotely
<doug1>
remote work? dorei are you from the future?
<Lewix>
dorei: does your company hire
<atmosx>
Lewix: and why did you stop?
<doug1>
a future where medi evil attitudes towards remote work are a thing of the past
<jhass>
atmosx: in theory but look into something like the foreman gme
<Lewix>
atmosx: i moved to toronto
<atmosx>
Lewix: and working remotely to toronto is illegal?!
<atmosx>
jhass: hm, that's a rack server too IIRC
Sawbones has quit []
<Lewix>
and work there for a company that made me sweat to death
<jhass>
doug1: I'm serious, blame chef, not ruby
<Lewix>
worked* since I quit
<atmosx>
oh it's procfile..
<nobitanobi>
that awesome moment when you realize is 8pm and you are on your pyjs
Ankhers has joined #ruby
<nobitanobi>
that is remote work to me
ringaring has quit [Ping timeout: 245 seconds]
<Lewix>
atmosx: where do you work
tjr9898 has joined #ruby
<Lewix>
more company should hire remote really
<Lewix>
I found that i was more productive working remotely than in the office
<dorei>
Lewix: it's a non IT company, no idea what are their plans
<atmosx>
Lewix: I work at the family business, which is a small medical office and a pharmacy. I'm about to become a pharmacist.
goleldar has quit [Read error: Connection reset by peer]
<dorei>
no idea about the quality of the job postings there
<atmosx>
Lewix: why not?!
<shevy>
atmosx wow, doesn't it take years of study to become a pharmacist? I mean a guy who is allowed to sell drugs to people
<Lewix>
atmosx: dont i always see you in the ruby channel
lynxbat has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrishough has joined #ruby
<atmosx>
best remote job postins are on SO.
cirn0 has quit [Ping timeout: 264 seconds]
<dorei>
shevy: legal drugs are lame :p
<atmosx>
shevy: I'm a half genious, almost made it in 3, most probably will take 4.
freerobby has quit [Quit: Leaving.]
<atmosx>
Lewix: yeah but I'm not proficient with either ruby or rails (not like shevy or havenwood for example)
<shevy>
dorei well try to sell drugs without permission here :P
<atmosx>
Lewix: just writing small aps every now and then
<Phrogz>
dorei: I dunno, I live in Colorado :)
<shevy>
drugorado
<atmosx>
shevy: you think rubyists will need drugs? :-P
<nobitanobi>
lol
bthesorceror has quit [Quit: bthesorceror]
<dorei>
shevy: not here, darknet :p
zorak has joined #ruby
rubytor has quit [Quit: No Ping reply in 180 seconds.]
<dorei>
Phrogz: aspendam xD
<Phrogz>
As the sign on the local fast food restaurant says, "Our cows are drug-free. At least something in Colorado still is."
<atmosx>
maybe I'll join a conference with a pack full of dopamine D2 inhibitors
lynxbat has joined #ruby
lynxbat has quit [Max SendQ exceeded]
<Lewix>
ya shevy and havenwood don't sleep they breathe ruby
rubytor has joined #ruby
autochthon has quit [Ping timeout: 260 seconds]
<Lewix>
no life for them
<atmosx>
Lewix: exactly! hahaha, you work as a programmer?
<shevy>
atmosx no I mean... most studiers here are either 3 years (bachelor degree) or 5 years (diploma; or a combined bachelor + 2 more years for master, combined 5 years); pharmacists here though have their schedule put into three unequal parts and in summary it takes 6 years to finish "normally"
<shevy>
*studies
<Lewix>
atmosx: yes
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lynxbat has joined #ruby
timgauthier has joined #ruby
<dorei>
shevy: what do you study? other than haskell
<shevy>
atmosx now drug design, that's something!
<shevy>
I don't study haskell ...
<atmosx>
shevy: well in CZ takes 3 years too. It's just that I was in a rush because I'm 32 and I'm Greek so kinda poor by default (metaphorically and literally)
nhhagen has quit [Remote host closed the connection]
<shevy>
dorei I dunno really. right now chemistry ... I am more like just taking all easy exams possible...
<nobitanobi>
atmosx: Where in Greece?
<atmosx>
shevy: drug design is cool really, especially third generations tablets, are really intersting.
<Lewix>
atmosx: im too old to be a pharmacist, I'll stick to sf for now
<shevy>
atmosx being in a rush is not bad, you make more use of your time
<Lewix>
atmosx: go for it!
<atmosx>
shevy: trying to get the AS to the side of infection, calculating pressure/pH in the intestines/stomach/GI tract is awesome
<shevy>
that's out of my ability to understand :)
<shevy>
though perhaps I may know about endo and exotoxins :P
michaeldeol has joined #ruby
<shevy>
why the ebola virus is so deadly is also kinda interesting
Zesty has joined #ruby
<Phrogz>
Because God hates certain people more than others?
Bumptious has joined #ruby
<atmosx>
Phrogz: money talks... The outbreak would have never got that far in a "first world country".
<atmosx>
anyway
<dorei>
the hostname of my home pc is ebola :)
<Phrogz>
(I'm (a) just kidding, and (b) really annoyed that we have so little control over the biologic microscopic realm of fucking humans.)
<Lewix>
atmosx: bullshit
<atmosx>
shevy: to me, toxoplasma virus is amazing...
pietr0 has joined #ruby
<Lewix>
they don't have "ebola" in a first world country - easy to say
<atmosx>
shevy: It has a definitive host (cats) and alters rats behavior in order to allow them to be eaten by cats.
<Phrogz>
HOW THE FUCK ARE WE SUPPOSED TO TAKE CONTROL OF OUR OWN DESTINY IF WE CAN'T EVEN STOP MICROSCOPIC SHIT FROM DESTROYING US?!
IceDragon has quit [Ping timeout: 255 seconds]
<dorei>
we dont have the bats that are natural carriers of ebola at first world countries, lucky us
<atmosx>
can you imagine a virus that changes your behavior, I mean it's crazy but totally do-able (in the realm of theory).
<pipework>
sounds like someone needs to take a chill pill and make friends with the arachnids on his face.
<Lewix>
Phrogz: lol hey calm down, if you have something to say to God, there's church on Sunday
<Phrogz>
:)
<Phrogz>
I don't wanna die, and Ebola is proof that we have a long way to go before physical immortality.
<dorei>
atmosx: like rabies?
mfmfmfmfmfmf has quit [Remote host closed the connection]
<shevy>
atmosx oh these are also super cool, how something as small as a virus can alter the behaviour of a larger animal. but I see it with myself too! I have tooth ache, and it hurts and also makes me angry at the same time, so I am not so surprised that a virus could do the same
<timgauthier>
anyone here use vagrant?
Sgeo has joined #ruby
<aedorn>
but toxoplasmosis is an infection from a parasite =p not virus!
butblack has joined #ruby
<shevy>
ok how about the rabies then
<aedorn>
virus
<dorei>
rabies reminds me of zombie movies
<aedorn>
with just a few mutations rabies is the zombie virus
<shevy>
cool
<shevy>
'Hydrophobia ("fear of water") is the historic name for rabies.'
<shevy>
I'm gonna chase those zombies away with pure water
<aedorn>
If it ever goes infectious via airborne we are royally f'd
<shevy>
or even sacred water, to also chase away vampires at the same time for an additional effect
maniacal_ has joined #ruby
<atmosx>
shevy: toxoplasma actually makes the mouse looking for cat-piss... while generally rats avoid anything that smell like a cat piss.
<shevy>
hehe
<atmosx>
shevy: it's like changing your taste on chocolate, on the fly :-)
<shevy>
so the mouse turns into a bum
mary5030_ has quit [Remote host closed the connection]
deric_skibotn has joined #ruby
<atmosx>
like an kernel injercted (module) rootkit hehe
threesixes has joined #ruby
<Phrogz>
heh
<aedorn>
eh.. the mouse turns into a suicidal animal that tries to find a cat to be eaten by
<shevy>
yeah, there are many examples... one parasite that infects snails, then moves into that eye-thingy of a snail, which looks gross to a bird, which then eats that snail...
<shevy>
aedorn perhaps it tried to beat the cat silly!
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cajone has left #ruby [#ruby]
EasyCo has joined #ruby
_lexjm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
volk_ has joined #ruby
<timgauthier>
my wife wants to study medicine, she wants to study skin diseases.
ringaring has joined #ruby
snath has quit [Ping timeout: 264 seconds]
verto has quit [Ping timeout: 244 seconds]
sevvie has quit [Ping timeout: 245 seconds]
<timgauthier>
really, thats what killed everything?
<edwardloveall>
@neilk_ can you point me at a line number?
<neilk_>
edwardloveall: 69-80, maybe? I'm confused. The calling code is somehow able to say on(subClassOfPageObject)
ghr has quit [Ping timeout: 240 seconds]
Aaaal has quit [Quit: Aaaal]
<neilk_>
edwardloveall: when, to my eyes, it should be subClassOfPageObject.on
sinkensabe has quit [Ping timeout: 255 seconds]
geggam has quit [Remote host closed the connection]
lynxbat has joined #ruby
mikepack has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ruben-cp has joined #ruby
<aedorn>
that's a method and you pass it the class object or string of the class
geggam has joined #ruby
maniacal_ has joined #ruby
<neilk_>
aedorn: I understand that part
spastorino has quit [Quit: Connection closed for inactivity]
maniaca__ has joined #ruby
icebourg has quit []
ruben-cp has quit [Client Quit]
<neilk_>
aedorn: the calling code and the examples (right in the comments) both seem to be using "on" as if it was some global method
<neilk_>
aedorn: e.g. " on(LearnPage).next_element.when_present(15).click "
sectionme has joined #ruby
<neilk_>
aedorn: so I thought maybe there is some really weird way of looking up methods I'm not aware of
<edwardloveall>
is this in rspec?
<aedorn>
the module is being included, so the method is accessible. Just depends on where it's included at. It looks like you can define it to be included in Object, which makes it available everywhere
spider-mario has quit [Remote host closed the connection]
<neilk_>
edwardloveall: I'm puzzling out some test code. Some of it is rspec, but then there are these on() and visit() things.
pietr0 has quit [Quit: pietr0]
dorei has quit []
<jhass>
or include of that module somewhere
<edwardloveall>
@jhass ooooo
sevvie has quit [Ping timeout: 250 seconds]
maniacal_ has quit [Ping timeout: 255 seconds]
<neilk_>
jhass: okay, thanks. Someone told me about the World thing but I didn't see the connection. thank you
<neilk_>
is env.rb a ruby convention or is that special only in this project? It seems to use env.rb pervasively.
<jhass>
it's a cucumber convention
<jhass>
more than a convention actually
thumpba has quit [Ping timeout: 264 seconds]
<shevy>
a LAW
<jhass>
cucumber requires that file at boot
<shevy>
whoever breaks the law
<neilk_>
shevy: lol
<shevy>
must die by sword and fire
rjhunter has joined #ruby
sectionme has quit [Ping timeout: 245 seconds]
<neilk_>
jhass: okay. Thanks.
<neilk_>
I have another general question. Is it normal in the Ruby world for library authors to expect to charge for documentation, or just in Cucumber/Cheesy/etc.? The docs are terrible, and then they say to just buy the ebook
jimms has quit []
JokesOnYou77 has joined #ruby
klmlfl has quit [Ping timeout: 264 seconds]
<JokesOnYou77>
Hi all
<jhass>
neilk_: no, I wouldn't call it normal
<JokesOnYou77>
How do I check if something is in a YAML file?
<jhass>
JokesOnYou77: load that yaml file and check
MCDev has quit [Ping timeout: 250 seconds]
mikepack has quit [Remote host closed the connection]
<JokesOnYou77>
jhass, Any chance you could be a bit more explicit? I'm having trouble with the specifics. I've tried both YAML::parse and YAML::load_file and havne't been able to get either to work