<bradland>
you're feeding it what you think is a regex, but String#count doesn't take a regex
sivsushruth has joined #ruby
einarj has joined #ruby
<bradland>
it has it's own funky pattern specification
<havenwood>
godd2: an "X" is between "?" and "m"
<godd2>
It changes against a source of lowercase x if I move the i, but it's 2 both times when the source is capital X
Timba-as has quit [Client Quit]
mloveless has joined #ruby
<bradland>
godd2: String#count is *not* treating your input as a regexp
<godd2>
I understand that it's not a regex, but it's also inconsistent against the source
<bradland>
nope
<godd2>
if moving the lowercase i changes the result for a source of lower case x, then why doesn't moving lowercase i change the result for a source of uppercase X
<bradland>
Each other_str parameter defines a set of characters to count. The intersection of these sets defines the characters to count in str. Any other_str that starts with a caret ^ is negated. The sequence c1-c2 means all characters between c1 and c2. The backslash character \ can be used to escape ^ or - and is otherwise ignored unless it appears at the end of a sequence or the end of a other_str.
<havenwood>
godd2: indeed
<bradland>
so you can specify simple ranges, but the string (?-mix:wtf) is not treated as a regexp, and none of those are treated as flags
<bradland>
they're all just characters, except for ?-m, which is treated as a range
<godd2>
bradland you dont have to keep repeating yourself. I understand that it's not treated as regex
<godd2>
however, it's treated as something
<shevy>
:D
<bradland>
just trying to help
<godd2>
becuase moving the letter i should change the result if those are all literal characters
<bradland>
you kept referring to them as flags
<godd2>
shouldn't change*
<bradland>
but they're not, because... not saying it :P
<shevy>
isn't it documented?
<godd2>
So let me ask this
<bradland>
i literally pasted the doc paragraph here
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
<godd2>
lol I have a ruby script thats been running for 24 hrs
<Nilium>
That sure is a small number.
_blizzy_ is now known as hunter2
hunter2 is now known as _blizzy_
dunpeal has left #ruby [#ruby]
tjbiddle has quit [Quit: tjbiddle]
zenspider has quit [Ping timeout: 246 seconds]
tjbiddle has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kblake has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
oo_ has quit [Remote host closed the connection]
havenn has joined #ruby
voronika has quit [Quit: leaving]
zenspider has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
_5kg has quit [Ping timeout: 246 seconds]
ghostpl_ has quit [Ping timeout: 252 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
vt102 has quit [Read error: Connection reset by peer]
DavidDudson has joined #ruby
oo_ has joined #ruby
boshhead has quit [Ping timeout: 272 seconds]
tkuchiki_ has joined #ruby
vdamewood has joined #ruby
maximski has joined #ruby
bruno- has joined #ruby
a5i has quit [Quit: Connection closed for inactivity]
oo_ has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 246 seconds]
<shevy>
depends on what it does
<shevy>
perhaps it calculates the world
<shevy>
godd2 what is that script doing?
<shevy>
I have recently written a small script that checks forum-activity on a remote site, to keep track and gain a dataset who are the most frequent visitors
djbkd has quit [Remote host closed the connection]
greenbagels has quit [Quit: Leaving]
djbkd has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
omosoj has joined #ruby
<omosoj>
would it be possible to write a program for my ubuntu box that monitors my mouse usage, and alerts me if i've been at the computer for x amount of time ('walk around for a few minutes')
braincrash has quit [Quit: bye bye]
<sevenseacat>
yes, or just download one.
tjbiddle has quit [Quit: tjbiddle]
<omosoj>
what would hte basic structure be? it'd be a background process that monitors the mouse movign process or something? would it be difficult to write?
dfinninger has quit [Ping timeout: 264 seconds]
skmp has joined #ruby
<omosoj>
it sounds like an interesting project. i wanna try if it's not too difficult
<sevenseacat>
no idea.
<sevenseacat>
i'd just use a prebuilt pomodoro app.
nii236 has quit [Ping timeout: 256 seconds]
<omosoj>
k ty
braincrash has joined #ruby
maximski has quit []
coderhs has joined #ruby
Rodya_ has quit [Quit: Leaving...]
<pontiki>
more like you should build a sensor into your chair than measures the weight on it
<pontiki>
for those times you fall asleep and don't move your mouse for an hour
withnale__ has joined #ruby
<omosoj>
yeah mouse movement isn't a perfect way to do it... mouse and keyboard would be nearly perfect for how i use my comp
<omosoj>
i see. so keep checking, and if there hasn't been a long pause in the last hour, create an alert
<havenn>
yeah, that should work
kp666 has joined #ruby
<omosoj>
thanks you -- great idea
kp666 has quit [Max SendQ exceeded]
kyb3r_ has joined #ruby
<omosoj>
any recommendations on how to approach the alerts?
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
<omosoj>
there's adefault ubuntu box at the top right like in chrome. i guess i should look for a library that handles it
<omosoj>
was looking at shoes.rb. looked cool
kp666 has joined #ruby
Jeff_D has joined #ruby
Hirzu has joined #ruby
dandaman has joined #ruby
wldcordeiro has quit [Ping timeout: 265 seconds]
freerobby has quit [Quit: Leaving.]
<Jeff_D>
Does anybody have any links to tuts/resources on how to publish Gems for multiple Rubies? I've a couple of Gems that I need both for MRI and JRuby; how can I use the same name/version number for both?
Volsus has joined #ruby
sivsushruth has quit [Ping timeout: 255 seconds]
bluOxigen has joined #ruby
sivsushruth has joined #ruby
<havenn>
omosoj: maybe even just: notify-send 'Go outside!' 'You've been at this a while...'
IrishGringo has quit [Ping timeout: 265 seconds]
<havenn>
sudo apt-get install notify-osd -y
Hirzu has quit [Ping timeout: 264 seconds]
<havenn>
notify-send -u critical 'Step away from the computer!' 'You haven't had a break in 12 hours...'
<omosoj>
havenn, cool. didn't know there were so many existing tools. also found zenity
blueOxigen has joined #ruby
_5kg has joined #ruby
commmmodo has quit [Quit: commmmodo]
<havenn>
ah, does that give a nice dialog box?
<omosoj>
a small window with an 'ok' button. dunno exactly what a dialog box is
maknz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<omosoj>
i like notify-send better though
<havenn>
just that
<havenn>
nice
sivsushruth has quit [Read error: Connection reset by peer]
bluOxigen has quit [Ping timeout: 244 seconds]
_5kg has quit [Ping timeout: 244 seconds]
sivsushruth has joined #ruby
ptrrr has joined #ruby
<havenn>
Jeff_D: You might want to also ask in #jruby.
dandaman has quit [Quit: Leaving.]
<Jeff_D>
@havenm Thanks
blahwoop has joined #ruby
omosoj has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 256 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
dopie has quit [Remote host closed the connection]
keen__________83 has joined #ruby
<shevy>
hehe
<shevy>
I have to leave soon
dopie has joined #ruby
<shevy>
but I have a class I want to rewrite
<shevy>
because it bothers me that I can not include it
<shevy>
because it's a class right now and not a module!
keen__________82 has quit [Ping timeout: 250 seconds]
<shevy>
soo I was thinking
<shevy>
what if a module has #new
Lingo has quit [Quit: (null)]
<shevy>
and I'd just delegate to the real class
<shevy>
so I could do both: Foo.new but also include Foo
TheNet has quit [Quit: Leaving...]
peterhu has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
vdamewood has quit [Quit: Computer has gone to sleep.]
sigurding has quit [Quit: sigurding]
billy_ran_away has joined #ruby
sigurding has joined #ruby
_5kg has quit [Ping timeout: 246 seconds]
hvxgr has quit [Ping timeout: 256 seconds]
jonr22 has joined #ruby
tagrudev has joined #ruby
Lingo has joined #ruby
<Lingo>
hi, i just need help seperating the first word of a string fromt he rest of the string
<Lingo>
for example, i need a solid way to make "2312323 is my number" into two strings, "2323232" and "is my number"
<Lingo>
only way I know how is looping until first space, but I feel ruby has a better solution in store
sivsushruth has quit [Read error: Connection reset by peer]
apeiros__ has joined #ruby
apeiros_ has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
last_staff has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
nii236 has joined #ruby
<atmosx>
Lingo: a solid way, would be to write a method.
lyuben_ has joined #ruby
<atmosx>
Lingo: the method wuld accept any text an as argument and split, it, get the first argument check if it's really a number or not and then return a result.
<certainty>
moin ruby adorers
<atmosx>
Lingo: I can think of ways to do it in one line, but nothing 'solid'. You could create something solid (but unreadable to me) using regexp if you really want too though.
<atmosx>
certainty: hello.
<atmosx>
s/too/to
krz has quit [Quit: WeeChat 1.0.1]
_5kg has joined #ruby
lemur has quit [Remote host closed the connection]
Rollabunna has joined #ruby
codecop has joined #ruby
User458764 has joined #ruby
apeiros__ has quit [Remote host closed the connection]
<flughafen>
morning certainty
tobago has joined #ruby
nicolastarzia has quit [Read error: Connection reset by peer]
nicolastarzia has joined #ruby
oo_ has joined #ruby
dfinninger has joined #ruby
ghostpl_ has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
dfinninger has quit [Ping timeout: 250 seconds]
Beoran_ has quit [Ping timeout: 272 seconds]
anarang has joined #ruby
kalusn has joined #ruby
roolo has joined #ruby
mloveless has joined #ruby
meschi has quit [Ping timeout: 252 seconds]
ypasmk has quit [Quit: ypasmk]
withnale__ has joined #ruby
hanmac1 has joined #ruby
hvxgr has joined #ruby
<certainty>
flughafen: o/
sinkensabe has joined #ruby
<flughafen>
certainty: i made 2 ruby commits this weekend, awww yeah
<certainty>
flughafen: you mean in ruby core?
<sevenseacat>
nice
<flughafen>
oh no
<flughafen>
i just mean in ruby
<sevenseacat>
not so nice
<certainty>
ah ok. still nice :)
<certainty>
sevenseacat: ;p
<flughafen>
yeah, i know. i'm a total loser!
<sevenseacat>
didnt say that
<flughafen>
i did
bal has joined #ruby
<certainty>
well i did no commit this weekend so you clearly win
* flughafen
is the champion!
mloveless has quit [Ping timeout: 246 seconds]
<sevenseacat>
you is winner
<certainty>
i've been out relaxing in the sun :)
<flughafen>
i spent some time in the sun too
withnale__ has quit [Ping timeout: 240 seconds]
Lingo has quit [Quit: (null)]
pretodor has joined #ruby
<flughafen>
14 degrees!
<sevenseacat>
i spent saturday teaching ruby and rails, and then sunday sleeping and recovering
aswen has joined #ruby
claw has quit [Ping timeout: 255 seconds]
<certainty>
flughafen: i can beat that. we had 16. At least that's what my car said
<flughafen>
sevenseacat: where do you teach?
<flughafen>
well you're the sun champion then
<sevenseacat>
i was mentoring at a rails girls meetup
lxsameer has joined #ruby
<sevenseacat>
explaining all of teh thingz
michael_mbp has quit [Excess Flood]
mloveless has joined #ruby
<flughafen>
that's a little weird for a sailing cat to be teaching programming
Beoran_ has joined #ruby
<sevenseacat>
i'm a weird kind of per... i mean cat.
krz has joined #ruby
fabrice31 has joined #ruby
<flughafen>
sevenseacat: what time zone are you in?
<sevenseacat>
UTC+8. western australia.
bluOxigen has joined #ruby
michael_mbp has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
<flughafen>
awesome
blueOxigen has quit [Ping timeout: 265 seconds]
mloveless has quit [Client Quit]
<sevenseacat>
is a balmy 32 degrees here right now, at 3.25pm on a monday afternoon
<flughafen>
certainty: go out to your car and tell us how hot it is now
michael_mbp has quit [Excess Flood]
sivsushruth has joined #ruby
<flughafen>
sevenseacat: did certainty tell you we're neighbors?
<sevenseacat>
i knew you were in the same part of the world
<certainty>
flughafen: it told me 4 degrees 30 minutes ago
apxm has joined #ruby
<flughafen>
neighbors seperated by 4 hours of autobahn
<sevenseacat>
nice
<flughafen>
certainty: check again, you're making us look bad in front of sevenseacat
<certainty>
well she's from australia. we can not beat that
wicope has joined #ruby
<sevenseacat>
the standing joke in western australia is that if you drive four hours out of perth, then you're just four hours away and have to turn around and drive back.
<agent_white>
And from the future. It's 1:27am here.
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<certainty>
agent_white: haha
michael_mbp has joined #ruby
<flughafen>
4 hours and 53 minutes
spicerack has joined #ruby
sivsushruth has quit [Read error: Connection reset by peer]
DerisiveLogic has quit [Ping timeout: 256 seconds]
<certainty>
time for ruby5
agent_white has quit [Read error: Connection reset by peer]
sivsushruth has joined #ruby
spicerack has quit [Changing host]
spicerack has joined #ruby
vdamewood has joined #ruby
<certainty>
regex DSL again
<certainty>
i don't see the point
riotjones has joined #ruby
psyprus has quit [Ping timeout: 245 seconds]
agent_white has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
agent_white has quit [Changing host]
agent_white has joined #ruby
xrlabs has quit [Ping timeout: 255 seconds]
sivsushruth has quit [Read error: Connection reset by peer]
<flughafen>
sevenseacat: are you at work?
<sevenseacat>
yep
<flughafen>
me too, what a coincidence
sivsushruth has joined #ruby
<agent_white>
A coincidence would be if we all had belly buttons.
<flughafen>
agent_white: are you a wizard?
riotjones has quit [Ping timeout: 272 seconds]
<certainty>
yepp. he once was agent_grey, but well you know what happens. now he's
xcombelle has joined #ruby
* agent_white
strokes his beard-of-divination
<agent_white>
certainty: Goddamn balrogs...
<certainty>
:)
rhg135 is now known as rhgzzz
<flughafen>
i named my new dog melkor
Bounga has joined #ruby
psyprus has joined #ruby
ghostpl_ has quit [Ping timeout: 265 seconds]
pretodor has quit [Quit: Ex-Chat]
xsdg has quit [Ping timeout: 246 seconds]
Volsus has quit [Quit: Leaving]
hfp has quit [Ping timeout: 244 seconds]
claw has joined #ruby
dandaman has quit [Quit: Leaving.]
<flughafen>
ahhhhhhhhhhhhh....
hfp_work has quit [Ping timeout: 246 seconds]
Takle has joined #ruby
dumdedum has joined #ruby
<certainty>
hmm?
xsdg has joined #ruby
ixti has quit [Ping timeout: 272 seconds]
michael_mbp has quit [Excess Flood]
teddyp1cker has joined #ruby
ta has quit [Remote host closed the connection]
michael_mbp has joined #ruby
<flughafen>
i was reading a file and trying to do a line comparison to another string, with == but it failed, but worked with include? which didn't make any sense. i printed each string and they were equal.
kalusn has quit [Remote host closed the connection]
<flughafen>
but i ended up having to do a chomp later, because of new lines, and now i realized that \n makes the strings different so, they wouldn't ==
<flughafen>
but I am curious as to why an array of strings doesn't print out like ["foo", "bar", "baz"]
aganov has joined #ruby
dumdedum has quit [Ping timeout: 256 seconds]
agent_white has quit [Read error: Connection reset by peer]
<mozzarella>
it prints every item in the list
agent_white has joined #ruby
andikr has joined #ruby
oki has joined #ruby
leat has quit [Remote host closed the connection]
hfp has joined #ruby
hfp_work has joined #ruby
hfp__work has joined #ruby
hfp_ has joined #ruby
<certainty>
flughafen: try puts ary.inspect
krz has quit [Quit: WeeChat 1.0.1]
User458764 has joined #ruby
jenrzzz has joined #ruby
kalusn has joined #ruby
terlar has joined #ruby
hfp has quit [Ping timeout: 246 seconds]
hfp_ is now known as hfp
hfp_work has quit [Ping timeout: 245 seconds]
hfp__work is now known as hfp_work
<flughafen>
certainty: i'll try that in the future. it wasn't a big deal, just unexpected. i was just debugging
<flughafen>
but it works as i want now
User458764 has quit [Client Quit]
kalusn has quit [Remote host closed the connection]
dfinninger has joined #ruby
leat has joined #ruby
strixd has joined #ruby
cmckee has quit [Quit: cmckee]
mkaesz has joined #ruby
dumdedum has joined #ruby
dfinninger has quit [Ping timeout: 256 seconds]
yeticry has quit [Ping timeout: 272 seconds]
Joufflu has quit [Quit: Peace]
terlar has quit [Quit: WeeChat 1.1.1]
yeticry has joined #ruby
ta has joined #ruby
withnale__ has joined #ruby
DavidDudson has joined #ruby
User458764 has joined #ruby
norc has joined #ruby
havenn has quit [Remote host closed the connection]
fabrice31 has quit [Remote host closed the connection]
withnale__ has quit [Ping timeout: 256 seconds]
fabrice31 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cHarNe2 has quit [Quit: leaving]
nii236 has quit [Ping timeout: 256 seconds]
<norc>
Hi, I have a somewhat circular dependency in my require system. Is it okay to specify a module first, then require stuff that inserts classes into that module?
Timba-as has joined #ruby
<norc>
Or should I find a way to truly always require first, then declare/define the modules?
Bounga_ has joined #ruby
Takle has quit [Remote host closed the connection]
ta has quit [Remote host closed the connection]
ItSANgo has joined #ruby
nii236 has joined #ruby
Bounga_ has quit [Client Quit]
SebastianThorn has joined #ruby
_Andres has joined #ruby
amundj has joined #ruby
claw has quit [Ping timeout: 240 seconds]
mkaesz has quit [Remote host closed the connection]
terlar has quit [Read error: Connection reset by peer]
maasha has joined #ruby
sivsushruth has quit [Ping timeout: 245 seconds]
sivsushruth has joined #ruby
bim has quit [Remote host closed the connection]
bim has joined #ruby
majoh has joined #ruby
imanzarrabian has joined #ruby
sinkensabe has quit [Read error: Connection reset by peer]
sinkensabe has joined #ruby
<maasha>
Hi, I am still trying to figure out how to skip a unit test. In Ruby < 2.2 there is a skip method, in Ruby 2.2 there is a omit. I dont want to make any assumptions on Ruby version. How to generically skip?
Synthead has quit [Read error: Connection reset by peer]
kalusn has joined #ruby
mkaesz has joined #ruby
einarj has joined #ruby
claw has joined #ruby
<norc>
Fine, Ill just forward declare all my nested modules.
psyprus has quit [Ping timeout: 245 seconds]
bim has quit [Ping timeout: 252 seconds]
Wolland has quit []
claw has quit [Ping timeout: 256 seconds]
DaniG2k has joined #ruby
xcombelle has quit [Quit: Quitte]
krz has joined #ruby
nii236 has quit [Ping timeout: 246 seconds]
Soda has joined #ruby
nii236 has joined #ruby
bruno- has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
sinkensabe has quit [Remote host closed the connection]
claw has joined #ruby
Guest72895 has joined #ruby
sinkensabe has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
wicope has quit [Ping timeout: 244 seconds]
martinbmadsen has quit [Ping timeout: 264 seconds]
timmow has quit [Ping timeout: 245 seconds]
timmow has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ta has joined #ruby
marr has joined #ruby
PaulCapestany has quit [Read error: Connection reset by peer]
wicope has joined #ruby
relix has joined #ruby
PaulCapestany has joined #ruby
nii236 has quit [Ping timeout: 244 seconds]
KC9YDN has quit [Ping timeout: 245 seconds]
rdark has joined #ruby
slash_ni1k has joined #ruby
yosafbridge has quit [*.net *.split]
slash_nick has quit [*.net *.split]
Roa has quit [*.net *.split]
terlar has joined #ruby
chthon has joined #ruby
yosafbridge has joined #ruby
hfp has quit [Ping timeout: 240 seconds]
hfp_work has quit [Ping timeout: 255 seconds]
riotjones has joined #ruby
sevenseacat has quit [Remote host closed the connection]
godd2__ has joined #ruby
godd2 has quit [Disconnected by services]
Hirzu_ has joined #ruby
godd2__ is now known as godd2
dfinninger has joined #ruby
KC9YDN has joined #ruby
Roa has joined #ruby
hfp_work has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
psyprus has joined #ruby
hfp has joined #ruby
KC9YDN has quit [Changing host]
KC9YDN has joined #ruby
bim has joined #ruby
CustosLimen has joined #ruby
Hirzu has quit [Ping timeout: 256 seconds]
ghostpl_ has quit [Ping timeout: 256 seconds]
riotjones has quit [Ping timeout: 255 seconds]
joonty has joined #ruby
DavidDudson has joined #ruby
Takle has joined #ruby
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
dfinninger has quit [Ping timeout: 272 seconds]
DavidDudson has quit [Client Quit]
DEA7TH has joined #ruby
sivsushruth has quit [Ping timeout: 245 seconds]
sivsushruth has joined #ruby
ByronJoh1son has joined #ruby
DavidDudson has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
ByronJohnson has quit [Disconnected by services]
ByronJoh1son is now known as ByronJohnson
alcy has joined #ruby
Vile` has quit [Ping timeout: 256 seconds]
buub has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
lordkryss has joined #ruby
alex88 has joined #ruby
Vile` has joined #ruby
roshanavand1 has joined #ruby
elaptics_away is now known as elaptics
sivsushruth has quit [Ping timeout: 264 seconds]
sivsushruth has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
Flcn has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
danjordan has joined #ruby
zeel has joined #ruby
Spami has joined #ruby
DavidDudson has joined #ruby
lkba has quit [Read error: Connection reset by peer]
bim has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.0.1]
sigurding has quit [Quit: sigurding]
DavidDudson has quit [Client Quit]
sigurding has joined #ruby
claw has quit [Ping timeout: 256 seconds]
nfk has joined #ruby
lynxman has quit [Quit: leaving]
lynxman has joined #ruby
DavidDudson has joined #ruby
grr_ has joined #ruby
DavidDudson has quit [Client Quit]
lynxman has quit [Quit: leaving]
withnale__ has joined #ruby
naftilos76 has joined #ruby
multi_io_ is now known as multi_io
sivsushruth has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
sivsushruth has joined #ruby
ki0 has joined #ruby
commmmodo has joined #ruby
shredding has joined #ruby
ypasmk has joined #ruby
bim has joined #ruby
Zai00 has joined #ruby
leat1 has joined #ruby
leat has quit [Read error: Connection reset by peer]
leat1 has quit [Remote host closed the connection]
leat1 has joined #ruby
yh has joined #ruby
<yh>
"hi".tap { |str| str[0].upcase! } # why does this not return "Hi" ?
DavidDudson has joined #ruby
commmmodo has quit [Quit: commmmodo]
mkaesz has quit [Ping timeout: 246 seconds]
<zipkid>
yh: "Object#tap always returns the original object passed into it after executing the block, even if the block returns something different."
mkaesz has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
leat1 has quit [Remote host closed the connection]
<canton7>
yh, because 'hi'[0] returns the string 'h'. upcase! then mutates that string containing just 'h', but doesn't affect the original 'hi' string
Rollabunna has quit [Remote host closed the connection]
<yh>
zipkid: thanks - I didn't realise that [] returned a different object!
<canton7>
compare with e.g. "hi".tap{ |s| s.upcase! }
<yh>
(Well, obviously it does :)
<godd2>
yh tap is used to "peek inbetween" messages
leat1 has joined #ruby
<yh>
I was hoping to change the first character of that string object in-situ
Rollabunna has joined #ruby
claw has joined #ruby
<yh>
def my_method; s = "hi"; s[0].upcase!; s; end; my_method # would work, but would like to reduce it
<canton7>
'hi'.tap{ |s| s[0] = s[0].upcase }
<yh>
(I know there's capitalize, but that affects subsequent letters)
<zipkid>
?
<zipkid>
upcase does, .capitalize only upcases the first....
<workmad3>
yh: doing str.first started making less sense when encodings were introduced properly in 1.9, as it's very unclear whether you mean the first character or the first byte... "".chars.first and "".bytes.first are all fine thigh
<workmad3>
*though
dANO__ has joined #ruby
<yh>
String supported it before 1.9. To do with Unicode etc.
yh has quit [Quit: leaving]
yh has joined #ruby
<workmad3>
yh: yeah, that's what I said :P
<yh>
I had connectivity issues, might have missed something there :)
<workmad3>
yh: strings stopped being directly enumerable in 1.9 when encodings were added
<workmad3>
yh: "".chars or "".bytes are the way to get enumerators over the bit of the string you care about ;)
<yh>
strings should enumerate over characters
<yh>
that doesn't seem to be disputable - losing enumerability seems a loss
<workmad3>
yh: in 1.8 they enumerated over bytes though
<yh>
why was it chosen to lose functionality instead of make the existing functionality sane?
bim has quit [Remote host closed the connection]
dANO__ has quit [Remote host closed the connection]
<workmad3>
yh: no idea... I guess it's something to do with strings also being the closest thing to a byte buffer in ruby
claw has joined #ruby
bim has joined #ruby
DEA7TH has quit [Ping timeout: 240 seconds]
<workmad3>
yh: it could also have been so that 1.8 code that was going to be obviously wrong in assumptions would quickly just break rather than introduce much more subtle bugs into a lot of libraries
<hanmac1>
are you sure that 1.8 was over bytes instead of lines?
<workmad3>
hanmac1: err... no? A)
<workmad3>
*:)
<hanmac1>
hm, its not that i care, 1.8 is dead for me
<workmad3>
hanmac1: same... but now you've got me curious :P
<workmad3>
hanmac1: ok, yes it was lines, not bytes... which means forcing a break makes more sense as it was even more incompatible than a potential mis-interpretation about bytes or chars :)
hiyosi has joined #ruby
elfuego has quit [Quit: elfuego]
phale has joined #ruby
michael_mbp has quit [Excess Flood]
roshanavand1 has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 265 seconds]
michael_mbp has joined #ruby
parduse has joined #ruby
dys has joined #ruby
selu has joined #ruby
BTRE has joined #ruby
wald0 has joined #ruby
roshanavand has joined #ruby
DEA7TH has joined #ruby
sivsushruth has quit [Ping timeout: 246 seconds]
sivsushruth has joined #ruby
michael_mbp has quit [Excess Flood]
michael_mbp has joined #ruby
senayar has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
imanzarrabian has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
roshanavand has joined #ruby
ghostpl_ has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
ghostpl_ has joined #ruby
buub has quit [Ping timeout: 265 seconds]
buub has joined #ruby
vtunka has joined #ruby
parduse has quit []
Hijiri has quit [Ping timeout: 256 seconds]
Hijiri has joined #ruby
claw has quit [Ping timeout: 240 seconds]
bruno- has quit [Ping timeout: 255 seconds]
michael_mbp has quit [Excess Flood]
arup_r has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
michael_mbp has joined #ruby
parduse has joined #ruby
rrrutr has joined #ruby
grr_ has quit [Remote host closed the connection]
doodlehaus has joined #ruby
huddy has joined #ruby
gr33n7007h has joined #ruby
vtunka_ has joined #ruby
bim has quit [Remote host closed the connection]
vtunka has quit [Ping timeout: 250 seconds]
bim has joined #ruby
sinkensabe has quit [Remote host closed the connection]
sivsushruth has quit [Ping timeout: 245 seconds]
sivsushruth has joined #ruby
yeticry has quit [Ping timeout: 245 seconds]
bim has quit [Ping timeout: 245 seconds]
yeticry has joined #ruby
kera has joined #ruby
yqt has joined #ruby
dEPy has joined #ruby
bim has joined #ruby
FooMunki_ has joined #ruby
Soda has quit [Remote host closed the connection]
iterator_ has joined #ruby
sivsushruth has quit [Ping timeout: 256 seconds]
sivsushruth has joined #ruby
Synthead has joined #ruby
yeticry has quit [Ping timeout: 265 seconds]
dfinninger has joined #ruby
bim_ has joined #ruby
bim has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
iteratorP has quit [Ping timeout: 252 seconds]
senayar has quit [Remote host closed the connection]
leafybasil has joined #ruby
iterator_ has quit [Ping timeout: 256 seconds]
jcromartie has joined #ruby
polysics has joined #ruby
dfinninger has quit [Ping timeout: 240 seconds]
reinaldob has joined #ruby
DEA7TH has quit [Ping timeout: 255 seconds]
rodfersou has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
jespada has joined #ruby
vt102 has joined #ruby
Timgauthier has joined #ruby
tkuchiki has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
tkuchiki has joined #ruby
claw has joined #ruby
lanemeyer has quit [Ping timeout: 272 seconds]
fgo has quit [Quit: WeeChat 1.1.1]
govg has joined #ruby
sivsushruth has quit [Ping timeout: 250 seconds]
sivsushruth has joined #ruby
WillAmes has quit [Remote host closed the connection]
WillAmes has joined #ruby
bal has quit [Ping timeout: 252 seconds]
claw has quit [Read error: No route to host]
polysics has quit [Remote host closed the connection]
roolo has quit [Remote host closed the connection]
writeco has joined #ruby
ki0 has quit []
roolo has joined #ruby
mkaesz has quit [Ping timeout: 245 seconds]
roolo has quit [Remote host closed the connection]
Pip has joined #ruby
ldnunes has joined #ruby
sivsushruth has quit [Ping timeout: 256 seconds]
bim_ has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 264 seconds]
sivsushruth has joined #ruby
rrrutr has quit [Ping timeout: 256 seconds]
fabrice31_ has quit [Remote host closed the connection]
bim has joined #ruby
sambao21 has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
sambao21 has quit [Client Quit]
sdothum has joined #ruby
piotrj has joined #ruby
doodlehaus has quit [Remote host closed the connection]
bogeyd6 has quit [Read error: Connection reset by peer]
bim has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
jespada has quit [Ping timeout: 246 seconds]
jespada_ has joined #ruby
codecop has joined #ruby
piotrj has quit [Remote host closed the connection]
mathie has joined #ruby
yqt has joined #ruby
shadeslayer has quit [Ping timeout: 256 seconds]
bim has joined #ruby
piotrj has joined #ruby
bim has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 245 seconds]
ghostpl_ has quit [Remote host closed the connection]
bim has joined #ruby
shadeslayer has joined #ruby
cpt_yossarian has quit [Ping timeout: 264 seconds]
digitalextremist has quit [Ping timeout: 246 seconds]
Takle has joined #ruby
sivsushruth has quit [Ping timeout: 264 seconds]
bim has quit [Remote host closed the connection]
gfawcettpq has joined #ruby
sivsushruth has joined #ruby
senayar has joined #ruby
bim_ has joined #ruby
maximski has joined #ruby
Bounga_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
sivsushruth has quit [Ping timeout: 244 seconds]
lkba has joined #ruby
elfuego has joined #ruby
nettoweb has joined #ruby
sivsushruth has joined #ruby
sinkensabe has joined #ruby
teddyp1cker has joined #ruby
elfuego has quit [Client Quit]
ki0 has joined #ruby
apeiros_ has joined #ruby
Guest15 has joined #ruby
bal has quit [Ping timeout: 252 seconds]
Bounga_ has joined #ruby
reDkinG has joined #ruby
sivsushruth has quit [Ping timeout: 252 seconds]
ghostpl_ has joined #ruby
fabrice31 has joined #ruby
kromm has joined #ruby
sivsushruth has joined #ruby
bim_ has quit [Ping timeout: 246 seconds]
sigurding has quit [Quit: sigurding]
bim has joined #ruby
alem0lars has quit [Ping timeout: 252 seconds]
mkaesz has joined #ruby
PierreRambaud has quit [Ping timeout: 252 seconds]
dfinninger has joined #ruby
alem0lars has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
aclearman037 has joined #ruby
Hirzu_ has quit [Remote host closed the connection]
Hirzu has joined #ruby
phutchins has joined #ruby
jonr22 has joined #ruby
dfinninger has quit [Ping timeout: 255 seconds]
plashchynski has joined #ruby
Abhijit has joined #ruby
mkaesz has quit [Ping timeout: 252 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
millerti has joined #ruby
d10n-work has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
mkaesz has joined #ruby
piotrj has quit [Remote host closed the connection]
Abhijit has quit [Client Quit]
piotrj has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kromm has quit [Quit: kromm]
Hirzu has quit [Ping timeout: 245 seconds]
fgo has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
riotjones has joined #ruby
paulfm has joined #ruby
lanemeyer has joined #ruby
dEPy has quit [Quit: (null)]
ta has quit [Remote host closed the connection]
brb3 has joined #ruby
otisZart has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
riotjones has quit [Ping timeout: 256 seconds]
sanguisdex has joined #ruby
abuzze has joined #ruby
parduse has quit []
iamjarvo has joined #ruby
bim has quit [Remote host closed the connection]
bim has joined #ruby
parduse has joined #ruby
dblessing has joined #ruby
jcromartie has quit [Read error: Connection reset by peer]
tkuchiki has quit [Ping timeout: 245 seconds]
Guest95329 has joined #ruby
luksaur has joined #ruby
sigurding has joined #ruby
polysics has joined #ruby
bim has quit [Remote host closed the connection]
sigurding has quit [Client Quit]
Guest95329 has quit [Client Quit]
sivsushruth has quit [Ping timeout: 246 seconds]
sigurding has joined #ruby
sivsushruth has joined #ruby
g0bl1n has joined #ruby
dropp has joined #ruby
dstarh has joined #ruby
sambao21 has joined #ruby
drewvanstone has joined #ruby
plashchynski has quit [Quit: plashchynski]
curiousgeorge has joined #ruby
n1lo has joined #ruby
plashchynski has joined #ruby
<curiousgeorge>
im reading: http://www.tutorialspoint.com/ruby/ruby_object_oriented.htm ... i don't understand this " A mixin is like a specialized implementation of multiple inheritance in which only the interface portion is inherited."
<curiousgeorge>
what do they mean by "the interface portion"
<workmad3>
curiousgeorge: the comment even tells you that it's the unary -
<curiousgeorge>
jhass: ahh! it comes before :o
drewvanstone has quit [Quit: leaving]
rikai has joined #ruby
<workmad3>
curiousgeorge: unary operator == operator that takes a single argument, contrasted to binary operator, that takes 2 arguments (e.g x - y is the binary minus, -x is the unary minus)
tobago has quit [Remote host closed the connection]
last_staff has joined #ruby
<curiousgeorge>
workmad3: just looking into that now, thanks!
drewvanstone has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drewvanstone has quit [Client Quit]
Hirzu_ has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
evanjs has joined #ruby
Hirzu has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
drewvanstone has joined #ruby
iamjarvo has joined #ruby
godd2 has quit [Remote host closed the connection]
godd2 has joined #ruby
oo_ has quit [Remote host closed the connection]
nettoweb has joined #ruby
oo_ has joined #ruby
voyd has joined #ruby
g0bl1n has joined #ruby
<voyd>
Hi everyone, I'm running rspec with rails 3.2 and ruby 1.9/2.0 get a lot of warnings for gems. Is there a way to only show warnings for my own code?
<jhass>
no
it0a has joined #ruby
Timgauthier is now known as timgauthier_away
joonty has quit [Quit: joonty]
<jhass>
one of the reasons nobody turns on warnings :P
<voyd>
:(
<voyd>
okay, that sucks.
<jhass>
consider using a linter, like ruby -wc or rubocop with the style and metric checks disabled
amystephen has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Takle has joined #ruby
terlar has joined #ruby
yh has quit [Ping timeout: 264 seconds]
<workmad3>
voyd: the ruby runtime doesn't really see a difference between your code (consisting of normal ruby files) and gems (consisting of normal ruby files)
<voyd>
I thought so.
<jhass>
yeah, so ruby -wc doesn't run the code thus it only sees the file you point it at
<voyd>
Would it be possible to monkey patch require?
<jhass>
probably, but not worth it IMO
spyderman4g63 has joined #ruby
<voyd>
hm. yeah, I think so too
<voyd>
okay, thanks for the input!
enebo has joined #ruby
<workmad3>
voyd: tbh, if the gems you're using are generating so many warnings that it's problematic to see through the noise, that's really quite important information and you probably want to investigate whether they're a problem
<workmad3>
voyd: rather than just assuming that because it's not your code then it'll work fine ;)
ych4k3r has joined #ruby
doodlehaus has joined #ruby
<voyd>
workmad3: yeah, I thought so, too. But I'm currently taking over a rails-3.2 project which hasn't had much love in recent years, and I just try to wade through while my phone rings about bugs.
alcy has quit [Quit: leaving]
<voyd>
is there a tool that visualizes or logs requires? I get some warnings about circular requires, too...
HOrangeJewce has joined #ruby
Takle has quit [Remote host closed the connection]
bim has joined #ruby
evanjs has quit [Quit: Leaving...]
banister has joined #ruby
Takle_ has joined #ruby
polysics has quit [Remote host closed the connection]
polysics has joined #ruby
teddyp1cker has joined #ruby
DaniG2k has quit [Quit: leaving]
jerematic has joined #ruby
xaxisx has joined #ruby
paradoja has joined #ruby
rrrutr has joined #ruby
relix has joined #ruby
polysics has quit [Ping timeout: 250 seconds]
oo_ has quit [Remote host closed the connection]
adriancb has joined #ruby
sivsushruth has quit [Ping timeout: 264 seconds]
odigity has quit [Ping timeout: 265 seconds]
sivsushruth has joined #ruby
cpt_yossarian has joined #ruby
paradoja has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
Sgeo has quit [Read error: Connection reset by peer]
teddyp1cker has quit [Remote host closed the connection]
<bradland>
voyd: you can monkey patch Kernel to log require, but be sure to use it only temporarily.
<bradland>
eh, actually
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bradland>
i think you'll want to do that in Object
<bradland>
Kernel is where require is located, but I don't think that's where you want to patch it
<jhass>
sivsushruth: Please do not crosspost without at least telling so. Experience shows that people don't bother to inform the other channels of provided solutions, therefore it is considered rude.
<jhass>
;)
polysics has joined #ruby
chrisja has joined #ruby
GGMethos has joined #ruby
perrier has quit [Remote host closed the connection]
<jhass>
for the others: I already noted extracting a few cases into private methods, using module_function, avoiding for, default arg for join and better variable names over in #RubyOnRails where he asked first
parduse has quit []
perrier has joined #ruby
<jhass>
oh and spaces over tabs was noted too already
<certainty>
that's plenty already. i wondered if it was worth starting that game
plashchynski has quit [Quit: plashchynski]
<certainty>
but you did already, so thanks jhass
parduse has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
otisZart has joined #ruby
startupality has quit [Quit: startupality]
n80 has joined #ruby
sivsushruth has quit [Ping timeout: 246 seconds]
<jhass>
meh
sivsushruth has joined #ruby
<jhass>
sivsushruth: what did you still see after your message?
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
odigity has joined #ruby
mitchellhenke has quit [Ping timeout: 256 seconds]
juanpablo_ has joined #ruby
lyuben_ has quit [Read error: Connection reset by peer]
lyuben_ has joined #ruby
senayar has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
OrbitalKitten has joined #ruby
dANO__ has joined #ruby
Stalkr_ has joined #ruby
terlar has quit [Ping timeout: 240 seconds]
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
allcentury has joined #ruby
rbennacer has quit [Remote host closed the connection]
rkgudboy has joined #ruby
rbennacer has joined #ruby
elfuego has joined #ruby
malcolmva has quit [Ping timeout: 246 seconds]
mary5030 has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
<allcentury>
Hi all - I'm pretty new to vim ( < 8 mos) and decided to put my dot files in VC today. I'm using pathogen to manage my plugins and noticed when I added my .vim/bundle folder to my repo it shows those as git submodules (which makes sense). Should I be following this answer to store this in my vc? http://stackoverflow.com/a/4162672/3109182
Aswebb_ has joined #ruby
emocakes has quit [Ping timeout: 245 seconds]
<allcentury>
I want to be able to update these plugins via git pull when needed
justin_pdx has quit [Quit: justin_pdx]
terlar has joined #ruby
ghostpl_ has joined #ruby
jespada_ is now known as jespada
mary5030 has quit [Ping timeout: 265 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
jlast has joined #ruby
Takle_ has quit [Remote host closed the connection]
renier_ has joined #ruby
renier has quit [Ping timeout: 246 seconds]
sambao21 has joined #ruby
hmsimha has quit [Ping timeout: 252 seconds]
<ericwood>
allcentury: you honestly may want to consider vundle instead
senayar has joined #ruby
<ericwood>
it acts more like a real package manager
<ericwood>
and I think the way it works fixes your submodule woes, since you're not managing it manually
polysics has quit [Remote host closed the connection]
polysics has joined #ruby
zenith_ has joined #ruby
mitchell_ has quit [Quit: Computer has gone to sleep.]
<alex88>
hi guys, is there an automated way using rvm/rbenv to install the specific ruby version declared in Gemfile to use inside a CI setup?
<alex88>
godd2: that installs ruby inside circleci machine, not docker container
adriancb has joined #ruby
sinkensabe has joined #ruby
jww_ has joined #ruby
mitchellhenke has joined #ruby
teddyp1cker has joined #ruby
<godd2>
alex88 then I don't know
<godd2>
Have you considered running mutliples inside circleci and then have your one main docker be a certain version?
<alex88>
np
brb3 has quit [Quit: ZZZzzz…]
adriancb has quit [Read error: Connection reset by peer]
ghostpl_ has quit [Remote host closed the connection]
brb3 has joined #ruby
cpt_yossarian has quit [Ping timeout: 245 seconds]
zenith_ has quit [Ping timeout: 255 seconds]
odigity has quit [Ping timeout: 265 seconds]
shazaum has joined #ruby
jww42 has joined #ruby
Ankhers has joined #ruby
jww_ has quit [Remote host closed the connection]
ghostpl_ has joined #ruby
iamninja has joined #ruby
freerobby has quit [Quit: Leaving.]
ghostpl_ has quit [Remote host closed the connection]
adriancb has joined #ruby
ismaelga has joined #ruby
ghostpl_ has joined #ruby
rkgudboy has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
ghostpl_ has quit [Remote host closed the connection]
roolo has joined #ruby
fgo has joined #ruby
vt102 has quit [Remote host closed the connection]
Takle has joined #ruby
centrx has joined #ruby
last_staff has quit [Quit: last_staff]
mleung has quit [Quit: mleung]
lxsameer has quit [Quit: Leaving]
lkba_ has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
freerobby has joined #ruby
odigity has joined #ruby
bruno- has joined #ruby
freerobby has quit [Client Quit]
B1n4r10 has joined #ruby
Flcn has quit [Ping timeout: 250 seconds]
jlast has quit [Read error: Connection reset by peer]
Flcn has joined #ruby
teddyp1c_ has joined #ruby
B1n4r10 has quit [Max SendQ exceeded]
teddyp1cker has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
lkba has quit [Ping timeout: 264 seconds]
Dopagod has joined #ruby
havenwood has joined #ruby
Guest15 has quit [Ping timeout: 252 seconds]
ghostpl_ has joined #ruby
maasha has quit [Quit: Page closed]
freerobby has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
dfinninger has joined #ruby
jlast has joined #ruby
willgorman is now known as willgorman|away
Mon_Ouie has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
bal has joined #ruby
odigity has quit [Ping timeout: 256 seconds]
ypasmk has quit [Quit: ypasmk]
ghostpl_ has quit [Ping timeout: 256 seconds]
kaiZen- has joined #ruby
bal1 has joined #ruby
max96at is now known as max96at|off
sivsushruth has quit [Ping timeout: 256 seconds]
bal has quit [Ping timeout: 252 seconds]
paradoja has joined #ruby
havenn has joined #ruby
sivsushruth has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
polysics has quit [Read error: Connection reset by peer]
centrx has quit [Ping timeout: 245 seconds]
polysics_ has joined #ruby
ixti has joined #ruby
Takle has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 264 seconds]
ta has joined #ruby
tagrudev has quit [Read error: Connection reset by peer]
Takle has joined #ruby
dwilbank has joined #ruby
<dwilbank>
hello - checking to see if I can post...
<dwilbank>
alright! I'm trying to tackle this problem, http://www.ardendertat.com/2011/09/20/programming-interview-questions-2-matrix-region-sum/ and it is my first intro to matrices. So far, I see how to create and build matrices, and I saw all the methods in the docs about them... Question is, what do I need to learn before I can really tackle this problem? It is possible to do this without too much
<dwilbank>
trouble in ruby, right?
<yh>
dwilbank: that's not out of a Ruby beginner's reach
<yh>
As in, with the right bits of research (e.g. looking at methods that Array provides, for example) you should be well on your way to doing it
ascarter has joined #ruby
centrx has joined #ruby
odigity has joined #ruby
ascarter has quit [Max SendQ exceeded]
<dwilbank>
okay - will begin the journey
<dwilbank>
thx
ascarter has joined #ruby
snockerton has joined #ruby
mistermocha has joined #ruby
RegulationD has joined #ruby
<godd2>
dwilbank don't forget that the cache matrix has elements which are the sum of the rectangle from the top left of the original to that point
<HOrangeJewce>
Is there a minitest equivalent of rspec's shared_context?
<godd2>
so throughout the queries you only need the original matrix and another matrix of the same size
willgorman|away is now known as willgorman
<godd2>
but whose elements are the sums
RegulationD has quit [Client Quit]
RegulationD has joined #ruby
Kricir has quit []
RegulationD has quit [Client Quit]
<dwilbank>
Thanks. Will refer to these hints once I figure out their first, unoptimized solution.
Aswebb_ has joined #ruby
<godd2>
dwilbank oh the unoptimized is exactly what you'd try first. simply add the elements whenever they're asked for
mrdtt has joined #ruby
<HOrangeJewce>
Yeah as long as the number of executions is an order of magnitude greater than the precomputations then it's worth
RegulationD has joined #ruby
drawingthesun has joined #ruby
Hirzu has quit [Ping timeout: 240 seconds]
rhllor has joined #ruby
odigity has quit [Ping timeout: 256 seconds]
tjbiddle has joined #ruby
snockerton has left #ruby [#ruby]
drawingthesun has quit [Client Quit]
<godd2>
HOrangeJewce that's true. In the article they're implying an arbitrary number of queries, but in the real world that would be an additional consideration
Aswebb_ has quit [Remote host closed the connection]
Dude007 has joined #ruby
<HOrangeJewce>
godd2: Yup
juanpaucar has joined #ruby
<HOrangeJewce>
dwilbank: Also for any interview if you're asked almost anything involving 2 dimensional matrices there's almost always a DP sol'n that will be 'more optimal'
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
max96at|off is now known as max96at
MatthewsFace has quit [Remote host closed the connection]
Rephiax has quit []
<dwilbank>
DP?
norc has quit [Ping timeout: 246 seconds]
<HOrangeJewce>
dynamic programming
<dwilbank>
oy - I gotta learn my matrix first
GaryOak_ has joined #ruby
<HOrangeJewce>
don't worry about it
<HOrangeJewce>
baby steps
<godd2>
I think the recursion in this case comes after the clever notion that you can subtract away sub-caches
ghostpl_ has quit [Remote host closed the connection]
hanmac1 has quit [Quit: Leaving.]
Cubensys has joined #ruby
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<HOrangeJewce>
godd2: It's not recursive
ghostpl_ has joined #ruby
startupality has joined #ruby
xaxisx has quit [Quit: xaxisx]
jeff_laplante has joined #ruby
<godd2>
I'm saying that you can use recursion to cache the submatrices
polysics has joined #ruby
<godd2>
DP starts with recursion and then you find where you cache, but in this case the way you cache is more important than the recursive part
paulfm has quit [Quit: Zzzzz...]
Megtastique has joined #ruby
xcesariox has joined #ruby
<HOrangeJewce>
in this particular case you don't need to recurse to calculate the sums for all subsections of a matrix size MN
havenwood has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
<godd2>
I didn't say you needed to. I said that you can.
<dwilbank>
okay - going to make gist to demonstrate how I think this thing works. Is there a best plugin for sublime or something? Looks like there are several choices...
chrishough has joined #ruby
ghostpl__ has joined #ruby
<HOrangeJewce>
ah ok I suppose I see how that might work
bluOxigen has joined #ruby
xaxisx has joined #ruby
ghostpl_ has quit [Read error: Connection reset by peer]
<HOrangeJewce>
What would the base case be? sum of all elements in the matrix?
<HOrangeJewce>
or return the [0][0[
<HOrangeJewce>
I suppose you could do either
blueOxigen has joined #ruby
<godd2>
HOrangeJewce yea I'd go with 0,0
<godd2>
at least seems more traditional
<HOrangeJewce>
I just wouldn't have thought to do it recursively haha
<godd2>
plus, if the matrix is changing size, at least it will halt at 0,0
<HOrangeJewce>
yeah
<HOrangeJewce>
probably a better way to go about it
giuseppesolinas has joined #ruby
<godd2>
probably, especially depending on the language/toolset
plashchynski has joined #ruby
<godd2>
I'm not familiar enough with ruby's matrix library to know what I'd lean toward
<HOrangeJewce>
I just think it's easier to envision this one iteratively
<godd2>
dwilbank I've never used a sublime to gist plugin. is there one?
_maes_ has joined #ruby
<HOrangeJewce>
have an array that stores all the sums of the subarrays
kblake has joined #ruby
<godd2>
HOrangeJewce hehe I've been on a Clojure kick recently so maybe that's clouding my judgement
<HOrangeJewce>
nah
<dwilbank>
godd2 - sublime-github is what I'm trying now - but that's just a random choice
<HOrangeJewce>
Well this isn't the easiest recursive f'n because you'd have to have 3 methods
<HOrangeJewce>
the base, one for the rows and one for the columns
bluOxigen has quit [Ping timeout: 255 seconds]
<HOrangeJewce>
or something along those lines
<HOrangeJewce>
anways dwilbank ignore my commentary
sinkensabe has quit [Remote host closed the connection]
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 252 seconds]
tearan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mives has joined #ruby
paulfm has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
vtunka has quit [Quit: Leaving]
Dopagod has quit [Ping timeout: 244 seconds]
dandaman has joined #ruby
riotjones has joined #ruby
allcentury has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
yqt has quit [Ping timeout: 264 seconds]
vt102 has joined #ruby
beneggett has joined #ruby
beneggett has quit [Client Quit]
vtunka has joined #ruby
xaxisx has quit [Quit: xaxisx]
ismaelga has quit [Ping timeout: 252 seconds]
roshanavand has quit [Ping timeout: 256 seconds]
bal1 has quit [Quit: bal1]
fabrice31 has quit [Remote host closed the connection]
lemur has joined #ruby
beneggett has joined #ruby
lyuben_ has quit [Quit: This computer has gone to sleep]
riotjones has quit [Ping timeout: 256 seconds]
rhllor has quit [Quit: rhllor]
bricker has joined #ruby
sambao21 has joined #ruby
ghostpl__ has quit [Remote host closed the connection]
jobewan has joined #ruby
jespada_ has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
ghostpl_ has joined #ruby
jespada has quit [Ping timeout: 264 seconds]
rhllor has joined #ruby
Mives has quit [Quit: WeeChat 1.1.1]
Mives has joined #ruby
Hetman has joined #ruby
lemur has quit [Remote host closed the connection]
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
atomiccc has joined #ruby
boshhead has joined #ruby
Dopagod has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
zacts has joined #ruby
riotjones has joined #ruby
<Hetman>
Hello, I never code in Ruby before and my boss asked me to fix some problem (our webmaster is on holiday!) Can somebody please help me . This is the code: http://pastebin.com/Gx3QSbS0 . Problem is that its not following redirections (getting 302 as a response.code) can somebody help me to get that code to follow redirections and then check response.code . Regards
<helpa>
Hi Hetman. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
jottr has quit [Quit: WeeChat 1.1.1]
oki has quit [Ping timeout: 240 seconds]
Parker0 has joined #ruby
Parker0 has quit [Remote host closed the connection]
<Hetman>
there is one line missing under request , sorry ! missing line is response = http.request(request)
Hirzu has joined #ruby
aclearman037 has joined #ruby
tag has quit [Ping timeout: 245 seconds]
jottr has joined #ruby
coco has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Ping timeout: 265 seconds]
sigurding has quit [Quit: sigurding]
paulfm has quit [Quit: Zzzzz...]
coco has joined #ruby
deric_skibotn has joined #ruby
MatthewsFace has joined #ruby
n1lo has quit [Quit: Leaving]
Synthbread has quit [Quit: Leaving]
tjbiddle has quit [Quit: tjbiddle]
bluOxigen has joined #ruby
<atmosx>
Hetman: backup that file fist, then in line 24: if response.code == ("200" || "320")
<atmosx>
hm but that will return 'ok' ok redirect, you don't want that you want the client to follow the redirect right?
<Hetman>
atmosx: that I already solved it by giving it some more rich URL, instead of myapp.com i gave it myapp.com/login/dologin.do
<atmosx>
Hetman: ah k
fgo has quit [Quit: WeeChat 1.1.1]
<Hetman>
atmosx: but thx for help :-)
nathanr has joined #ruby
danman has joined #ruby
<atmosx>
np :-)
blueOxigen has quit [Ping timeout: 245 seconds]
<nathanr>
hi guys, I'm developing a middleman extension, which is generated as a gem for me. How can I make this gem available to other ruby apps without having to build it each time (while its in development) ?
blueOxigen has joined #ruby
maximski has quit [Ping timeout: 256 seconds]
bluOxigen has quit [Ping timeout: 246 seconds]
dandaman has quit [Quit: Leaving.]
<jhass>
nathanr: bundler provides the path option to do so
Stalkr_ has quit [Quit: Leaving...]
sambao21 has quit [Quit: Computer has gone to sleep.]
B1n4r10 has joined #ruby
<nathanr>
jhass: ie. I put `gemspec :path => '..'` in the Gemfile for the project which is using the gem I'm working on?
yqt has joined #ruby
Timgauthier has joined #ruby
Timgauthier is now known as timgauthier_away
<jhass>
gem "gemname", path: "~/projects/gemname", but yeah
<nathanr>
nice! thanks! :)
Hirzu has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
<atmosx>
jhass: ever used the JS datepicker?
spider-mario has joined #ruby
<atmosx>
jhass: any JS datepicker in your projects?
<jhass>
lol, how random. no
sambao21 has joined #ruby
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
<atmosx>
I'm trying to figure how to get a result, any hints? https://gist.github.com/atmosx/dd2c1047d3905e1b2df9 <-- gist. I'm reading through online tuts to figure how to send a reques to a route e.g. get /:date
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
skaag has joined #ruby
B1n4r10 has quit [Client Quit]
skaag has quit [Max SendQ exceeded]
<jhass>
atmosx: rails goes to #rubyonrails
jenrzzz has joined #ruby
<atmosx>
jhass: it's sinatra
skaag has joined #ruby
<atmosx>
lol
skaag has quit [Max SendQ exceeded]
B1n4r10 has joined #ruby
<atmosx>
but I think rails guys can help me also
<atmosx>
let me try
AlexRussia has quit [Ping timeout: 252 seconds]
<jhass>
well, there's #sinatra too
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
senayar has quit [Remote host closed the connection]
toretore has joined #ruby
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
<atmosx>
jhass: yeah I'm on it, but it's pretty much dead
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
huck5 has joined #ruby
polysics has quit [Remote host closed the connection]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
yh has quit [Ping timeout: 245 seconds]
startupality has quit [Quit: startupality]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
<huck5>
Hi there. I've been working through a Rails tutorial, that shows how to asynchronously re-display elements on the "current" page when a form is submitted. It does not go into detail as to how one might re-load elements on a *different* page. I am wondering if someone could help me with this; or point me in the direction of a resource that would?
Hetman has quit [Quit: Page closed]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
<atmosx>
huck5: #rubyonrails
yh has joined #ruby
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
<huck5>
atmosx, my bad! Thank you :)
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
RegulationD has quit [Remote host closed the connection]
<atmosx>
huck5: no worries, everybody does it :-P
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
RegulationD has joined #ruby
skaag has joined #ruby
dANO__ has quit []
skaag has quit [Max SendQ exceeded]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skaag has joined #ruby
skaag has quit [Max SendQ exceeded]
skaag has joined #ruby
Vile` has quit [Read error: Connection reset by peer]
skaag has quit [Max SendQ exceeded]
rhllor has quit [Quit: rhllor]
rhllor has joined #ruby
senayar has joined #ruby
buub has joined #ruby
mkaesz has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
zenith_ has joined #ruby
yh_ has joined #ruby
alex88 has quit []
yh has quit [Read error: Connection reset by peer]
Vile` has joined #ruby
_hollywood has joined #ruby
Timgauthier has joined #ruby
<phale>
ok
dandaman has joined #ruby
Takle has quit [Remote host closed the connection]
blueOxigen has quit [Ping timeout: 250 seconds]
aganov has quit [Remote host closed the connection]
ghostpl_ has quit [Remote host closed the connection]
mkaesz has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
zcreative has quit [Quit: (null)]
dfinninger has quit [Remote host closed the connection]
Mives has quit [Remote host closed the connection]
Guest45954 has joined #ruby
jin_ has joined #ruby
B1n4r10 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
phale: Your web browser isn't properly rendering that page.
<alem0lars>
I'm trying to read a markdown file, edit and save it.. Do you know a good library to do that? BTW I've tried kramdown but I'm losing my head over..
<jhass>
yeah, pastebin script proves nothing
<alem0lars>
I just need to create some markdown elements like headers or lists or text
<alem0lars>
and save them
<jhass>
alem0lars: huh? you mean render them to html?
<alem0lars>
jhass: no, edit the markdown
<jhass>
it's plaintext
<jhass>
just do it?
<alem0lars>
yeah but I have to add elements to a list
jmignault has joined #ruby
<alem0lars>
so making it by hand is really awkward
<alem0lars>
I have to read the markdown, make modifications without removing existing stuff and then save it again
<jhass>
I guess your problem is that you view markdown as a storage instead of a presentation of your data
jelera has quit [Quit: Leaving]
akkad has quit [Excess Flood]
<jhass>
markdown is indeed awful as a structured storage mechanism
<alem0lars>
you're right, but I am obliged to XD
<alem0lars>
I mean I should parse some READMEs and add informations to them
<alem0lars>
that is my requirement
paradoja has quit [Ping timeout: 272 seconds]
<alem0lars>
I could get something better like XML from Markdown then go back to Markdown
<phale>
alem0lars: here's your problem
<phale>
you're expecting a program to do everything for you
<phale>
know what you want and what you're thinking
<jhass>
workmad3: lol
akkad has joined #ruby
<jhass>
I don't want to see 3 roundtrips with that
<workmad3>
jhass: :D
frog|OFF is now known as green-big-frog
zacts has joined #ruby
<phale>
oprah winfrey
<atmosx>
true men browse on lynx
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
alem0lars: some educated regexps is as good as you can get tbh
<workmad3>
atmosx: no they don't... no image support for pr0n
<atmosx>
workmad3: true.
sambao21 has quit [Quit: Computer has gone to sleep.]
<atmosx>
I can't believe people still arguing about Jorda vs LeBron.
ghostpl_ has quit [Remote host closed the connection]
huck5 has quit [Remote host closed the connection]
<jhass>
alem0lars: markdown allows for way too much variance to expectx render(parse(x)) == x
green-big-frog has left #ruby [#ruby]
SegFaultAX has joined #ruby
SegFaultAX has quit [Excess Flood]
<alem0lars>
jhass yeah I think so.. I was going well in kramdown.. I mean, I have implemented everything (assuming kramdown format) but I went to a strange error
zachrab has quit [Remote host closed the connection]
<arup_r>
havenwood: original one I didn't try.. After following your instrcutions.. when I try to select the 2.2.0 got that annoying issue ... so the one for which I raised the issue ticket.. I didn't test again.
chrishough has joined #ruby
zachrab has joined #ruby
ndrei has joined #ruby
<havenwood>
arup_r: aha
bruno- has quit [Ping timeout: 256 seconds]
<arup_r>
havenwood: you might noticed that only 2.2.0 causing the PATH issue not the rest ones..
<arup_r>
in my Github comment
<arup_r>
jhass: sorry :(
<arup_r>
I am there in #Jquery
rdark has quit [Quit: leaving]
livingstn has joined #ruby
jespada_ has quit [Ping timeout: 272 seconds]
yfeldblu_ has quit [Ping timeout: 256 seconds]
kalusn has quit [Remote host closed the connection]
RegulationD has quit [Remote host closed the connection]
zachrab has quit [Ping timeout: 264 seconds]
leafybasil has quit [Remote host closed the connection]
MatthewsFace has quit [Remote host closed the connection]
Guest45954 has quit [Remote host closed the connection]
robustus has joined #ruby
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
werelivinginthef has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 256 seconds]
havenwood has quit []
sinkensabe has quit [Ping timeout: 250 seconds]
Spami has joined #ruby
Takle has joined #ruby
pygospa has quit [Ping timeout: 265 seconds]
mistermocha has joined #ruby
ojacobson has quit [Ping timeout: 264 seconds]
lolmaus has joined #ruby
pygospa has joined #ruby
n80 has joined #ruby
kalusn has joined #ruby
Stalkr_ has joined #ruby
dropp has quit [Quit: leaving]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
atomiccc has joined #ruby
aspiers has quit [Ping timeout: 246 seconds]
Dude007 has joined #ruby
yfeldblum has joined #ruby
irc2samus has joined #ruby
jmignault has joined #ruby
iamjarvo has joined #ruby
<irc2samus>
hello, I'm creating a gem and I'm having some trouble including static data; I've tried including those files in the gemspec as spec.files but they don't get copied, is there a proper way to handle it? thanks
iamjarvo has quit [Max SendQ exceeded]
basiclaser has joined #ruby
baweaver has joined #ruby
govg has quit [Ping timeout: 265 seconds]
iamjarvo has joined #ruby
govg has joined #ruby
cphrmky has joined #ruby
buub has joined #ruby
bklane has joined #ruby
n80 has quit [Quit: n80]
yqt has joined #ruby
davedev2_ has quit []
bricker has joined #ruby
ismaelga has quit [Remote host closed the connection]
davedev24_ has joined #ruby
<arup_r>
workmad3: what is sane editor ? I'm using vim..
<apeiros_>
irc2samus: adding them to spec.files should be sufficient. works for me at least.
adriancb has quit [Remote host closed the connection]
dumdedum has quit [Ping timeout: 265 seconds]
phale has joined #ruby
<phale>
"how to disappear completely (and never be found)"
<irc2samus>
apeiros_, I don't see them copied and I can't open them either, they're .txt files does that matter?
Wolland has joined #ruby
Wolland has quit [Client Quit]
<arup_r>
vim is not helping to write coffeescript code
<irc2samus>
the error shows the correct path but they aren't there
<apeiros_>
irc2samus: no. only thing that matters is that the paths are correct. though, where did you put the files? I put them into GEM/data/GEM/*
<apeiros_>
actually GEM/data/GEM_NAME/*
<phale>
wtf is going on here
piotrj has joined #ruby
<irc2samus>
apeiros_, they're currently in lib/GEM/data and I can find them on my working dir but after build/install they don't get copied
piotrj has quit [Remote host closed the connection]
<apeiros_>
irc2samus: well, it's all guesswork now unless you show stuff
kayloos has joined #ruby
mkaesz has joined #ruby
n80 has joined #ruby
mkaesz has quit [Remote host closed the connection]
kalusn has quit [Read error: Connection reset by peer]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xaxisx has quit [Quit: xaxisx]
baweaver has quit [Remote host closed the connection]
timmow has joined #ruby
jonr22 has joined #ruby
kirun has quit [Ping timeout: 264 seconds]
Rephiax has joined #ruby
govg has quit [Ping timeout: 264 seconds]
ndrei has quit [Ping timeout: 252 seconds]
govg has joined #ruby
<jhass>
irc2samus: I get NoMethodError: undefined method `abbs_txt_relpath' for #<CommonAbbreviations:0x00000004c7d310> on your example call
PaulCapestany has quit [Quit: .]
ismaelga has joined #ruby
soulcake has quit [Changing host]
soulcake has joined #ruby
Hirzu has joined #ruby
DouweM has quit [Read error: Connection reset by peer]
bklane has quit [Ping timeout: 256 seconds]
IrishGringo has quit [Ping timeout: 265 seconds]
Megtastique has joined #ruby
Megtastique has quit [Max SendQ exceeded]
Xiti has quit [Quit: Xiti]
PaulCapestany has joined #ruby
jonr22 has quit [Ping timeout: 244 seconds]
Megtastique has joined #ruby
xaxisx has joined #ruby
lanemeyer has quit [Ping timeout: 252 seconds]
bklane has joined #ruby
_djbkd has quit [Remote host closed the connection]
<irc2samus>
jhass, I see thank you; that was an error from a recent change while trying stuff but it didn't happened here which means I wasn't reinstalling it properly and was running an old version, works now with the code shown first
<irc2samus>
thanks guys!
ndrei has joined #ruby
jin_ has quit [Remote host closed the connection]
hanmac has quit [Quit: Leaving.]
hanmac has joined #ruby
Asher has quit [Quit: Leaving.]
elaptics is now known as elaptics_away
sevvie has quit [Ping timeout: 246 seconds]
Hirzu has quit [Ping timeout: 264 seconds]
cjim_ has joined #ruby
thumpba has quit [Remote host closed the connection]
baweaver has joined #ruby
sevvie has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
_djbkd has joined #ruby
thumpba has joined #ruby
SegFaultAX has quit [Excess Flood]
piotrj has joined #ruby
CorySimmons has quit [Quit: Bye!]
SegFaultAX has joined #ruby
cjim has quit [Ping timeout: 246 seconds]
ascarter has joined #ruby
mistermocha has joined #ruby
leafybasil has joined #ruby
Takle has quit [Remote host closed the connection]
kirun has joined #ruby
withnale__ has quit [Ping timeout: 272 seconds]
rhllor_ has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
rhllor has quit [Ping timeout: 265 seconds]
rhllor_ is now known as rhllor
_hollywood has quit [Quit: Leaving]
dandaman has quit [Quit: Leaving.]
n80 has quit [Quit: n80]
dmr8 has joined #ruby
aswen has joined #ruby
dmr8 has quit [Remote host closed the connection]
tag has joined #ruby
zachrab has joined #ruby
CorySimmons has joined #ruby
icebourg has joined #ruby
icebourg has quit [Max SendQ exceeded]
freerobby has quit [Quit: Leaving.]
blackmesa has joined #ruby
_djbkd has quit [Quit: My people need me...]
nathanr has left #ruby [#ruby]
freerobby has joined #ruby
soulcake has quit [Quit: Quack.]
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0/2015022000]]
plashchynski has joined #ruby
soulcake has joined #ruby
fantazo has joined #ruby
a5i has joined #ruby
icebourg has joined #ruby
sigurding has quit [Quit: sigurding]
tris has joined #ruby
Xiti has joined #ruby
reDkinG has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sigurding has joined #ruby
aswen has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
postmodern has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #ruby
kaiZen has joined #ruby
atmosx is now known as atmosx_varoufits
atmosx_varoufits is now known as atmos_varoufitsa
nahob has joined #ruby
RegulationD has joined #ruby
<nahob>
Is there a way I can reseed one table and not reset my whole dang database?
bklane has quit [Read error: Connection reset by peer]
NivenHuH has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
wald0 has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n80 has joined #ruby
gfawcettpq has quit [Ping timeout: 244 seconds]
bklane has joined #ruby
jmignault has quit [Ping timeout: 245 seconds]
nahob has quit [Client Quit]
bklane has quit [Read error: Connection reset by peer]
bklane has joined #ruby
oki has quit [Ping timeout: 245 seconds]
tris has quit [Quit: Leaving]
abuzze has quit []
genpaku has quit [Ping timeout: 265 seconds]
xaxisx has quit [Quit: xaxisx]
genpaku has joined #ruby
g0bl1n has quit [Quit: g0bl1n]
<shadoi1>
write a script :)
startupality has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
werelivinginthef has joined #ruby
willgorman has quit [Ping timeout: 246 seconds]
jshultz has joined #ruby
yh has quit [Ping timeout: 252 seconds]
yh has joined #ruby
Asher has joined #ruby
ki0 has joined #ruby
OrbitalKitten has joined #ruby
CorySimmons has quit [Quit: Bye!]
foureight84 has joined #ruby
mistermocha has joined #ruby
ki0 has quit [Read error: No route to host]
werelivinginthef has quit [Ping timeout: 246 seconds]
zachrab has quit [Remote host closed the connection]
freerobby has joined #ruby
freerobby has quit [Client Quit]
zachrab has joined #ruby
RegulationD has quit [Remote host closed the connection]
zenith_ has quit [Ping timeout: 244 seconds]
tris has joined #ruby
speakingcode has quit [Remote host closed the connection]
ismaelga has quit [Ping timeout: 264 seconds]
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
atmos_varoufitsa is now known as atmosx
Mon_Ouie has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maximski has joined #ruby
Soda has quit [Remote host closed the connection]
zachrab has quit [Ping timeout: 255 seconds]
genpaku has quit [Ping timeout: 240 seconds]
jerematic has quit [Remote host closed the connection]
scripore has joined #ruby
maximski has quit [Read error: Connection reset by peer]
speakingcode has joined #ruby
maximski has joined #ruby
<scripore>
anyway I can change ["self.id", "self.name"] to [self.id, self.name] ?
allcentury has quit [Ping timeout: 265 seconds]
maximski has quit [Max SendQ exceeded]
cjim__ has joined #ruby
bigmac has joined #ruby
genpaku has joined #ruby
mleung_ has joined #ruby
mleung has quit [Ping timeout: 246 seconds]
mleung_ is now known as mleung
<apeiros_>
scripore: eval. and yes, it's bad.
<scripore>
oh, okay, thanks
commmmodo has joined #ruby
maximski has joined #ruby
<apeiros_>
maybe rethink your problem so you don't end up having to eval?
<apeiros_>
e.g. with ["id", "name"] it'd be public_send, much better.
cjim__ has quit [Client Quit]
<yxhuvud>
hmm. the only one in the eval family I tend to use is instance_exec.
<yxhuvud>
or well, tend to may be a bit strong, but at least it exist in the code base
cjim_ has quit [Ping timeout: 252 seconds]
<apeiros_>
it's funny - back in 1.8, I missed instance_exec dearly. but now I almost never use it. it's almost always instance_eval.
<TheNet>
eval is nice when you're doing dynamic method calls
<apeiros_>
TheNet: no. absolutely not.
<apeiros_>
TheNet: that's precisely the thing you use public_send for.
speakingcode has quit [Remote host closed the connection]
<baweaver>
+1 ^
<baweaver>
eval is asking for a massive security hole
<TheNet>
apeiros_: sorry that's actually what I was thinking of
cjim__ has joined #ruby
<TheNet>
I don't know why I thought that was eval
ndrei has quit [Ping timeout: 255 seconds]
<baweaver>
minimize dynamics as much as possible, including send type methods
cr3 has joined #ruby
jottr has joined #ruby
bklane has quit [Read error: Connection reset by peer]
<cr3>
hi folks, I just tried to install rvm under /opt/rvm but the rvm bin ends up in /opt/rvm/bin/rvm/bin/rvm... wtf?
blackmesa has quit [Ping timeout: 272 seconds]
willgorman has joined #ruby
ndrei has joined #ruby
<yxhuvud>
apeiros: btw, what do you mean by missing instance_exec? it existed during 1.8
<yxhuvud>
or was it introduced sometime during it? Hmm.
bklane has joined #ruby
allcentury has joined #ruby
xaxisx has joined #ruby
C1V0 has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
<apeiros_>
yxhuvud: 1.8.7 was the first to have it
<scripore>
apeiros: I might stick with eval for now and refactor later. this is just for a school assignment.
<tubuliferous>
Hey folks, I have a regular expression question...
<apeiros_>
and that was about 5y after I started ;-)
dc_ has quit [Remote host closed the connection]
<tubuliferous>
I have this line:
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tubuliferous>
excuse me, this string:
<tubuliferous>
text1text2|||A|BA|BA|BA|BA|BA|B
<tubuliferous>
and I want to replace all of the pipes between the As and Bs with tabs
<apeiros_>
tubuliferous: String#tr
maximski has quit [Ping timeout: 252 seconds]
tearan_ has joined #ruby
commmmodo has quit [Quit: commmmodo]
yfeldblum has joined #ruby
jottr has joined #ruby
baweaver has quit [Remote host closed the connection]
bklane has quit [Ping timeout: 265 seconds]
allcentury has quit [Ping timeout: 265 seconds]
Inv1s1ble has joined #ruby
maximski has joined #ruby
teddyp1c_ has quit [Remote host closed the connection]
maximski has quit [Max SendQ exceeded]
SumoBoy has quit [Quit: Leaving]
<tubuliferous>
well...this one is particularly tricky, apeiros_...
naftilos76 has joined #ruby
<tubuliferous>
that line is representative of many lines that I need to loop through...
maximski has joined #ruby
kadoppe has quit [Ping timeout: 264 seconds]
tearan has quit [Ping timeout: 265 seconds]
maximski has quit [Max SendQ exceeded]
<Inv1s1ble>
huh..there's a logic error in here and I can't figure it out. It looks identical to a validation block below it that works, so I must just have an incorrect something: http://paste.dollyfish.net.nz/2ca935
<tubuliferous>
I was just doing a string.gsub("|", "\t") on each line...
blackmesa has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<tubuliferous>
until I noticed the three pipes after text2
<Inv1s1ble>
It should check that if @options[:fixtures] is present, that it exists in FIXTURES
ismaelga has joined #ruby
<tubuliferous>
so basically I want to gsub everything after those three pipes
bklane has joined #ruby
<tubuliferous>
I can't think of a good way to do it
iamjarvo has joined #ruby
<apeiros_>
tubuliferous: can you think of a bad way to do it?
<tubuliferous>
hahaha...yes
<apeiros_>
gist it
Takle has joined #ruby
<tubuliferous>
gist?
commmmodo has joined #ruby
<tubuliferous>
oh, the bad way?
<tubuliferous>
you want to hear my bad way?
kadoppe has joined #ruby
<apeiros_>
yes
<tubuliferous>
I could split each line into an array on the tabs...
BTRRY has joined #ruby
tearan_ has quit [Read error: Connection reset by peer]
<tubuliferous>
then for each element starting with array[2] do the replacement
BTRE has quit [Read error: Connection reset by peer]
mwlang has joined #ruby
<tubuliferous>
so...
dc_ has joined #ruby
dfinninger has quit [Remote host closed the connection]
<apeiros_>
you mean, split it on the pipes?
Pupeno_ has joined #ruby
<tubuliferous>
nah...
<tubuliferous>
I'll send you the code...one second =)
<mwlang>
Does anyone know how long net-ldap’s Net::LDAP.new holds a connection? I’m integrating some LDAP lookups into a Rails app and I’m not sure if I can just initialize and bind the LDAP connection at app start up or if I need to plan to handle reconnectining.
<apeiros_>
tubuliferous: gist.github.com
Flcn has joined #ruby
<tubuliferous>
oh, got it
<tubuliferous>
I've never used gist
<tubuliferous>
thanks for the link
maximski has joined #ruby
<tubuliferous>
just a minute more...
makerop has joined #ruby
maximski has quit [Max SendQ exceeded]
<makerop>
can anyone point me on a primer to testing gems?
Hijiri has quit [Quit: WeeChat 1.0.1]
<makerop>
im having some trouble with private methods
piotrj has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 265 seconds]
maximski has joined #ruby
thiagovsk has joined #ruby
<mwlang>
makerop: testing private methods is a little tricky. You’ll have to use #send to trigger them from outside the object’s scope.
maximski has quit [Max SendQ exceeded]
DerisiveLogic has quit [Ping timeout: 256 seconds]
<makerop>
mwlang, I actually am doign that
<makerop>
but, it doesnt want to seem to work
<makerop>
let me gist really quick
<mwlang>
makerop: ok
Olipro_ has joined #ruby
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
<jhass>
well, private methods should be for internal organization, from callers perspective their behavior is part of the public API that calls them internally
bigmac has quit [Read error: Connection reset by peer]
<makerop>
jhass, I didnt write it, im just trying to adapt the tests
<makerop>
er...write the tests
<makerop>
but, what's considered a global in this context?
<shadoi1>
$root_url
<shadoi1>
make it constant
maximski has joined #ruby
<makerop>
it's not a constant though
<jhass>
or an instance variable
<shadoi1>
if it's not a constant then it's ripe for bugs as a global.
maximski has quit [Client Quit]
<jhass>
makerop: anyway, that private method is part of get_resource's behavior
<TheNet>
is there a way to define a rescue block for all of the methods in a class/module?
<jhass>
no
<makerop>
it's part of get_resources?
<jhass>
I see no other call to it
<makerop>
I thoguth it was a function of ServiceNow::Facter.new
BTRRY is now known as BTRE
<apeiros_>
tubuliferous: alternative suggestion: left, right = str.split("|||", 2); line = "#{left}|||#{right.tr("|", "\t")}"
<makerop>
there is a priavte method check_configuration
hgl has quit [Ping timeout: 272 seconds]
<tubuliferous>
holy moly
<jhass>
oh, you posted unrelated code?
jenrzzz has joined #ruby
<makerop>
every time you instantiate ServiceNow::Facter.new, it calls check_configuration
<tubuliferous>
good idea, apeiros_
<tubuliferous>
thanks!
<makerop>
jhass, no it's all related
Olipro_ has quit [Excess Flood]
<makerop>
configuartion and facter are in lib/
<jhass>
makerop: anyway, then it's part of self.where and #initialize
<jhass>
now let me please no longer look at that mess
decoponio has quit [Quit: Leaving...]
Olipro_ has joined #ruby
hgl has joined #ruby
Hijiri has joined #ruby
bklane has quit [Ping timeout: 256 seconds]
gregf has joined #ruby
rodfersou has quit [Quit: leaving]
ojacobson has joined #ruby
dfinninger has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
ismaelga has quit [Ping timeout: 272 seconds]
bklane has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamjarvo has joined #ruby
yfeldblum has quit [Remote host closed the connection]
dandaman has quit [Quit: Leaving.]
ojacobson_ has quit [Ping timeout: 264 seconds]
zacts has quit [Quit: leaving]
Olipro_ has quit [Ping timeout: 252 seconds]
reinaldob has quit [Remote host closed the connection]
elaptics_away is now known as elaptics
reinaldob has joined #ruby
paulfm has quit [Quit: Zzzzz...]
aclearman037 has quit [Quit: I'm out!]
kromm has joined #ruby
bigmac has quit [Read error: No route to host]
MasterPiece has quit [Remote host closed the connection]
ismaelga has joined #ruby
iwaffles has quit [Quit: iwaffles]
yeticry has quit [Ping timeout: 256 seconds]
FooMunki_ has quit [Quit: FooMunki_]
yeticry has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
bklane has quit [Read error: Connection reset by peer]
startupality has quit [Quit: startupality]
brb3 has quit [Quit: <.<]
gccostabr has quit [Quit: ZZZzzz…]
<sparr>
I'm not sure if this is a ruby or rails or passenger problem... When passenger is refusing connections and spamming my apache error log with "Cannot accept client: Too many open files (errno=24). Stop accepting clients for 3 seconds.", what can cause that if my ruby code doesn't open a lot of files? Is there a way to find out what file(s) it's trying and failing to open?
maximski has joined #ruby
lanemeyer has joined #ruby
<apeiros_>
sparr: you can use lsof to figure which files are open
<apeiros_>
sparr: your app is probably leaking file handles. i.e. you open them and don't close them
<jhass>
note that "file" might mean file descriptor here, so sockets too
bluOxigen has quit [Ping timeout: 256 seconds]
reinaldob has quit [Ping timeout: 264 seconds]
maximski has quit [Max SendQ exceeded]
scripore has joined #ruby
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
maximski has joined #ruby
dotix has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
maximski has quit [Max SendQ exceeded]
last_staff has quit [Quit: last_staff]
bklane has joined #ruby
maximski has joined #ruby
roshanavand has joined #ruby
<a5i>
Lotusrb!
maximski has quit [Max SendQ exceeded]
<dotix>
hello! is there any functional hack to multiply first two and last two elemnts of array, then add the result? [1,2,3,4] => 1*2 + 3*4
cr3 has left #ruby [#ruby]
maximski has joined #ruby
dandaman has joined #ruby
<jhass>
dotix: honestly, I'd just expand it, a, b, c, d = ary; a*b + c*d
<jhass>
with proper variable names describing your data
lektrik has quit [Ping timeout: 244 seconds]
maximski has quit [Max SendQ exceeded]
sevvie has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby
maximski has joined #ruby
<dotix>
yes, that's my current version. Thought that maybe is anything more idiomatic
maximski has quit [Max SendQ exceeded]
Olipro_ has joined #ruby
<workmad3>
dotix: if you need to ignore intermediate vars, you can do 'a, b, *, c, d = ary'
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
shadeslayer has quit [Ping timeout: 264 seconds]
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
baweaver has joined #ruby
maximski has joined #ruby
Ankhers has quit [Ping timeout: 256 seconds]
maximski has quit [Max SendQ exceeded]
<workmad3>
dotix: the ways I can think of to do it with enumerator methods are uglier than 'a,b,c,d = ary; a * b + c * d' though
xpoqp has left #ruby ["WeeChat 1.1.1"]
zorak8 has joined #ruby
* apeiros_
see's zip & inject glowing up in workmad3's eyes
zachrab has joined #ruby
rbennacer has quit [Ping timeout: 272 seconds]
Morkel has quit [Quit: Morkel]
maximski has joined #ruby
<apeiros_>
stop the crazy! now, while you still can!
<dotix>
:D
<workmad3>
dotix: e.g. ary[0,2].inject(&:*) + ary[-2,2].inject(&:*)
<dotix>
can't see how your version will work workmad3
<apeiros_>
what? no zip? me disappoint
<dotix>
yes but that's quite ugly
maximski has quit [Max SendQ exceeded]
<workmad3>
apeiros_: my first even worse version used each_slice(2) ;)
<bricker>
I prefer to "enforce" the visibility of a method
<jhass>
a good developer will take at least a peak at the docs and be cautious about using private API, whether doing so involves send or not
<jhass>
the positive part about send is, that if you use public_send for meta programming purposes it's easy to grep for
<bricker>
jhass: also with just the doc method you don't get some niceties, like `respond_to?` respecting private methods
<bricker>
same with #methods()
<bricker>
jhass: i.e. if I type `my_obj.methods` and see a method listed there, I assume it's public and won't always check the documentation for every single method I call
roolo_ has joined #ruby
<jhass>
anyway, I usually don't bother whether private methods use instance data or not, I just make them instance methods
<jhass>
it's rare to have them on a class while calling them from both, class and instance level methods
juanpaucar has quit [Remote host closed the connection]
<jhass>
those usually are good candidates for a helper module anyway
d10n-work has quit [Quit: Connection closed for inactivity]
juanpaucar has quit [Ping timeout: 246 seconds]
piotrj has joined #ruby
granitosaurus has joined #ruby
phutchins has quit [Ping timeout: 264 seconds]
Stalkr_ has quit [Quit: Leaving...]
aspiers has joined #ruby
DerisiveLogic has quit [Ping timeout: 252 seconds]
psyprus has quit [Changing host]
psyprus has joined #ruby
tgunr has joined #ruby
willgorman is now known as willgorman|away
tvw has joined #ruby
<granitosaurus>
Hi, quick question, how do I run a ruby gem?
<jhass>
granitosaurus: depends on the gem
<jhass>
its readme should have an example
foureight84 has quit [Quit: Be back later ...]
<granitosaurus>
I'm currently trying to set up https://github.com/frosas/spotify-to-mp3 however my distro set up a bit differently so the setup there fails to sys link I guess
alem0lars has quit [Ping timeout: 252 seconds]
<jhass>
can you be less vague? Like a lot less vague?
nicolastarzia has quit [Remote host closed the connection]
jespada has joined #ruby
shazaum has quit [Quit: Leaving]
spyderman4g63 has quit [Read error: Connection reset by peer]
c130b128 has joined #ruby
riotjone_ has joined #ruby
c130b128 has left #ruby [#ruby]
spyderman4g63 has joined #ruby
cpt_yossarian has quit [Ping timeout: 256 seconds]
<jhass>
granitosaurus: so if you want any help you need to actually describe what your setup is, what steps you took and which one failed and how it failed (by showing error messages)
yfeldblum has quit [Remote host closed the connection]
relix has joined #ruby
yfeldblum has joined #ruby
heyimwill has quit [Ping timeout: 252 seconds]
DLSteve has joined #ruby
mpeck has joined #ruby
giuseppesolinas has quit [Quit: Leaving]
ghostpl_ has quit [Remote host closed the connection]
krasnus has quit [Ping timeout: 276 seconds]
<granitosaurus>
jhass: I'm running opensuse 13.2 with ruby and rubygems at 2.1
gphummer has joined #ruby
tier has quit [Remote host closed the connection]
<gphummer>
Hi all - I just started using rbenv. Why does ruby -v say I’m using version 2.0.0 but rbenv which ruby say I’m using 2.2.1?
bigmac has joined #ruby
<granitosaurus>
I've installed the gem that I need via "gem install spotify-to-mp3" and it does appear on "gem list" command but I don't have a clue how to actually execute it
Aswebb__ has quit [Remote host closed the connection]
<wallerdev>
theyll probably pay
<zerodayz>
if someone hack there server and corrupt the download file
<jhass>
ah, good ole ftp is shitty again?
<zerodayz>
i Did it for other website and tool like Google chrome browser
<wallerdev>
you hacked google and uploaded a corrupt chrome browser for everyone to download?
<wallerdev>
honestly if you really want money you should contact the owner of ruby-lang.org
<bradland>
zerodayz: Ruby is a community project without the resources of a large company, so it is unlikely that there is a bug bounty for website vulnerabilities.
<wallerdev>
and see if they will pay you
Nuck has joined #ruby
<wallerdev>
if not you're SOL
<wallerdev>
no one here is going to pay you haha
Yzguy has joined #ruby
zachrab has quit [Remote host closed the connection]
Yzguy has quit [Max SendQ exceeded]
<bradland>
but the community would certainly appreciate any contribution you'd be willing to make, such as disclosing the website vulnerability through the security page
Nuck has quit [Max SendQ exceeded]
<jhass>
actually you can have my prime coins
<miah>
ruby is one of the things you report on for the good of the community
zachrab has joined #ruby
Yzguy has joined #ruby
<miah>
ibm / google is who you ask for money, because they're large corporate entities
<wallerdev>
+1
Nuck has joined #ruby
<mwlang>
ah, ha! So, VCR *only* intercepts HTTP requests….is that correct?
<zerodayz>
Ok
<wallerdev>
although i think ibm is going broke
<mwlang>
I was trying to set up VCR to capture LDAP requests for the Ruby Net::LDAP connector
<wallerdev>
didnt they just lay off a ton of people
<jhass>
wallerdev: try to find out who runs the mailserver for lufthansa
<miah>
wallerdev: they have been shedding employees for like 20 years now
<wallerdev>
lol
<miah>
every year
<miah>
they got out of a ton of businesses too
<wallerdev>
oh well
<wallerdev>
my friend used to work for them at one point
<miah>
ya same
<jhass>
wallerdev: it's out sourced to lufthansa services or something which, out sourced it to IBM which seem to have it outsouced back to them onto their cloud that's just reselling IBM hardware
<miah>
i know lots of people that used to work for them
<miah>
ive done a little with net::ldap, i never tried to use vcr with it though