klautcomputing has quit [Ping timeout: 276 seconds]
JeanCarloMachado has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
x86iac has joined #ruby
axl__ has joined #ruby
replay__ is now known as replay
replay has quit []
replay has joined #ruby
axl_ has quit [Ping timeout: 258 seconds]
dminuoso has joined #ruby
arescorpio has joined #ruby
spudowiar has quit [Quit: Leaving.]
axl__ has quit [Ping timeout: 276 seconds]
Rodya_ has joined #ruby
aries_liuxueyang has joined #ruby
dminuoso has quit [Ping timeout: 258 seconds]
meinside has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
bjh13 has quit [Remote host closed the connection]
hutch34 has joined #ruby
AnFin has quit [Read error: Connection reset by peer]
soLucien has quit [Quit: Leaving]
Kyhz has quit [Ping timeout: 258 seconds]
marxarelli|afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
byteflame has joined #ruby
hutch34 has quit [Ping timeout: 250 seconds]
axl_ has joined #ruby
rcvalle has quit [Quit: rcvalle]
CloCkWeRX has joined #ruby
davidw has quit [Ping timeout: 244 seconds]
phoo1234567 has quit [Quit: Gotta go]
nitric has quit [Ping timeout: 244 seconds]
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
replay has quit []
tables has joined #ruby
Guest7941 is now known as saneax_AFK
s2013 has joined #ruby
jhack has joined #ruby
jhack has quit [Client Quit]
LoneHermit has joined #ruby
jhack has joined #ruby
<pizzaops>
matthewd: that's a little beyond me. I always struggle with yields and that sort of thing.
<pizzaops>
I'm reading docs on tap but yeah..
<matthewd>
pizzaops: tap is "do this (the pop), then discard the result and return this object (the dup, which has just been popped)"
etetz has joined #ruby
tables has quit [Read error: Connection reset by peer]
<pizzaops>
so if I removed the .dup, it would return the original array (destructively), less one object, instead of returning the value removed, like it normally does?
<matthewd>
Correct
<pizzaops>
Ahhh that might be exactly what i need
<matthewd>
It's `x = my_array.dup; x.pop; x`, in another form
etetz has quit [Remote host closed the connection]
eljimador has quit [Read error: Connection reset by peer]
<pizzaops>
It's like that except it avoids "seeming" mutable, which I like
LoneHermit has quit [Ping timeout: 252 seconds]
<pizzaops>
since we don't ever save something and then change it, like we do with x in that example
m1st3rwr0ng has joined #ruby
blackgoat has quit [Ping timeout: 240 seconds]
<pizzaops>
erm we never store the dup anywhere and then mutate the value of a variable is what i mean to say, which i try to avoid
<matthewd>
`*bar, _ = myarray` is nicely obtuse, and avoids any explicit mutation.. but isn't someone one can really look up if it's not clear -- no method names
Rodya_ has quit [Remote host closed the connection]
<pizzaops>
yeah I don't recognize that syntax at all
<pizzaops>
I can't wait until somebody designs a new language and claims it's "optimized for googlability" or something
LoneHerm_ has joined #ruby
qguv has joined #ruby
Rodya_ has joined #ruby
m1st3rwr0ng has quit [Client Quit]
blackgoat has joined #ruby
Rodya_ has quit [Remote host closed the connection]
m1st3rwr0ng has joined #ruby
tvw has quit [Ping timeout: 264 seconds]
Rodya_ has joined #ruby
<BrianJ>
Is there a way to turn 2 into two in ruby?
<BrianJ>
integer -> string
<pizzaops>
BrianJ: convert to a string, yes, convert magically to the word two? probably a gem for it
<pizzaops>
you can do 2.to_s but it'll give you "2"
<pizzaops>
but it's a string!
blackmesa has joined #ruby
<pizzaops>
BrianJ: let me ask you this, do you need to convert any arbitrary number to a string or just like, 0-9
marr has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
crankhar1er has joined #ruby
<BrianJ>
ya, I'm trying to build sentences dynamically and I need array.length to the string representation of that value
<BrianJ>
probably 0-20
<pizzaops>
if there isn't a gem that does it already (I bet there is), it's onerous but you could just map integers to desired strings with a hash or something, and write a lookup method
<pizzaops>
definitely definitely look for a gem first
<BrianJ>
ya, Haven't found anything on google yet, but I'll keep looking.
<BrianJ>
thanks
TomyLobo has quit [Ping timeout: 264 seconds]
Rodya_ has quit [Remote host closed the connection]
<soulisson>
I'm specially thinking about the part where I use the client_sock variable in the new thread?
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pizzaops>
matthewd: would it be horrible of me to monkey patch Array to have a method that does what you've described, and emits a new array less the last element of the original?
flashpoint9 has quit [Ping timeout: 250 seconds]
s2013 has joined #ruby
s2013 has quit [Client Quit]
axl_ has quit [Read error: Connection reset by peer]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axl_ has joined #ruby
devster31 has quit [Quit: cya]
axl_ has quit [Read error: Connection reset by peer]
dminuoso has joined #ruby
Azure has joined #ruby
Dimik-- has joined #ruby
Dreamer3 has joined #ruby
Diabolik has quit [Excess Flood]
Diabolik has joined #ruby
Diabolik has quit [Max SendQ exceeded]
axl_ has joined #ruby
Diabolik has joined #ruby
Diabolik has quit [Excess Flood]
davedev24 has quit []
Diabolik has joined #ruby
Diabolik has quit [Excess Flood]
Diabolik has joined #ruby
dminuoso has quit [Ping timeout: 264 seconds]
<x86iac>
brucebag: is 2 an integer or char?
axl_ has quit [Client Quit]
<soulisson>
x86iac, 2 is an integer, '2' is a string
Renich has joined #ruby
<soulisson>
Any one about my question?
Rodya_ has quit [Remote host closed the connection]
s2013 has joined #ruby
hutch34 has joined #ruby
<brucebag>
soulisson: is correct x86iac
<brucebag>
Just do .class
<brucebag>
On the var
<brucebag>
And you will know
elifoster has quit [Ping timeout: 276 seconds]
<soulisson>
brucebag, can you help me with a script and multithreading?
Rodya_ has joined #ruby
<soulisson>
I'm using in the thread block a variable defined outside the block, can it cause issues?
elifoster has joined #ruby
<brucebag>
I'm not far enough in my ruby skills
<brucebag>
To help there
hutch34 has quit [Ping timeout: 250 seconds]
<x86iac>
brucebag: wtf? you are the one who doesn't know how to do it lol
<brucebag>
What?
<soulisson>
brucebag, np
<brucebag>
x86iac: did I accidentally type something here to ask?
GinoMan2440_ has joined #ruby
<brucebag>
x86iac: you're mistaken
<brucebag>
Wrong Nick
iamdevnul has quit [Ping timeout: 250 seconds]
jabreity has quit [Ping timeout: 250 seconds]
<brucebag>
That was BrianJ
<x86iac>
who asked how to change 2 to two?
jabreity has joined #ruby
<x86iac>
oh ... tab complete for the win
iamdevnul has joined #ruby
<brucebag>
Yea lol
<x86iac>
BrianJ: is 2 an integer or char
<BrianJ>
an integer
kaiks has quit [Read error: Connection reset by peer]
roa is now known as Roa
unreal has quit [Read error: Connection reset by peer]
<x86iac>
BrianJ: i'd do a simple case statement
<brucebag>
Is there a method to transform integers into their English spellings?
Spami has quit [Quit: This computer has gone to sleep]
GinoMan2440 has joined #ruby
johnny56_ has joined #ruby
m1st3rwr0ng has joined #ruby
m1st3rwr0ng has quit [Max SendQ exceeded]
hutch34 has joined #ruby
blackmesa has joined #ruby
GinoMan2440_ has quit [Ping timeout: 250 seconds]
m1st3rwr0ng has joined #ruby
crankhar1er has joined #ruby
m1st3rwr0ng has quit [Max SendQ exceeded]
<x86iac>
holy ... you are right ... thanks a lot
the_rhizo2 has quit [Ping timeout: 265 seconds]
blackgoat has quit [Read error: Connection reset by peer]
<x86iac>
did you know it? or some magic song id program?
blackgoat has joined #ruby
Rodya_ has joined #ruby
m1st3rwr0ng has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
karapetyan has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 264 seconds]
LoneHerm_ has joined #ruby
<x86iac>
the video is just hilarious
m1st3rwr0ng has quit [Client Quit]
crankhar1er has quit [Ping timeout: 252 seconds]
C0D3JUNKIE has joined #ruby
diegoviola has quit [Quit: WeeChat 1.5]
C0D3JUNKIE has quit [Client Quit]
nankyokusei has joined #ruby
klautcomputing has joined #ruby
dhollinger has joined #ruby
blackgoat has quit [Ping timeout: 240 seconds]
sumobob has joined #ruby
Rickmasta has joined #ruby
nofxx has joined #ruby
karapetyan has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 260 seconds]
LiohAu has quit [Quit: LiohAu]
klautcomputing has quit [Ping timeout: 276 seconds]
emjaydub has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
dminuoso has joined #ruby
x86iac has quit [Quit: leaving]
quakephil has quit [Ping timeout: 250 seconds]
C0D3JUNKIE has joined #ruby
l4v2 has quit [Ping timeout: 252 seconds]
sumobob has quit [Ping timeout: 244 seconds]
dminuoso has quit [Ping timeout: 258 seconds]
Rodya_ has quit [Remote host closed the connection]
rgiscard has joined #ruby
jgt has quit [Ping timeout: 240 seconds]
stuartre1king has quit [Ping timeout: 276 seconds]
l4v2 has joined #ruby
JUgelen has joined #ruby
1JTAAZRLO has joined #ruby
32NABL2KI has joined #ruby
JUgelen_ has joined #ruby
32NABL2KI has quit [Read error: Connection reset by peer]
1JTAAZRLO has quit [Remote host closed the connection]
JUgelen_ has quit [Remote host closed the connection]
SilverKey has joined #ruby
Rodya_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
rgiscard has quit [Ping timeout: 265 seconds]
danman has quit [Quit: danman]
leea has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
greister has quit [Quit: WeeChat 1.3]
<brucebag>
I knew it
<brucebag>
It's a classic tune
<brucebag>
Fresh Prince made it very popular
greister has joined #ruby
Rodya_ has quit [Remote host closed the connection]
govg has quit [Ping timeout: 265 seconds]
sumobob has joined #ruby
sumobob has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
Rickmasta has joined #ruby
Rodya_ has joined #ruby
eljimmy has joined #ruby
boouy has quit [Quit: WeeChat 0.4.2]
Rodya_ has quit [Remote host closed the connection]
axsuul has joined #ruby
orangey has quit [Ping timeout: 244 seconds]
r_rios has quit [Ping timeout: 244 seconds]
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
p0p0pr37_ has joined #ruby
Silthias has quit [Ping timeout: 260 seconds]
p0p0pr37 has quit [Ping timeout: 258 seconds]
p0p0pr37_ is now known as p0p0pr37
flashpoint9 has quit [Ping timeout: 250 seconds]
Ropeney has quit [Ping timeout: 252 seconds]
tmtwd has joined #ruby
cdg has joined #ruby
EdwardIII has quit [Ping timeout: 258 seconds]
roflmyeggo has quit [Ping timeout: 258 seconds]
Ropeney has joined #ruby
roflmyeggo has joined #ruby
EdwardIII has joined #ruby
Spami has joined #ruby
Rodya_ has joined #ruby
cdg has quit [Ping timeout: 250 seconds]
Spami has quit [Client Quit]
blackmesa has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
the_rhizo2 has joined #ruby
Spami has joined #ruby
stuartrexking has joined #ruby
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
crankhar1er has joined #ruby
aryaching has joined #ruby
ur5us has quit [Remote host closed the connection]
aryaching has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
eljimador has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
crankhar1er has quit [Ping timeout: 258 seconds]
djbkd has joined #ruby
Silthias has joined #ruby
s2013 has joined #ruby
Rodya_ has quit [Remote host closed the connection]
vdamewood has joined #ruby
s2013 has quit [Client Quit]
Rodya_ has joined #ruby
axsuul has joined #ruby
ur5us has joined #ruby
s2013 has joined #ruby
Rodya_ has quit [Remote host closed the connection]
speakingcode has joined #ruby
capitainIsh has joined #ruby
<capitainIsh>
hey everyone
dminuoso has joined #ruby
Rodya_ has joined #ruby
Renich has quit [Ping timeout: 265 seconds]
capitainIsh has quit [Client Quit]
memorasus has quit [Remote host closed the connection]
memorasus has joined #ruby
emjaydub has left #ruby [#ruby]
LoneHerm_ has quit [Remote host closed the connection]
djbkd has quit [Quit: My people need me...]
ur5us has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dminuoso has quit [Ping timeout: 265 seconds]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
dunpeal has quit [Ping timeout: 258 seconds]
JeanCarloMachado has quit [Ping timeout: 265 seconds]
Dimik-- has joined #ruby
roflmyeggo has quit [Quit: Lost terminal]
speakingcode has quit [Ping timeout: 250 seconds]
Neobenedict has quit [Ping timeout: 258 seconds]
Neobenedict has joined #ruby
Neobenedict has quit [Changing host]
Neobenedict has joined #ruby
speakingcode has joined #ruby
alain_ has joined #ruby
alain_ has left #ruby [#ruby]
elifoster has quit [Ping timeout: 250 seconds]
roflmyeggo has joined #ruby
iLogic has joined #ruby
C0D3JUNKIE has quit [Quit: irc client :P]
Dimik-- has quit [Ping timeout: 250 seconds]
r_rios has joined #ruby
r_rios has quit [Changing host]
r_rios has joined #ruby
Contigi has joined #ruby
<iLogic>
hey guys i'm getting that javascript runtime error while trying to generate scaffold with rails, but i have node installed via nvm and its path exported..any clues?
A_Drone has joined #ruby
tyang has quit [Ping timeout: 258 seconds]
Velizar has quit [Quit: Velizar]
rgiscard has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
tyang has joined #ruby
unreal has quit [Ping timeout: 258 seconds]
Takumo has quit [Ping timeout: 250 seconds]
akkad has quit [Ping timeout: 250 seconds]
hfp_work has quit [Ping timeout: 250 seconds]
edgr has quit [Ping timeout: 258 seconds]
ineb has quit [Ping timeout: 258 seconds]
gregf_ has quit [Ping timeout: 258 seconds]
gypsydav15 has quit [Ping timeout: 250 seconds]
surrounder has quit [Ping timeout: 250 seconds]
M-shine has quit [Ping timeout: 258 seconds]
surrounder has joined #ruby
Gnubie_ has quit [Ping timeout: 250 seconds]
unreal has joined #ruby
weaksauce has quit [Ping timeout: 258 seconds]
techietrash has quit [Ping timeout: 258 seconds]
Eleeleth has quit [Ping timeout: 258 seconds]
BrianJ has quit [Ping timeout: 250 seconds]
devyn has quit [Ping timeout: 250 seconds]
ben__ has quit [Ping timeout: 250 seconds]
Gnubie_ has joined #ruby
A_Drone has quit [Ping timeout: 250 seconds]
ineb has joined #ruby
gregf_ has joined #ruby
AustinMatherne has quit [Ping timeout: 258 seconds]
bfrizzle has quit [Ping timeout: 258 seconds]
woodruffw has quit [Ping timeout: 258 seconds]
devyn has joined #ruby
arescorpio has quit [Ping timeout: 250 seconds]
sneakerhax has quit [Ping timeout: 250 seconds]
mmasaki has quit [Ping timeout: 250 seconds]
rgiscard has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
<soulisson>
Hi, is there a way to say to say the string is a string of bytes?
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vuoto has quit [Remote host closed the connection]
djbkd has joined #ruby
TomyWork has joined #ruby
A_Drone has quit [Remote host closed the connection]
djbkd has quit [Client Quit]
teclator has quit [Ping timeout: 250 seconds]
skade has joined #ruby
dminuoso has joined #ruby
pmyjavec has joined #ruby
rsampaio_ has quit [Ping timeout: 258 seconds]
dunpeal has joined #ruby
edwinvdgraaf has joined #ruby
mark_66 has joined #ruby
blackgoat has quit [Ping timeout: 276 seconds]
nando293921 has quit [Quit: Lost terminal]
bluOxigen has quit [Ping timeout: 258 seconds]
dminuoso has quit [Ping timeout: 276 seconds]
antgel has joined #ruby
bluOxigen has joined #ruby
ta_ has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has joined #ruby
A_Drone has joined #ruby
haxrbyte has joined #ruby
LiohAu has joined #ruby
aufi has joined #ruby
lele has quit [Ping timeout: 264 seconds]
Cohedrin has joined #ruby
jaruga___ has joined #ruby
lele has joined #ruby
amclain has quit [Quit: Leaving]
astrobun_ has quit [Remote host closed the connection]
andikr has joined #ruby
terlar has joined #ruby
Pupp3tm4_ has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Silthias has joined #ruby
astrobun_ has joined #ruby
rileyy has joined #ruby
mrgrieves has joined #ruby
Fly77 has joined #ruby
Skelz0r has quit [Ping timeout: 264 seconds]
deniskozlov has quit [Ping timeout: 244 seconds]
postmodern has quit [Quit: Leaving]
jenrzzz has joined #ruby
ICantCook has quit [Quit: bye]
djbkd has joined #ruby
Steve_Jobs has quit [Ping timeout: 244 seconds]
Pupp3tm4st3r has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
poguez_ has quit [Quit: Connection closed for inactivity]
Pupp3tm4st3r has joined #ruby
pandaant has joined #ruby
djbkd has quit [Remote host closed the connection]
ziyadb has joined #ruby
tomphp has joined #ruby
blackmesa has joined #ruby
symm- has joined #ruby
A_Drone has quit [Remote host closed the connection]
tulak has joined #ruby
EdwardIII has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
nankyokusei has joined #ruby
Moeh has joined #ruby
n90b0jjf has joined #ruby
<Moeh>
What is the best way to compress / encode a float like 20.123123 to the shortest possible alphanumeric string?
A_Drone has joined #ruby
n90b0jjf has left #ruby [#ruby]
<foxxx0>
Moeh: base64 would be one option, not sure if it's really the shortest
EdwardIII has joined #ruby
troulouliou_div2 has joined #ruby
moparisthebest has quit [Ping timeout: 276 seconds]
<foxxx0>
Moeh: nvm, the = padding is not strictly alphanum
nankyokusei has quit [Ping timeout: 244 seconds]
<Moeh>
Well, I can remove / add it, so that is not a problem. However using base64, the string is actually longer than the original number
<foxxx0>
you could define your own format: so that 20.123123 would convert to 220123123
<foxxx0>
the leading 2 denotes the amount of digits before the decimal
<foxxx0>
but that's not really short either
<Moeh>
num = 220123123, Base64.encode64(num.to_s) => "MjIwMTIzMTIz\n"
<Moeh>
not really
Fly77 has quit [Ping timeout: 265 seconds]
dminuoso has joined #ruby
anisha has joined #ruby
<foxxx0>
220123123 would be D1ECFF3 in hex
<foxxx0>
that seems to be reasonably short
elaptics has joined #ruby
<foxxx0>
but having only one hardcoded integer for the number of digits before the decimal is somewhat limiting, maybe use it for the number of decimal places?
crankhar1er has joined #ruby
dminuoso has quit [Ping timeout: 265 seconds]
AnFin has joined #ruby
aryaching has quit [Remote host closed the connection]
joonty has joined #ruby
p0p0pr37 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
skweek has quit [Ping timeout: 265 seconds]
symm- has quit [Quit: Leaving...]
crankhar1er has quit [Ping timeout: 240 seconds]
joonty has quit [Read error: Connection reset by peer]
tulak has quit [Remote host closed the connection]
joonty has joined #ruby
tulak has joined #ruby
Snowy has joined #ruby
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
hahuang61 has joined #ruby
mim1k has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
A_Drone has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
A_Drone has joined #ruby
ferr has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
rileyy has quit [Read error: Connection reset by peer]
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
flying has joined #ruby
Torrone has joined #ruby
astrobun_ has quit [Remote host closed the connection]
astrobun_ has joined #ruby
AnFin has left #ruby [#ruby]
AnFin has joined #ruby
Guest92364 has quit [Ping timeout: 250 seconds]
rileyy has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
Torrone has quit [Quit: This computer has gone to sleep]
<dangerousdave>
Can someone advise if this is possible, and the right approach please...
devec0 has quit [Ping timeout: 258 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<dangerousdave>
I want to produce a git combined diff, for a single person, between two dates, however I want to ignore all changes where the only change is a case change or a number change...
Moeh has joined #ruby
<dangerousdave>
i can do the diff, between the dates, for a single person, but the other requirements are more tricky. I was thinking of running the diff through a ruby script to remove the case changes and number changes
Moeh has quit [Client Quit]
<dangerousdave>
think this is a good approach?
reisei has quit [Ping timeout: 258 seconds]
karapetyan has quit [Ping timeout: 265 seconds]
dionysus69 has quit [Quit: dionysus69]
etehtsea has quit [Quit: Computer has gone to sleep.]
EdwardIII has quit [Ping timeout: 250 seconds]
Pupp3tm4st3r has quit [Remote host closed the connection]
Torrone has quit [Quit: This computer has gone to sleep]
GodFather has joined #ruby
craigp_ has quit [Ping timeout: 260 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
blackmesa has joined #ruby
Pupp3tm4st3r has joined #ruby
jaruga___ is now known as jaruga
Neoo has joined #ruby
Neobenedict has quit [Disconnected by services]
bkxd has joined #ruby
Neoo is now known as Neobenedict
Neobenedict has quit [Changing host]
Neobenedict has joined #ruby
Torrone has joined #ruby
blackgoat has joined #ruby
matcouto has joined #ruby
alfiemax has quit [Ping timeout: 258 seconds]
hanmac has quit [Ping timeout: 258 seconds]
karapetyan has joined #ruby
dionysus69 has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
LurkAshFlake has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
<LurkAshFlake>
Hi I ma using mechanize and after I log into the website the page variable (which was attribute de value: @agent.get(url) ) won't display the new page.
<LurkAshFlake>
am* the*
JeanCarloMachado has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
<toretore>
?code LurkAshFlake
<ruby[bot]>
LurkAshFlake: We can't help you without your code, please post it to https://gist.github.com
karapetyan has joined #ruby
alfiemax has joined #ruby
johnmilton has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
hanmac has joined #ruby
crankhar1er has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
<jhass>
is that actually any faster? did you benchmark load time?
giz|work has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
theunraveler has joined #ruby
theunraveler has quit [Remote host closed the connection]
hutch34 has joined #ruby
theunraveler has joined #ruby
hutch34 has quit [Client Quit]
theunraveler has quit [Remote host closed the connection]
theunraveler has joined #ruby
theunraveler has quit [Client Quit]
danman has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
zacts has joined #ruby
SilverKey has quit [Quit: Halted.]
leitz has joined #ruby
edwinvdgraaf has quit [Ping timeout: 244 seconds]
gregf_ has quit [Quit: leaving]
binaryplease1 has joined #ruby
dunpeal has quit [Quit: leaving]
ruby12 has joined #ruby
gregf_ has joined #ruby
<ruby12>
Guys I'm new to ruby, and despite reading the ruby docs, I just can't get my head around what the 'match' and 'scan' methods are. Could someone explain?
<Bish>
jhass: no, i think it even feels slower
binaryplease has quit [Ping timeout: 276 seconds]
<Bish>
but obscurification is the real reason
<jhass>
doesn't surprise me too much
<Bish>
i know, it's not really safe, but it's enough
<DefV>
ruby12: they solve different problems. match matches a pattern in a string, scan returns all found patterns in a string
Torrone has quit [Quit: This computer has gone to sleep]
<Bish>
>> "Guys I'm new to ruby, and despite reading the ruby docs, I just can't get my head around what the 'match' and 'scan' methods are. Could someone explain?
<ruby[bot]>
Bish: # => /tmp/execpad-0fcfe4b94d25/source-0fcfe4b94d25:6:in `raise': exception object expected (TypeError) ...check link for more (https://eval.in/621209)
<Bish>
noooo
<gregf_>
ruby12: can will use a pattern recursively, match will only match once?
<jhass>
obfuscation is never safe, those two words just don't go into the same sentence
<gregf_>
s/can/scan/
<Bish>
jhass: yeah i know, i just want to make it harder, and in this case... reverse engineering would be more complicated than building it from scratch
<apeiros>
gregf_: not really recursion ;-)
lxsameer has quit [Quit: WeeChat 1.5]
playfullyExist has quit [Quit: irc]
<jhass>
doesn't sound like it's worth to be protected then
<apeiros>
maybe repeatedly?
<gregf_>
>> p ["foo bar".match(/(\w+)/).captures, "foo bar".scan(/(\w+)/)]
<ruby[bot]>
gregf_: # => [["foo"], [["foo"], ["bar"]]] ...check link for more (https://eval.in/621211)
mim1k has joined #ruby
playfullyExist has joined #ruby
<Bish>
>> p "give 3 me all 4 numbers from 4 this sentence".scan(/\d/)
<Bish>
match is good, when you parsing something you know the format of, scan is better if you want to find some bunch of data in a huge wall of text
playfullyExist has joined #ruby
<apeiros>
ruby12: basically .match gives more detailed information about the match, by returning a MatchData instance of just the matched string.
<apeiros>
*instead of just…
<chilversc>
is there a class that deals with the concepts of local date, time, datetime with conversions to a zoned date time (handling ambiguous times or skipped times due to DST)?
tvon has quit [Quit: System is sleeping...]
binaryplease1 is now known as binaryplease
dhollinger has joined #ruby
<ruby12>
i think i get it now. thanks a lot guys. i've learned more here in about 5 mins than i have from scratching my head alone and staring at the docs for the last 30 mins :D
<jhass>
chilversc: depending on what you need standard library Time, Date and DateTime do. ActiveSupport adds a couple of improvements to them
jaruga has quit [Quit: jaruga]
Guest80072 is now known as ndrst
jrafanie has joined #ruby
<chilversc>
jhass: does the standard datetime class handle timezones though? so if I ask for local date/time 1am on October 30th in Europe/London it would come back as ambiguous so I can then resolve which 1am it is
<chilversc>
so the user input would be of type local date time, and that needs resolving to a zoned date time
The_Phoenix has joined #ruby
The_Phoenix has quit [Changing host]
The_Phoenix has joined #ruby
craigp_ has quit [Ping timeout: 258 seconds]
machinewar has joined #ruby
<jhass>
why would it be ambiguous?
<machinewar>
anyone have tips on writing large xml files?
Torrone has joined #ruby
<machinewar>
nokogiri seems to hold everything in memory before writing
<chilversc>
jhass: because that date has 1am twice due to the clocks going back
<chilversc>
jhass: so you have 1am+1 and 1am+0
<Bish>
how do you guys solve the problem, when having a rest-api, when you send a list of resources, how do you tell the client-side how many ar ethere?
axl_ has joined #ruby
<chilversc>
jhass: if the user enters a date of 2016-10-30 01:00, it could be either
<jhass>
why?
nankyokusei has joined #ruby
<chilversc>
jhass: equally if the time 2017-03-26 01:30 doesn't exist, so if the user enters that as a time it would need changing
<jhass>
mh
<jhass>
idk I never tried
<jhass>
try?
<chilversc>
jhass: because the clocks go back an hour, you get 1:59 -> 1am
<chilversc>
jhass: and on the other date you get 0:59 -> 2am
synthroid has quit [Remote host closed the connection]
cdg_ has joined #ruby
l4v2 has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
playfullyExist has quit [Quit: irc]
jgt has quit [Ping timeout: 265 seconds]
nikivi has joined #ruby
AnFin has left #ruby [#ruby]
karapetyan has joined #ruby
<chilversc>
jhass: yeah, date/time, timezones and dst are a pain, hence why I was hoping for a gem that handles all that
GinoMan2440 has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
<chilversc>
the concept being user input is LocalDate and LocalTime, add them together you get a LocalDateTime, then your resolve that to get a ZonedDateTime, that you can convert to UTC and save to the DB (as well as storing the original timezone and offset)
synthroid has joined #ruby
cdg_ has quit [Ping timeout: 264 seconds]
sepp2k has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
karapetyan has quit [Ping timeout: 276 seconds]
tvon has joined #ruby
nikivi has quit [Quit: irc]
nikivi has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
yardenbar has quit [Ping timeout: 265 seconds]
rohit has joined #ruby
beilabs has joined #ruby
ChiefAlexander has joined #ruby
Vingador has joined #ruby
tulak has quit [Remote host closed the connection]
<machinewar>
anyone know what ObjectSpace memsize_of returns? it says consuming memory size of obj. Is this in bytes?
<machinewar>
hm probably not because there is also byte_size
tulak has joined #ruby
rohit has quit [Quit: Leaving]
<theRoUS>
is there already a best-practice class or mechanism for turning a deep structure of Array/Hash/scalar into a javascript-like dot-notation structure?
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
hahuang61 has joined #ruby
csk has joined #ruby
<gregf_>
theRoUS: json?
<machinewar>
theRoUS: if using rails could use HashWithIndifferentAccess
Torrone has quit [Quit: This computer has gone to sleep]
<apeiros>
machinewar: ObjectSpace.byte_size? that wouldn't be a standard ruby method, would it? at least I don't have that in 2.3.1
tyang has quit [Ping timeout: 276 seconds]
<machinewar>
apeiros: you're correct. ObjectSpace.dump() returns a hash and one of the keys is byte_size and another is memsize
<machinewar>
and they're different
<machinewar>
so was curious was memsize could be
rohit has joined #ruby
tulak has quit [Ping timeout: 258 seconds]
phredus_ has joined #ruby
<apeiros>
funny, didn't know of dump. interesting that it returns json.
hahuang61 has quit [Ping timeout: 250 seconds]
<theRoUS>
machinewar, gregf_: not exactly, i'm looking for dot-notation traversal
tulak has joined #ruby
<dangerousdave>
Hi, I want to compare two strings to check their equivalence, however I want to ignore case, and to ignore any changes to any numbers. What string method should I use please?
<apeiros>
I don't have a byte_size in my ObjectSpace.dump either, though
<apeiros>
dangerousdave: downcase, gsub and ==
<apeiros>
dangerousdave: if you need more than a-z (e.g. äöü), then additionally a gem which can properly map the case of unicode chars (ruby doesn't)
<dangerousdave>
apeiros, so use gsub to remove numbers before comparrison?
<apeiros>
theRoUS: I think there's a gem "hashie" or "mash" or somesuch which does that
<apeiros>
dangerousdave: yes
<machinewar>
apeiros: I'm on 2.3.1
<apeiros>
machinewar: me too
<dangerousdave>
apeiros thanks!
<machinewar>
ah interesting
<machinewar>
no idea why not
rohit has quit [Client Quit]
<apeiros>
machinewar: btw., note that the memsize is bytes, but only of the object itself, it doesn't recur into referenced objects.
etetz has joined #ruby
rohit has joined #ruby
SteenJobs has joined #ruby
<apeiros>
machinewar: well, does ObjectSpace.method(:dump).source_location return something else than nil for you?
<machinewar>
returns nil
blackmesa has joined #ruby
Pumukel has quit [Remote host closed the connection]
<apeiros>
hm, ok, so it's not overridden
<apeiros>
maybe it depends on what kind of object you dump
<apeiros>
that one has bytesize too. I think it's a property of string
<machinewar>
ah gotcha cool
<apeiros>
because I tried with a hash, and there I had a size property, which was the number of k/v pairs
waxxy has joined #ruby
<machinewar>
ah that's cool
tyang has joined #ruby
failshell has joined #ruby
submitnine has quit []
jaruga___ has joined #ruby
rohit has quit [Quit: Leaving]
jaruga___ is now known as jaruga
<machinewar>
apeiros: so if I wanted to measure the size of an xml builder object to see how much memory its taken would this be a good way to go about that
beilabs has quit [Read error: Connection reset by peer]
agent_white has quit [Quit: leaving]
iLogic has quit [Ping timeout: 265 seconds]
agent_white has joined #ruby
beilabs has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
<apeiros>
"this"? .dump you mean? probably not.
<apeiros>
memsize_of + recurring yourself would be.
fredlinhares1 has joined #ruby
<bhaak>
yeah, bytesize is a method of String. just try "ä".bytesize vs "ä".encode("iso-8859-1").bytesize
<machinewar>
this might be too specific but what about a Nokogiri::Builder object I don't think it responds to bytesize
<apeiros>
hm, weird, I thought I had done that once. but can't find my code.
colegatron has joined #ruby
<machinewar>
possibly it does. will let you guys know what I find out
<apeiros>
bhaak: I think more important is "ä".bytesize vs. "ä".size
<bhaak>
depends on what you want. bytesize gives you the number of bytes this string uses in its encoding in memory (not the memory this string object uses)
fredlinhares1 has quit [Client Quit]
<apeiros>
machinewar: no, you write ObjectSpace.memsize_of(builder) + recursive_memsize_of(builder) - where recursive_memsize_of is a method you have to define yourself, which would go through all instance variables, values, key value pairs etc.
<ytti>
that is apeiros point, that the example on same object better explains the difference
fredlinhares1 has joined #ruby
<machinewar>
ah makes sense
<ytti>
you're both talking about same thing, but in differnet way, and for my logic also apeiro's example is more descriptive
<ytti>
your example depends viewer to know how iso-8859-1 odes ä
<ytti>
apeiros example requires less implied knowledge
haxrbyte has quit [Read error: Connection reset by peer]
<bhaak>
but it's something completely different from what machinewar wants. that's what I was trying to say
haxrbyte has joined #ruby
nando293921 has joined #ruby
etehtsea has joined #ruby
<bhaak>
the documentaion of memsize_of also states that it should only be taken as a hint
_kfpratt has quit []
the_rhizo2 has quit [Ping timeout: 244 seconds]
<bhaak>
as t_data objects are not counted. and if you're using frozen strings, it gets even more complicated
eGGshke has joined #ruby
<chilversc>
ok, timezone info is just plain weird, from the example: puts tz.local_to_utc(Time.utc(2005, 8, 29, 11, 35)), makes no sense, that time is already in UTC
skade has quit [Quit: Computer has gone to sleep.]
jaruga has quit [Quit: jaruga]
da3mon has quit [Quit: Zzzz...]
<chilversc>
so, if you keep running a datetime through that method it will keep subtracting an hour, even more so, tz.now gives me the current 15:47, yet claims it's UTC (I'm currently at +1 hour)
<Hates_>
Does anyone here remember that funny Ruby video with the "save me ruby jesus" bit? I can't find it anymore
<Hates_>
I thought it was by _why but maybe not
harfangk_ has joined #ruby
Antiarc has quit [Ping timeout: 276 seconds]
da3mon has joined #ruby
<Hates_>
oh found them, nvm :)
Vingador has quit [Remote host closed the connection]
<chilversc>
oh great, so tz.utc_to_local results in a datetime that claims the offset is UTC
harfangk has quit [Ping timeout: 265 seconds]
kossae has quit [Ping timeout: 265 seconds]
SilverKey has joined #ruby
tjohnson has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
Pupp3tm4st3r has quit [Remote host closed the connection]
[Butch] has joined #ruby
bluOxigen has joined #ruby
fodro has joined #ruby
pawnbox has quit [Ping timeout: 258 seconds]
ebbflowgo has joined #ruby
dr0lan has quit [Read error: Connection reset by peer]
Guest20032 is now known as saneax_AFK
SteenJobs has quit [Quit: SteenJobs]
fodro has left #ruby [#ruby]
pawnbox has joined #ruby
bluOxigen has quit [Remote host closed the connection]
kristofferR has joined #ruby
antgel has quit [Ping timeout: 276 seconds]
aufi has quit [Ping timeout: 244 seconds]
axsuul has joined #ruby
cd-rum_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eGGshke has quit [Quit: Leaving...]
Vingador has joined #ruby
synthroid has quit [Remote host closed the connection]
klautcomputing has quit [Ping timeout: 265 seconds]
bensarz has joined #ruby
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
with the right number of arguments for your parent method?
bluOxigen has joined #ruby
nikivi has joined #ruby
<bio_grin>
hmm
<apeiros>
then you should make something work correctly!
<bio_grin>
main has 3
<bio_grin>
and this should have 4
<apeiros>
maybe by changing a bit of the code.
<ljarvis>
wise words from apeiros
<bhaak>
bio_grin: you're calling super the wrong way
<ljarvis>
the way you're calling it isn't super
<bio_grin>
ok
<bio_grin>
what is the right method?
the_rhizo2 has joined #ruby
zacts has quit [Ping timeout: 250 seconds]
klautcomputing has joined #ruby
<bhaak>
bio_grin: super(firstName, lastName, id)
<jhass>
call it with the right number of arguments
jaruga___ has joined #ruby
<bio_grin>
ah
jaruga___ is now known as jaruga
giz|work has joined #ruby
omphe has joined #ruby
s2013 has joined #ruby
axisys has joined #ruby
jaruga has quit [Client Quit]
<SteenJobs>
has anyone here ever used Shoes or any other lightweight gui wrapper to package up a script for a non-tech person?
existensil has quit [Quit: WeeChat 0.4.2]
nikivi has quit [Client Quit]
<bio_grin>
ah thank you
<bio_grin>
one more question
<bio_grin>
when i was to use it in another functuion in class
<bio_grin>
i use it like fun(@id) or fun(id)
<apeiros>
function -> method
mim1k has joined #ruby
existensil has joined #ruby
<jhass>
that depends on whether you want to pass it the result of @id or id
<bio_grin>
@id is class var
the_rhizo2 has quit [Ping timeout: 264 seconds]
<jhass>
instance variable is what we call it
<apeiros>
@@id would be a class variable
<jhass>
but forget they exist for now
LoneHerm_ has joined #ruby
aupadhye has quit [Quit: Leaving]
jaruga___ has joined #ruby
<bio_grin>
ok
<bio_grin>
i got @scores
craigp_ has joined #ruby
<bio_grin>
it is an array with two vallues
jaruga___ is now known as jaruga
mim1k_ has quit [Ping timeout: 250 seconds]
<bio_grin>
can i just do @scores.each do |x|
<bio_grin>
fin += x
<ljarvis>
try it
<bio_grin>
it seems not to be working
<bio_grin>
:)
<apeiros>
?dontwork bio_grin
<ruby[bot]>
bio_grin: we charge $120/h to figure out what you mean by "does not work". alternatively you can give us a proper explanation of what you expected to happen, and what happened instead, including the full exception if one occurred.
lightstalker has quit [Quit: ZNC 1.6.3 - http://znc.in]
johnny56 has joined #ruby
<bio_grin>
nil to strig
<bio_grin>
hmm
<bio_grin>
string
<apeiros>
"full exception"
lightstalker has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
bluOxigen has joined #ruby
<apeiros>
bio_grin: we gladly help you. but "doesn't work" means we have to (unnecessarily) riddle. help us to help you and provide proper info.
kossae has joined #ruby
<bio_grin>
ok
<bio_grin>
how do i get values from @scores
<bio_grin>
each do is showing errors
<apeiros>
again: full exception. "showing errors" does not cut it.
<apeiros>
copy & paste it from your terminal.
<bio_grin>
sec
omphe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
there's a vast amount of options to access the data within an array, the best depends on the purpose
mim1k has quit [Ping timeout: 240 seconds]
<apeiros>
bio_grin: best you gist the exception along with your current code
<apeiros>
note that you can put multiple files in a single gist
<ljarvis>
this would be much easier if you actually had a code snippet that others could run
<SteenJobs>
but seriously - buitl this web scraper for a client but he doesn’t know how to run it in terminal and refuses to learn, so i need to wrap it in a friendly GUI. *cries*.
<ljarvis>
SteenJobs: it'll be easier to show them how to run it
<SteenJobs>
ljarvis: tell me about it! but he’s like no, need a user friendly interface. running things without a GUI from terminal just seems to scare people that aren’t familiar with it
<SteenJobs>
ljarvis: and i’m just thinking like you type the filename and hit enter…there’s not much to it
<ljarvis>
yeah you're gonna have a really hard job, then
<Papierkorb>
SteenJobs: Have them double click it then (or w/e the platform uses)?
<bio_grin>
it prints [100, 80]
<bio_grin>
but cant print @scores[0]
<SteenJobs>
Papierkorb: yo :)
<SteenJobs>
always coming to the rescue haha
<SteenJobs>
Papierkorb: so Shoes has this packaging utility for mac os apps, but obviously it doesn’t work, so i’m back to square one - even if i make it an executable that he can just double click, how would i make sure all gems and dependencies are installed?
<mikecmpbll>
ruby packaging stuff is notoriously difficult, i'm not surprised it doesn't work
<Papierkorb>
SteenJobs: Either have a install.sh which installs those, or if they don't grasp the concept of "click that only once", hack it into your ruby program
bmurt_ has joined #ruby
<SteenJobs>
mikecmpbll: yea was at it all night. just installing my gems in the project directory and getting require to work was a nightmare
<Papierkorb>
SteenJobs: Or if you're using bundler (Why aren't you?), just ship the vendor/ directory with your distribution...
<Papierkorb>
SteenJobs: Then you're doing something wrong, it shouldn't be hard. Bundler can do all of that, and if you don't like writing "bundle exec", you can embed the necessary Bundler call
amclain has joined #ruby
ferr has quit [Quit: WeeChat 1.5]
<SteenJobs>
Papierkorb: ahh so i tried bundle install into vendor, and require wasn’t working. ok will try again if that should be working
beilabs has quit [Remote host closed the connection]
<Papierkorb>
SteenJobs: well of course, you have to fix up the search paths. As in: You don't, use Bundler to do that for you
<SteenJobs>
heh ok cool - to the bundler docs
<mikecmpbll>
when you bundle package does it automatically set BUNDLE_PATH in the .bundle/config?
<SteenJobs>
Papierkorb: originally i was thinking having the bash script to check if the gem exists and then install if not
<mikecmpbll>
i assume so.
<SteenJobs>
lemme do it again now. bbak in a sec
<mikecmpbll>
btw, i assume we're talking very simplistic distribution to known systems
<mikecmpbll>
because otherwise you'll have ruby version problems, platform specific gem issues
<SteenJobs>
gems needed are: nokogiri, shoes (just so the user can input the url and #of rows to be scraped), and Capybara/poltergeist/phantomJS, and this literally just needs to run on a mac and execute the scraper script
AzureStigma has joined #ruby
youch has joined #ruby
<Papierkorb>
tbh, I'd ship the whole environment, be it MRI or JRuby
skade has quit [Quit: Computer has gone to sleep.]
<SteenJobs>
was a huge pain to build, need to be done with this - turned out to be a single page app with lazy loading, so scraping different pages required inspecting network traffic with capybara/poltergeist to dynamically fetch the ajax urls being called
<Papierkorb>
Shoes? So JRuby. Never did it, but can't you bundle the gems and your app into a big standalone JAR ready to ship? #jruby is pretty active btw
<SteenJobs>
Papierkorb: oh? i didn’t even know you can ship the whole environment - also bec shoes requires jruby. literally never done this before.
johnny56 has quit [Ping timeout: 264 seconds]
<SteenJobs>
Papierkorb: i tried using shoes to package into a standalone JAR to no avail
<Papierkorb>
Ask in #JRuby
<SteenJobs>
amazing. thanks.
<SteenJobs>
i’ll keep you updated, unless your presence is there too haha
machinewar has quit [Remote host closed the connection]
<mikecmpbll>
oh, nokogiri, so C extensions
<mikecmpbll>
have fun with that.
<Papierkorb>
nokogiri-java to the rescue
<SteenJobs>
mikecmpbll: you almost made me cry
<SteenJobs>
haha
<SteenJobs>
also browser.driver.network_traffic is the best capybara/poltergeist method evaaa
aegis3121 has quit [Ping timeout: 250 seconds]
mrgrieves has quit [Ping timeout: 240 seconds]
mustmodify has joined #ruby
johnny56 has joined #ruby
Pumukel has joined #ruby
<mustmodify>
I'm having an issue where upstart's environment confuses bundler. Bundler is there but doesn't know about gems that are installed and working from an interactive shell.
Pumukel has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
joonty has quit [Quit: This computer has gone to sleep]
phredus_ has quit [Remote host closed the connection]
failshell has joined #ruby
hk238 has joined #ruby
<mustmodify>
I'm wondering if anyone has any experience with this kind of issue.
<Papierkorb>
mustmodify: My guess is it's an issue with env vars.
vuoto has quit [Remote host closed the connection]
TPug has joined #ruby
<Papierkorb>
mustmodify: Add `export > /tmp/puma.env` as command before the puma-init call in your upstart unit, run it, and then compare /tmp/puma.env to the output of `export` in your interactive shell
ebbflowgo has quit [Quit: ebbflowgo]
fredlinhares1 has quit [Quit: WeeChat 1.0.1]
Pumukel has joined #ruby
<Papierkorb>
mustmodify: also, make sure that bundler is installed for the user the service as.
mark_66 has quit [Quit: Leaving.]
vuoto has joined #ruby
the_rhizo2 has joined #ruby
minotep has joined #ruby
nitric has joined #ruby
nikivi has joined #ruby
failshell has quit [Ping timeout: 276 seconds]
<mustmodify>
Papierkorb: I knew it was an environment issue but hadn't thought of finding a way to compare them because apparently I'm stupid.
<bio_grin>
how do i split every character in string
<bio_grin>
.split(/\./)
<bio_grin>
?
<matthewd>
bio_grin: .chars ?
<havenwood>
+1 chars
disconnekted has quit [Remote host closed the connection]
<bio_grin>
:)
<bio_grin>
even better
smathy has joined #ruby
AzureStigma has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<havenwood>
mustmodify: can you move the contents of `project-http` to be inline with where you're calling it in `project.conf` and confirm it still doesn't work?
<foxxx0>
eventually you end up asking the documentation anyway
<foxxx0>
for binary digits that default "reversed" representation is wonderful
<havenwood>
123.digits(100) #=> [23, 1]
<apeiros>
hm, nice, makes base transformations easier to implement.
rcvalle has joined #ruby
MrBusiness2 has quit [Ping timeout: 250 seconds]
<bio_grin>
does anyone know how do i find indexes in 2d array
<toretore>
there is no such thing as a 2d array
<bio_grin>
any function like .index.index
<bio_grin>
lol
<toretore>
?code bio_grin
<ruby[bot]>
bio_grin: We can't help you without your code, please post it to https://gist.github.com
<bio_grin>
x = [[1, 2, 3], [3, 5 ,6]]
<bio_grin>
?
<bio_grin>
how do i find indexes of 5 for example
<toretore>
what do you need this for?
SCHAAP137 has quit [Quit: Leaving]
<bio_grin>
building a bot
<Mon_Ouie>
What is the index of five in that example?
<bio_grin>
[1][1]
<Mon_Ouie>
Okay, what about 6?
<bio_grin>
[1][2]
<toretore>
what about 3?
<bio_grin>
[0][2]
<bio_grin>
:)
<toretore>
there are two 3s
Derperperd has joined #ruby
<toretore>
as i wrote, you must explain what it is you're doing exactly
the_rhizo2 has joined #ruby
houhoulis has quit [Remote host closed the connection]
<matthewd>
bio_grin: That sounds like a lot of primitives. Maybe your problem would work better with some objects & classes.
<bio_grin>
i want to find the element location in that array
<bio_grin>
only that
<bio_grin>
hmm
<toretore>
no, that is what you think the solution should be
<toretore>
it's not the problem you're solving
symm- has quit [Quit: Leaving...]
SilverKey has quit [Read error: Connection reset by peer]
SilverKe_ has joined #ruby
<matthewd>
?xy
<ruby[bot]>
it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<matthewd>
bio_grin: The straight answer to your question is: no, there is not such a method.. though it wouldn't be hard to write
<bio_grin>
that is the challenge
aries_liuxueyang has quit [Quit: No Ping reply in 180 seconds.]
<bio_grin>
hmm
<bio_grin>
how do i find m and p location on that grid?
aegis3121 has quit [Ping timeout: 240 seconds]
<bio_grin>
if you got better suggestions :P
mikecmpbll has joined #ruby
leitz has quit [Quit: Nappy time]
rodfersou is now known as rodfersou|afk
<matthewd>
Yeah, the direct approach seems like the way to go here... how about: col_index = nil; row_index = rows.index {|row| col_index = row.index('m') }
<bio_grin>
im doing it
<matthewd>
If you were doing anything further, I'd look at having a proper Grid class; but for a one-off single question, hacky is fine
aryaching has joined #ruby
ChiefAlexander has joined #ruby
<bio_grin>
ok
<bio_grin>
2 while loops?
joonty has joined #ruby
<matthewd>
That should work too, if you don't like the above
Didac has quit [Quit: im ded]
<bio_grin>
im reading it
<bio_grin>
i hardly catch other peoples concepts
johnmilton has joined #ruby
<toretore>
just keep track of the row and column index as you go through the grid and when you find the match, break and record the matching path
Torrone has quit [Quit: This computer has gone to sleep]
<bio_grin>
yeah
<bio_grin>
doing it
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joonty has quit [Client Quit]
Didac has joined #ruby
Didac has quit [Max SendQ exceeded]
pawnbox has quit [Remote host closed the connection]
houhoulis has joined #ruby
houhoulis has quit [Remote host closed the connection]
kavanagh has quit [Remote host closed the connection]
kavanagh has joined #ruby
whathappens has quit [Remote host closed the connection]
Vingador has quit [Remote host closed the connection]
dionysus69 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
DanyC has joined #ruby
reisei has quit [Quit: leaving]
<bio_grin>
cya later
bio_grin has left #ruby [#ruby]
TPug has joined #ruby
tvon has quit [Quit: System is sleeping...]
Silox| has quit [Quit: Connection closed for inactivity]
devster31 has joined #ruby
devster31 has quit [Max SendQ exceeded]
devster31 has joined #ruby
devster31 has quit [Max SendQ exceeded]
sepp2k has quit [Read error: Connection reset by peer]
devster31 has joined #ruby
jackjackdripper has joined #ruby
karapetyan has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
symm- has joined #ruby
Oog has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
axsuul has joined #ruby
davidw_ is now known as davidw
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
giz|work has quit [Ping timeout: 276 seconds]
kavanagh has quit [Ping timeout: 258 seconds]
flashpoint9 has quit [Remote host closed the connection]
omerh has joined #ruby
kirun has joined #ruby
symm- has quit [Quit: Leaving...]
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tercenya has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
tercenya has quit [Client Quit]
govg has joined #ruby
flashpoint9 has joined #ruby
giz|work has joined #ruby
pmyjavec has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pmyjavec has joined #ruby
DanyC has quit []
DanyC has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
LoneHermit has joined #ruby
aryaching has joined #ruby
DanyC has quit [Client Quit]
bfrizzle has quit [Ping timeout: 240 seconds]
DanyC has joined #ruby
the_rhizo2 has quit [Ping timeout: 264 seconds]
nitric has quit [Ping timeout: 240 seconds]
omerh has quit [Remote host closed the connection]
bfrizzle has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
DanyC has quit [Remote host closed the connection]
Oog has quit []
jackjackdripper1 has joined #ruby
symm- has joined #ruby
jackjackdripper has quit [Ping timeout: 276 seconds]
LoneHermit has quit [Ping timeout: 258 seconds]
postmodern has joined #ruby
yardenbar has joined #ruby
zacts has joined #ruby
piling has joined #ruby
piling has left #ruby [#ruby]
axsuul has quit [Ping timeout: 276 seconds]
<zacts>
hi rubyists
tvon has joined #ruby
rodfersou|afk is now known as rodfersou
<pizzaops>
hi zacts
slackbotgz has joined #ruby
stamina has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Psi-Jack has quit [Quit: Where'd my terminal go?]
djbkd has quit [Remote host closed the connection]
tvon has quit [Quit: System is sleeping...]
djbkd has joined #ruby
Psi-Jack has joined #ruby
tvon has joined #ruby
diego2 has joined #ruby
matty_matt_ has joined #ruby
rileyy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
conta has quit [Ping timeout: 240 seconds]
djbkd has quit [Ping timeout: 244 seconds]
hutch34 has joined #ruby
diego2 is now known as diegoviola
Dimik has joined #ruby
nikivi has quit [Quit: irc]
yardenbar has quit [Ping timeout: 250 seconds]
DanyC has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eljimmy has joined #ruby
<LurkAshFlake>
hi.
last_staff has quit [Quit: last_staff]
<LurkAshFlake>
So my crawler extract data but the problem is that it only get the proper data 2 time on every 3 load because the page is dynamic. Everytime it gather properly the string/data start with "http". How do I loop the function no matter what exception is trown? Can I do a try catch that catch the data[0..4] != "http"?
loechel has joined #ruby
giz|work has quit [Ping timeout: 244 seconds]
seanjohnson has joined #ruby
last_staff has joined #ruby
whathappens has joined #ruby
vuoto_ has joined #ruby
<seanjohnson>
once you downloaded ruby how do you know what the correct version of ruby to use is?
<seanjohnson>
i just learned ruby but there are so many different versions
<seanjohnson>
i just learned ruby and rvm has lots of versions
Rodya_ has quit [Remote host closed the connection]
<LurkAshFlake>
good job learning it, I thought it took decade to learn a language.
ddffg has joined #ruby
klautcomputing has quit [Ping timeout: 264 seconds]
<seanjohnson>
if it takes you a decade to learn a language you're doing it wrong
<mikecmpbll>
seanjohnson : use the latest?
<seanjohnson>
why use the latest?
last_staff has quit [Client Quit]
blackgoat has joined #ruby
<mikecmpbll>
because .. it's got the most recent updates ..
<mikecmpbll>
people don't make things worst, typically.
<mikecmpbll>
worse*
loechel has quit [Ping timeout: 260 seconds]
klautcomputing has joined #ruby
AlexRussia has quit [Ping timeout: 250 seconds]
kavanagh has joined #ruby
tercenya has joined #ruby
peteykun has joined #ruby
aegis3121 has joined #ruby
[narcan] has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Spami has joined #ruby
banisterfiend has joined #ruby
seanjohnson has quit [Ping timeout: 264 seconds]
karapetyan has quit [Remote host closed the connection]
banisterfiend has quit [Max SendQ exceeded]
last_staff has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
djbkd has joined #ruby
slackbotgz has quit [Remote host closed the connection]
Derperperd has quit [Quit: Derperperd]
Derperperd has joined #ruby
last_staff has quit [Remote host closed the connection]
AlexRussia has joined #ruby
nankyokusei has joined #ruby
zacts has quit [Quit: WeeChat 1.4]
last_staff has joined #ruby
karapetyan has joined #ruby
evoltech has joined #ruby
BTRE has quit [Quit: Leaving]
tvon has quit [Quit: System is sleeping...]
miqlas-H has quit [Ping timeout: 258 seconds]
BTRE has joined #ruby
<evoltech>
hello all. I am a novice ruby user, and I am trying to use minitest/spec along with mechanize to unit test a web service (http://pastebin.com/VziPCBEg).
<ruby[bot]>
evoltech: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
nankyokusei has quit [Ping timeout: 265 seconds]
<evoltech>
I am a bit confused about how to deal with global variables using what appears to be some overrideen classs syntax from minitest/spec
ferr has joined #ruby
<evoltech>
I keep getting warning messages, which interrupt the unit test output that read, "class variable access from toplevel" when ever I refer to @@lists
<evoltech>
My goal is to correcly use this variable and not get the warnings. Can anyone advise?
loechel has joined #ruby
karapetyan has quit [Remote host closed the connection]
workmad3 has joined #ruby
goose_ has joined #ruby
goose_ has quit [Client Quit]
giz|work has joined #ruby
OTORelic2 has quit [Ping timeout: 252 seconds]
ixti has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
matty_matt_ has quit [Ping timeout: 244 seconds]
LoneHermit has joined #ruby
<adaedra>
@@ variables are not globals
nofxx has joined #ruby
<adaedra>
ew tabs
nb_bez___ has joined #ruby
tulak has joined #ruby
slappy16 has joined #ruby
Mon_Ouie has joined #ruby
peteykun has quit [Ping timeout: 250 seconds]
tyang has quit [Ping timeout: 244 seconds]
marr has joined #ruby
tomphp has joined #ruby
matty_matt has joined #ruby
LoneHermit has quit [Ping timeout: 258 seconds]
blaxter has joined #ruby
whathappens has quit [Remote host closed the connection]
flashpoint9 has quit [Remote host closed the connection]
whathappens has joined #ruby
tulak has quit [Ping timeout: 240 seconds]
nando293921 has quit [Ping timeout: 265 seconds]
pmyjavec has quit [Read error: Connection reset by peer]
anisha has quit [Quit: This computer has gone to sleep]
hahuang61 has joined #ruby
aamer has joined #ruby
malconis_ has joined #ruby
aamer has left #ruby [#ruby]
Kyhz has quit [Ping timeout: 264 seconds]
<adaedra>
you may be looking for something like let() to define a common data for all tests
ChiefAlexander has quit [Remote host closed the connection]
malconis_ has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 250 seconds]
malconis has joined #ruby
torandu has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
perlgod has quit [Ping timeout: 244 seconds]
tvon has joined #ruby
peteykun has joined #ruby
<ferr>
Hey
jackjackdripper has joined #ruby
<ferr>
I need to create a secure hash or something like this, it will be sent as unsubscribe token from which I could identify the user, what shall I use?
jackjackdripper1 has quit [Ping timeout: 250 seconds]
<toretore>
an unguessable unique token to identify the user
<mikecmpbll>
meh. it works. what's the downside of producing that token from existing information though
<matthewd>
How is hash(email + secret) not also an unguessable unique token to identify the user?
<mikecmpbll>
^
<toretore>
it doesn't work any more if the base data changes?
abbaamer has joined #ruby
<toretore>
it depends on the use case
abbaamer has quit [Client Quit]
<mikecmpbll>
the use case was made explicit.
<mikecmpbll>
[21:43:19] <ferr>I need to create a secure hash or something like this, it will be sent as unsubscribe token from which I could identify the user, what shall I use?
<toretore>
right. so, (email, secret); secret changes, token doesn't work any more
<mikecmpbll>
why'd the secret change?
<apeiros>
secret = password, see backlog
<toretore>
again, depends on the context. the proposed solution used the password, which is not static
<matthewd>
"my hash password" is a static secret
<apeiros>
but IMO changing token isn't an issue. I'd probably expire the random token too.
last_staff has quit [Quit: last_staff]
<matthewd>
Note the word order
<mikecmpbll>
yeah, he didn't mean the user's password.
<ferr>
It's not the users password
<ferr>
It's anything
<ferr>
I just called it a hash's password
SteenJobs has quit [Quit: SteenJobs]
last_staff has joined #ruby
<toretore>
email is still not static, and an old hash from an old email will not identify the user
<apeiros>
that… makes no sense. like literally.
ramfjord has quit [Ping timeout: 244 seconds]
karapetyan has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto_ has quit [Remote host closed the connection]
<matthewd>
Why should an unsubscribe link still work if it was sent to a different email address?
<toretore>
1) user signs up, 2) user receives email, 3) user changes email address, 4) user clicks link in old email
<toretore>
why shouldn't it?
<apeiros>
anyway, random token = less likely to fuck up. but I don't know how bad the worst case scenario of an adversarial user unsubscribing random users is valued.
ramfjord has joined #ruby
<mikecmpbll>
rgiscard has quit [Quit: Cheers]
<apeiros>
so - do whatever? :)
<toretore>
there is no reason that it shouldn't. admittedly a contrived case
machinewar has joined #ruby
<apeiros>
you asked, you got answers. use them or do whatever you planned anyway.
<toretore>
but these edge cases cause problems more often than you'd think
<ferr>
thanks
icey is now known as icey|vacation
<mikecmpbll>
if you click unsubscribe from an email to foo@bar.org, i actually think it's more appropriate that you're attempting to unsubscribe email foo@bar.org :p
karapetyan has quit [Remote host closed the connection]
<drbrain>
LurkAshFlake: upload it using what protocol?
ta_ has joined #ruby
nb_bez___ has quit [Quit: Connection closed for inactivity]
roflmyeggo has quit [Ping timeout: 258 seconds]
malconis has quit [Ping timeout: 258 seconds]
flashpoint9 has joined #ruby
soulisson_ has quit [Ping timeout: 265 seconds]
skweek has quit [Ping timeout: 250 seconds]
skade has quit [Quit: Computer has gone to sleep.]
roflmyeggo has joined #ruby
saneax_AFK is now known as saneax
karapetyan has quit [Remote host closed the connection]
skade has joined #ruby
saneax is now known as Guest91909
kossae has quit [Quit: WeeChat 1.5]
triangles has joined #ruby
kossae has joined #ruby
triangles has quit [Client Quit]
goleldar has joined #ruby
<goleldar>
anyone know if there is a way to copy an s3 object to a bucket using only the pre-signed url ? (trying to avoid having to have the server download it first)
<drbrain>
but I don't know if that answers your question or not because I don't S3 often
evoltech has quit [Ping timeout: 264 seconds]
whathappens has quit [Quit: Leaving...]
moei has quit [Quit: Leaving...]
<pizzaops>
Is there any difference between %w(foo bar), %w[foo bar], %w{foo bar}, etc.
<drbrain>
no
<pizzaops>
They seem to be interchangable. Is there one that's most commonly used?
<goleldar>
thanks @drbrain
<drbrain>
I like [] with %w because it double-reinforces that it is an Arary
solars has quit [Ping timeout: 265 seconds]
<baweaver>
I like () because it annoys drbrain
<pizzaops>
drbrain: agreed. RubyMine insists on () I'm afraid.
<drbrain>
%w() seems preferred by rubocop (which is wrong)
<pizzaops>
haha
<pizzaops>
It's "wrong"?
<pizzaops>
or it's not [] and you like []
<drbrain>
because I said so
<baweaver>
as only a turing complete concept can be
<drbrain>
getting out my soap-box, though, when you have a whole bunch of items in a %w array spanning multiple lines it's easier to tell what kind of thing it is from the bottom if you use ] to end arrays
bruce_lee has quit [Read error: Connection reset by peer]
<baweaver>
As a wise man once said: 'And thirdly, the code is more what you'd call "guidelines" than actual rules.'
kmossco has left #ruby [#ruby]
<drbrain>
especially so if the %w( is scrolled off the top of your screen
<baweaver>
to be fair, when it does that I question it being inline
<drbrain>
I use %w[] for array constants as well
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stuartrexking has joined #ruby
karapetyan has joined #ruby
etetz has quit [Remote host closed the connection]
<pizzaops>
drbrain: go on
etetz has joined #ruby
<drbrain>
pizzaops: I like that an ending ] means Array, but an ending ) could mean a lot of things, so I have to scroll up further to remember
<drbrain>
this might waste my time
<pizzaops>
but what do you mean by using it for array constants specifically
haxrbyte has quit [Quit: Leaving...]
<pizzaops>
I mean I know that Foo = %w[some stuff] is a constant, and I assume that's what you mean, but why for constants especially
<pizzaops>
and do you mean for arrays of strings only, i assume?
Ishido has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
the_rhizo2 has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
roflmyeggo has quit [Ping timeout: 252 seconds]
Guest91909 is now known as saneax_AFK
<pizzaops>
I opened a ticket with JetBrains to make this configurable. Their refactoring auto %w()s :*(
etetz has quit [Ping timeout: 250 seconds]
roflmyeggo has joined #ruby
dangerousdave has quit [Ping timeout: 276 seconds]
Rodya_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
JesseH has quit [Ping timeout: 276 seconds]
ramfjord_ has quit [Ping timeout: 258 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
GodFather has quit [Ping timeout: 244 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
SteenJobs has quit [Quit: SteenJobs]
jhack has quit [Quit: jhack]
Renich has joined #ruby
karapetyan has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
blaxter has quit [Quit: foo]
speakingcode has joined #ruby
The_Phoenix has joined #ruby
symm- has quit [Ping timeout: 265 seconds]
kossae has quit [Ping timeout: 258 seconds]
soulisson has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
Neobenedict has joined #ruby
Neobenedict has quit [Changing host]
Neobenedict has joined #ruby
flashpoint9 has joined #ruby
Neoo has quit [Ping timeout: 260 seconds]
The_Phoenix has quit [Ping timeout: 258 seconds]
sumobob has quit [Ping timeout: 250 seconds]
Bounga has quit [Ping timeout: 264 seconds]
flashpoint9 has quit [Ping timeout: 250 seconds]
Bounga has joined #ruby
maloik has joined #ruby
leea has joined #ruby
Spami has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
soulisson has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
davidw has joined #ruby
soulisson has joined #ruby
bjh13 has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
Bounga has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
ramfjord has joined #ruby
SteenJobs has joined #ruby
<agent_white>
!doesntwork
<agent_white>
Where's that factoid
LuckyABA has joined #ruby
lipoqil_ has joined #ruby
toretore has quit [Ping timeout: 258 seconds]
xaviergmail has joined #ruby
<xaviergmail>
In a module, why can't I do def @name instead of def self.name
<matthewd>
xaviergmail: Because that's.. not a thing?
<xaviergmail>
oh
<xaviergmail>
I was under the impression @ was a substitute for self.
lipoqil has quit [Ping timeout: 250 seconds]
lipoqil_ is now known as lipoqil
beilabs has joined #ruby
<xaviergmail>
Kind of like it is in coffeescript
<matthewd>
Nope; @foo and self.foo are entirely separate things (one's a variable and one's a method, for a start)
soulisson has quit [Quit: Quitte]
<xaviergmail>
hmm
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
flashpoint9 has joined #ruby
manveru_ has joined #ruby
cstrahan_ has joined #ruby
<xaviergmail>
If I want to make a sort of utils class, am I on the right path by using a module and using `def self.method_name` to make static functions or should modules only be used for inheritance
goleldar has quit []
speakingcode has quit [Remote host closed the connection]
beilabs_ has quit [Ping timeout: 276 seconds]
cstrahan has quit [Ping timeout: 250 seconds]
manveru has quit [Ping timeout: 250 seconds]
cstrahan_ is now known as cstrahan
manveru_ is now known as manveru
the_rhizo2 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]