chills42 has quit [Remote host closed the connection]
martinbmadsen has joined #ruby-lang
kyb3r_ has joined #ruby-lang
martinbm1dsen has quit [Ping timeout: 245 seconds]
ta has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
spuk has quit [Ping timeout: 264 seconds]
ta has quit [Ping timeout: 276 seconds]
<pipework>
havenwood: If I have a class Lame, and it implements #hi, and I prepend a module which defined #hi as something else, is there a way to ever reach the #hi from Lame?
<pipework>
Because I can't figure it out. :(
kadwill has joined #ruby-lang
jxie has quit [Ping timeout: 264 seconds]
jxie has joined #ruby-lang
kadwill has quit [Ping timeout: 272 seconds]
AKASkip has joined #ruby-lang
kalehv has quit [Remote host closed the connection]
<sivsushruth>
thank you for going through the trouble
<sivsushruth>
epitron: Thanks
|jemc| has quit [Ping timeout: 245 seconds]
ta has joined #ruby-lang
ur5us has quit [Ping timeout: 256 seconds]
|jemc| has joined #ruby-lang
ta_ has joined #ruby-lang
<epitron>
ok, sec
ta has quit [Ping timeout: 276 seconds]
<epitron>
now, when i run it, i still get spammed with those COLOR warnings... gemgrapher then outputs a dependency graph png, but it's like 1 pixel large
wallerdev has quit [Quit: wallerdev]
<epitron>
sorry, 11x11
<sivsushruth>
hmm..
<sivsushruth>
i do not get any warnings
rahul_j has joined #ruby-lang
<sivsushruth>
and i get a proper image
<sivsushruth>
it is just too wide
<sivsushruth>
but you can zoom in and see them
<epitron>
ah, it works on a different project
<sivsushruth>
okay
<sivsushruth>
what do you suggest i do
<sivsushruth>
to improve this
<epitron>
also, your hash has duplicate keys
<epitron>
you can regenerate it pretty easily though
duderonomy has quit [Ping timeout: 244 seconds]
<sivsushruth>
right
<sivsushruth>
okay..
<epitron>
just evaluate the hash with duplicates, then "pp hash"
<epitron>
:)
<epitron>
that'll prettyprint it without duplicates
<sivsushruth>
right
<sivsushruth>
makes sense
lytol has quit [Remote host closed the connection]
<sivsushruth>
any other suggestions ?
<epitron>
...instructions
<epitron>
like
<epitron>
i mean, i guess it's fine
womble has quit [Excess Flood]
womble has joined #ruby-lang
<epitron>
but it should at least say, "Made a file called Dependency Graph.png"
<epitron>
and respond to --help
<epitron>
also, it might look prettier if the root node was your project itself
<epitron>
i have free floating gems
<sivsushruth>
right
<sivsushruth>
right
<sivsushruth>
thanks for the suggestions
<epitron>
radial layout would be good too
<sivsushruth>
yeah
<sivsushruth>
i was wondering how to do that
<epitron>
gem in center
<epitron>
haha
<epitron>
i dunno
<epitron>
graphviz is pretty shitty
<sivsushruth>
yeah
<sivsushruth>
seems like it
<epitron>
you should use d3
<sivsushruth>
checking alternatives
<sivsushruth>
do you have time to contribute ?
<epitron>
make it all web-based, and then roll it into rubygems.org :)
<sivsushruth>
or no ?
<epitron>
nah
<epitron>
i got some other things i need to finish
martinbmadsen has quit [Ping timeout: 245 seconds]
fujimura has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
yusuf1 has quit [Quit: Leaving.]
hahuang65 has quit [Quit: WeeChat 1.0.1]
hahuang65 has joined #ruby-lang
nofxx has quit [Ping timeout: 244 seconds]
ta has joined #ruby-lang
_mh_ has quit [Changing host]
_mh_ has joined #ruby-lang
fujimura has joined #ruby-lang
arBmind1 has joined #ruby-lang
banister has joined #ruby-lang
arBmind has quit [Ping timeout: 246 seconds]
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby-lang
ta has quit [Ping timeout: 276 seconds]
hahuang65 has quit [Quit: WeeChat 0.4.2]
heftig has quit [Quit: heftig]
heftig has joined #ruby-lang
loincloth has joined #ruby-lang
nofxx has joined #ruby-lang
loincloth has quit [Ping timeout: 264 seconds]
sangwoojoo has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
sangwoojoo has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby-lang
ta has joined #ruby-lang
kadwill has joined #ruby-lang
<yorickpeterse>
mornign
<yorickpeterse>
derp
<yorickpeterse>
morning
ta has quit [Ping timeout: 265 seconds]
<yorickpeterse>
"New Error: NameError: wrong constant name AN ERROR OCCURRED. A TEAM OF GARDEN GNOMES HAS BEEN DISPATCHED TO LOOK INTO THE PROBLEM."
<yorickpeterse>
what a fine morning it is
houhoulis has quit [Remote host closed the connection]
kadwill_ has joined #ruby-lang
vozcelik has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlovell has joined #ruby-lang
jds has joined #ruby-lang
<tbuehlmann>
moin
<apeiros>
Garden Gnomes are not reliable! They don't scale! how are you still using them?!?
<canton7>
NOT WEB SCALE!
<canton7>
they're GARDEN scale
<apeiros>
they've also proven to not be zombie resistant!!!
fujimura has quit [Remote host closed the connection]
<yorickpeterse>
also yay migrate all the things to Postgres
migbar has joined #ruby-lang
marr has joined #ruby-lang
<apeiros>
I heard you role with postgres
fujimura_ has joined #ruby-lang
<yorickpeterse>
huehue
kadwill has quit [Remote host closed the connection]
<yorickpeterse>
It didn't GRANT me a nice day
<yorickpeterse>
hehehe
* apeiros
snickers
kadwill has joined #ruby-lang
<surrounder>
laawl
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ljarvis>
heh
<ljarvis>
nerds
fujimura has joined #ruby-lang
kl__ has joined #ruby-lang
fujimura_ has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby-lang
<yorickpeterse>
oh hey, somebody is submitting porn links to our public NLP services
duderonomy has quit [Max SendQ exceeded]
kadwill_ has quit [Remote host closed the connection]
<yorickpeterse>
"input: xhamster.com....../vol22
<yorickpeterse>
so apparently there are 22 volumes
<yorickpeterse>
Not sure why you'd want to send a URL of an HTML document for sentiment analysis
kadwill has quit [Ping timeout: 256 seconds]
<jds>
Is there a definitive list of exceptions you might get while using Net::HTTP? So far I've run into Errno::ETIMEDOUT, Errno::ECONNRESET, Errno::ECONNREFUSED, Errno::EHOSTUNREACH, SocketError, OpenSSL::SSL::SSLError, EOFError ...
<ljarvis>
you could just rescue => e which will rescue everything that inherits from StandardError
GBrawl has quit [Remote host closed the connection]
GBrawl has joined #ruby-lang
loincloth has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
martinium has joined #ruby-lang
yorickpeterse is now known as devops-peterse
loincloth has quit [Ping timeout: 240 seconds]
dagda1 has joined #ruby-lang
djbkd has joined #ruby-lang
j4cknewt has joined #ruby-lang
<devops-peterse>
all aboard the Linux server train
<devops-peterse>
toot toot
iamninja has joined #ruby-lang
martinium has quit [Ping timeout: 256 seconds]
donove has joined #ruby-lang
donove has joined #ruby-lang
djbkd has quit [Ping timeout: 246 seconds]
j4cknewt has quit [Ping timeout: 240 seconds]
martinium has joined #ruby-lang
martinium has joined #ruby-lang
martinium has quit [Remote host closed the connection]
rahul_j has quit [Quit: rahul_j]
martinium has joined #ruby-lang
ta has joined #ruby-lang
rahul_j has joined #ruby-lang
terabytest has joined #ruby-lang
ta has quit [Ping timeout: 265 seconds]
kadwill has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
kadwill has joined #ruby-lang
kadwill has quit [Remote host closed the connection]
ldnunes has joined #ruby-lang
terabytest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
* whitequark
slaps devops-peterse around a bit with a large trout
kadwill has joined #ruby-lang
ta has joined #ruby-lang
martinbmadsen has joined #ruby-lang
Bwild has quit [Ping timeout: 255 seconds]
migbar has quit [Read error: Connection reset by peer]
Bwild has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
martinbmadsen has quit [Ping timeout: 245 seconds]
ur5us has quit [Remote host closed the connection]
Bwild has quit [Ping timeout: 265 seconds]
kl__ has quit [Ping timeout: 244 seconds]
kadwill has quit [Remote host closed the connection]
Bwild has joined #ruby-lang
booly-yam-8846 has quit [Ping timeout: 264 seconds]
kl has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
kadwill has joined #ruby-lang
qsuscs has joined #ruby-lang
<qsuscs>
hi
kadwill has quit [Remote host closed the connection]
<qsuscs>
are similar incompatibities between ruby versions like between python 2 and 3?
<qsuscs>
or are the newer versions just “extensions” and a program written for 1.8 works with 2.2 as well?
frzng has joined #ruby-lang
<workmad3>
qsuscs: ruby 1.8 to ruby 1.9 had some backwards incompatibility, but ruby 1.8 is now EoL
<ljarvis>
qsuscs: the changes are nowhere near as breaking as Python 2 to 3
<ljarvis>
but, they do exist
<qsuscs>
workmad3: how widespread is 1.8? i mean, python 2 is still widely used and there are even recent tutorials/books that say “don’t care about py3, py2 is what matters, 3 is just new stuff and will not be used before $TIME”
<workmad3>
qsuscs: I think you may be the first person I've seen in here this year asking about 1.8 ;)
<qsuscs>
good
<workmad3>
qsuscs: there's been a lot more success getting people to shift from ruby 1.8 to 1.9 and beyond than there was in python getting from 2 to 3
<waxjar>
1.8 is old and EOL; itdoesn't receive updates any more
<waxjar>
that includes security issues.
GBrawl has quit [Quit: (null)]
loincloth has joined #ruby-lang
banister has joined #ruby-lang
rahul_j has joined #ruby-lang
<darix>
qsuscs: it depends. many enterprise distros e.g. still ship with 1.8
<darix>
qsuscs: largely due to the fact that newer ruby versions were not drop it replacements.
<waxjar>
between 1.8 and 2.2 performance has also roughly doubled :D i think its safe to assume the vast majority is one 1.9 or higher
<waxjar>
*on
<darix>
qsuscs: many of those distros now have packages for newer ruby versions for parallel installation though.
<darix>
but something to keep in mind
ta has quit [Ping timeout: 256 seconds]
<darix>
waxjar: and please say "doesnt receive updates from upstream anymore" the distros very well backport the fixes
<waxjar>
ah, fair enough :)
loincloth has quit [Ping timeout: 256 seconds]
<workmad3>
they don't receive official updates from ruby core team would be more accurate
<darix>
so now that this is solved.
<ljarvis>
he didn't say "from upstream"
devops-peterse is now known as yorickpeterse
<ljarvis>
he said 1.8 is EOL and doesn't receive updates anymore, which is accurate
<darix>
a more interesting question: some people were pondering to put a python 2 mode into python 3 so they can at least drop the python2 code base.
<darix>
how hard would it be to make a mode for ruby 2.2 to eat 1.8 code?:)
<workmad3>
darix: tbh, I find the python2-python3 debate more vaguely amusing than particularly interesting :)
<ljarvis>
i hope that never happens
<darix>
workmad3: ruby should have had the same debate tbh. because they did exactly the same on the step from 1.8 to 1.9/2.0
kadwill has joined #ruby-lang
<workmad3>
darix: it did have the debate... it then ploughed through it, supported the old version for quite some time and eventually dropped it
iamninja has quit [Quit: ZZZzzz…]
<workmad3>
darix: the python2/python3 thing has been going on for way too long now though... iirc, python3 came out before ruby 1.9, and it's *still* not gaining much traction
<darix>
workmad3: as you see the pressure for python 2 is even higher than it was with ruby 1.8
<whitequark>
p2 supported until 2020
<ljarvis>
the breaking changes in 1.8 to 1.9 were stupid, but breaking anything in a major release is exactly where it should happen.. python got this right, ruby got it wrong
<workmad3>
darix: hence vaguely amusing and of no particular interest :)
fujimura has quit [Remote host closed the connection]
<darix>
whitequark: or longer if any larger python using org steps up^^
<workmad3>
ljarvis: at the time, ruby did have an explicit version policy of 1.9 being a '2.0 pre-release' I believe... it wasn't on semver at the time (unlike now)
<ljarvis>
workmad3: yep, my comment still applies though :)
<workmad3>
ljarvis: yeah, but the explicitness at the time makes it a bit of a weaker criticism than if they'd been on something like semver and did it ;)
<ljarvis>
workmad3: right, it's more of a personal statement
<ljarvis>
but maybe then we'd have the problem p2 to p3 has
<ljarvis>
who knows
<workmad3>
ljarvis: yeah... and 1.9 was a useful testing ground... but it should probably have lasted a bit less time before ruby 2.0 got released so it really was more of a '2.0-pre' :)
<workmad3>
I think the p2-p3 issue is because the maintainers are too busy letting the community resist the change tbh... and I think the python community is a bit more change-adverse than the ruby community too
<waxjar>
i think matz said something along the lines of "backwards incompatible changes should come with an incentive to update"
<waxjar>
for ruby that has mostly been performance i think
<workmad3>
waxjar: well, 1.8 to 1.9 was more enumerators and official encoding support :)
<waxjar>
also good incentives :D
<ljarvis>
quite some significant syntax changes, too
<ljarvis>
actually ruby doesn't change syntax
<ljarvis>
it just bolts on new syntax
<workmad3>
ljarvis: maybe it's because it's been so long since I used 1.8, but I can't remember changes... just additions :)
<ljarvis>
:P
<ljarvis>
1.8.2 was the defacto Ruby
<darix>
i even had to maintain a ruby 1.4 package for a while
<workmad3>
I started using ruby professionally around about 1.8.6, I think
<darix>
ljarvis: i think there were some syntax breakages after 1.8
<ljarvis>
I do remember much time spent on ruby 1.4 too
stamina has joined #ruby-lang
<workmad3>
still... it's 2015 now... can we finally put an 11 year old version to bed? :)
ledestin has joined #ruby-lang
<whitequark>
waxjar: 1.9 is slower actually
<whitequark>
even 2.0 is slower. I think only in 2.1/2.2 you regain it back
sivsushruth has joined #ruby-lang
<waxjar>
hmm, really?
<whitequark>
I think so, yes
rbowlby has joined #ruby-lang
sangwoojoo has quit [Ping timeout: 276 seconds]
leonshalimov has joined #ruby-lang
booly-yam-8846 has joined #ruby-lang
timanema has joined #ruby-lang
sangwoojoo has joined #ruby-lang
djellemah has quit [Quit: Leaving]
leonshalimov has quit [Ping timeout: 246 seconds]
kadwill has quit [Remote host closed the connection]
timanema has quit [Ping timeout: 252 seconds]
nofxx has quit [Ping timeout: 252 seconds]
ledestin has quit [Quit: ledestin]
mostlybadfly has joined #ruby-lang
workmad3_ has joined #ruby-lang
<darix>
workmad3: look when RHEL/SLES are eol
<darix>
workmad3: that's when we can finally put it to bed ;)
workmad3 has quit [Ping timeout: 240 seconds]
Bwild has quit [Ping timeout: 265 seconds]
rbowlby has quit [Remote host closed the connection]
JohnBat26 is now known as JohnBat26|NotHer
JohnBat26|NotHer is now known as JohnBat26
JohnBat26 is now known as JohnBat26|NotHer
Bwild has joined #ruby-lang
workmad3_ is now known as workmad3
kadwill has joined #ruby-lang
fclausen has joined #ruby-lang
sangwoojoo has quit [Quit: Leaving.]
gwendall has joined #ruby-lang
DEac- has quit [Quit: leaving]
DEac- has joined #ruby-lang
GBrawl has joined #ruby-lang
kalzz has quit [Ping timeout: 245 seconds]
Integralist has quit [Ping timeout: 245 seconds]
seank__ has quit [Read error: No route to host]
francisfish has quit [Ping timeout: 246 seconds]
seank_ has joined #ruby-lang
goddamnit2 has joined #ruby-lang
godd2 has quit [Disconnected by services]
goddamnit2 is now known as godd2
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
timanema has joined #ruby-lang
fusillicode has quit [Quit: Leaving.]
fclausen has quit [Ping timeout: 272 seconds]
francisfish has joined #ruby-lang
tkuchiki has quit [Ping timeout: 240 seconds]
kadwill has quit [Remote host closed the connection]
Asher has quit [Read error: Connection reset by peer]
<ruby-lang911>
My script depends on each other so to understand one properly you'd have to view all the files on my /rootshell project though
frzng has quit [Quit: frzng]
Asher has joined #ruby-lang
danromano has quit [Quit: Leaving]
Asher has quit [Read error: Connection reset by peer]
Asher2 has joined #ruby-lang
ascarter has joined #ruby-lang
kl has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
ascarter has quit [Read error: Connection reset by peer]
<jhass>
community standard is two spaces for indentation
ascarter has joined #ruby-lang
rcvalle has joined #ruby-lang
GBrawl has quit [Quit: (null)]
<ruby-lang911>
I don't understand that...
<jhass>
use string interpolation ("#{var}foobar") over String#+ (var+"foobar")
wprice has joined #ruby-lang
<ruby-lang911>
Because if I use only two spaces I wouldn't be able to understand my code myself, trust me.
lapide_viridi has joined #ruby-lang
<jhass>
did you try?
<jhass>
if foo == true -> if foo
<DefV>
jhass: well :-)
<jhass>
don't use $globals
<DefV>
could be he really needs to match true
<jhass>
unlikely
<DefV>
:D:D
<jhass>
if cond; var = true; else; var = false; end -> var = cond
<jhass>
DefV: ^ that's where it comes from
malconis has joined #ruby-lang
<ruby-lang911>
Okay, but what else would I use instead of global var to communicate with other methods though?
<jhass>
parameters and instance variables inside objects
lapideviridi has joined #ruby-lang
<ruby-lang911>
Thanks, will do.
<jhass>
.delete("\n") -> .chomp, in this case I think
Lapide has joined #ruby-lang
<ruby-lang911>
I don't understand that properly...
<jhass>
and many prefer && and || over and and or in conditions, although the consensus for that is not as big as for the others
<jhass>
check what String#chomp does then
<ruby-lang911>
Sure thing
klmlfl has joined #ruby-lang
lapide_viridi has quit [Ping timeout: 255 seconds]
lapideviridi has quit [Ping timeout: 244 seconds]
kadwill has quit [Remote host closed the connection]
AKASkip has quit [Ping timeout: 244 seconds]
<ruby-lang911>
Thanks you guys & bye for now!
ProR has quit [Ping timeout: 246 seconds]
chills42 has joined #ruby-lang
lapideviridi has joined #ruby-lang
martinium has joined #ruby-lang
martinium has joined #ruby-lang
cornerma1 has joined #ruby-lang
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dzejrou has joined #ruby-lang
ruby-lang911 has quit [Ping timeout: 246 seconds]
Lapide has quit [Ping timeout: 264 seconds]
cornerman has quit [Ping timeout: 245 seconds]
cornerma1 is now known as cornerman
ta has joined #ruby-lang
martinium has quit [Ping timeout: 264 seconds]
sivsushruth has quit [Ping timeout: 244 seconds]
<banister>
yorickpeterse hey what does "verkzekerdennummer" mean?
<banister>
surrounder you too ^ ;)
<banister>
ah it's verzekerdennummer
<banister>
insurance number
martinium has joined #ruby-lang
martinium has joined #ruby-lang
lapideviridi has quit [Quit: Leaving]
<yorickpeterse>
lrn2dutch
rahul_j has joined #ruby-lang
ta has quit [Ping timeout: 276 seconds]
revath has quit [Ping timeout: 256 seconds]
oleo has joined #ruby-lang
leonshalimov has joined #ruby-lang
martinbmadsen has joined #ruby-lang
mattyohe has joined #ruby-lang
futilegames has joined #ruby-lang
rthompso has joined #ruby-lang
ta has joined #ruby-lang
rthompso has quit [Client Quit]
martinbmadsen has quit [Ping timeout: 256 seconds]
leonshalimov has quit [Ping timeout: 256 seconds]
ur5us has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kalzz has quit [Ping timeout: 245 seconds]
Lewix has joined #ruby-lang
<[spoiler]>
So, boss told me I need to watch a handball game today... As part of my job.
Lewix has quit [Read error: Connection reset by peer]
<[spoiler]>
Okay
Lewix has joined #ruby-lang
ta has quit [Ping timeout: 276 seconds]
<yorickpeterse>
That sounds terrible
<yorickpeterse>
are you going to be ok?
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<[spoiler]>
We had a CDN issue yesterday, and he said I should keep an eye out if it happens again. I asked if he has anything in mind and he told me to watch the game. LOL
ur5us has quit [Ping timeout: 255 seconds]
Bwild has quit [Quit: leaving]
ta has joined #ruby-lang
timanema has joined #ruby-lang
meschi has quit [Remote host closed the connection]
simi has joined #ruby-lang
ta has quit [Ping timeout: 272 seconds]
kalzz has joined #ruby-lang
enebo has joined #ruby-lang
houhoulis has quit [Remote host closed the connection]
vondruch__ is now known as vondruch
leonshalimov has joined #ruby-lang
ta has joined #ruby-lang
ur5us has joined #ruby-lang
rbowlby has joined #ruby-lang
ur5us has quit [Ping timeout: 256 seconds]
ta has quit [Ping timeout: 272 seconds]
rahul_j has quit [Quit: rahul_j]
rbowlby has quit [Ping timeout: 255 seconds]
rahul_j has joined #ruby-lang
j4cknewt has joined #ruby-lang
hal_9000_ has quit [Quit: hal_9000_]
chills42 has quit [Remote host closed the connection]
whippythellama has joined #ruby-lang
ta has joined #ruby-lang
fjfish has quit [Remote host closed the connection]
futilegames_ has joined #ruby-lang
futilegames has quit [Ping timeout: 264 seconds]
futilegames_ is now known as futilegames
loincloth has joined #ruby-lang
DivineEntity has quit [Read error: No route to host]
jxie has quit [Ping timeout: 245 seconds]
loincloth has quit [Ping timeout: 272 seconds]
jxie has joined #ruby-lang
fujimura has quit [Read error: Connection reset by peer]
ta has quit [Ping timeout: 252 seconds]
fujimura has joined #ruby-lang
loincloth has joined #ruby-lang
DivineEntity has joined #ruby-lang
fujimura has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: zzz]
GBrawl has joined #ruby-lang
booly-yam-8846 has quit [Ping timeout: 245 seconds]
<ruby-lang249>
I have a hash that I'm calling delete_if on. Is there a way to just return true so that the element I'm checking is deleted?
ruby-lang509 has quit [Ping timeout: 246 seconds]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
viceroy has joined #ruby-lang
<viceroy>
hi
rippa has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
revath has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
<viceroy>
i've been wanting to know (i'm sorry if this comes off as extremely newbish) how Matz started making Ruby? what i mean is, what references, etc. did he use to design the actual language base?
ruby-lang249 has quit [Ping timeout: 246 seconds]
arBmind1 has quit [Read error: Connection reset by peer]
klmlfl has quit [Remote host closed the connection]
diegoviola has joined #ruby-lang
viceroy has quit [Quit: Page closed]
klmlfl has joined #ruby-lang
booly-yam-8846 has quit [Ping timeout: 240 seconds]
mattwildig has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
arBmind has joined #ruby-lang
Sadin has joined #ruby-lang
stardiviner has joined #ruby-lang
Lewix has quit [Read error: Connection reset by peer]
tkuchiki has quit [Ping timeout: 245 seconds]
Lewix has joined #ruby-lang
butterandguns has joined #ruby-lang
ddd has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
godzillaenlacasa has joined #ruby-lang
<godzillaenlacasa>
hi all... do you guys provide help here?
<workmad3>
godzillaenlacasa: we do if you stroke our egos enough
GBrawl has quit [Remote host closed the connection]
<godzillaenlacasa>
workmad3 haha... I'm sure there will be plenty of that throughout.
hotpancakes has joined #ruby-lang
rahul_j has joined #ruby-lang
<godzillaenlacasa>
New to the lang. I'm hoping to find some help using OptParse and case statements
kapil__ has quit [Quit: Connection closed for inactivity]
jgpawletko has joined #ruby-lang
butterandguns has quit [Quit: Page closed]
terabytest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3>
godzillaenlacasa: best way to start is by putting some code up on gist.github.com and asking your question about it (preferably avoid fake code)
<godzillaenlacasa>
I have two options... either -H (for host) or -R (for range)... one of them needs to be used when running my script and then a certain scan happen. https://gist.github.com/anonymous/6867e10380c41fdea124
<godzillaenlacasa>
I'm currently kicking up an error on line 66 since I haven't defined scan_type yet... problem is I'm not sure what to define it as
<workmad3>
godzillaenlacasa: you can just remove it
<ljarvis>
godzillaenlacasa: you just want `case`
<ljarvis>
and you can remove the != nil checks
<workmad3>
^^
chills42 has joined #ruby-lang
<godzillaenlacasa>
well damn... it's always easier than I think. lol
|jemc| has joined #ruby-lang
<workmad3>
godzillaenlacasa: if you provide a value to 'case' (like 'case scan_type' ) then each 'when' value is compared with it (using ===). If you use a raw 'case', then each 'when' value is just checked for truthy/falsey ness
ta has joined #ruby-lang
<godzillaenlacasa>
workmad3 ok, that makes sense
revath has quit [Read error: Connection reset by peer]
<ljarvis>
godzillaenlacasa: also, `nil` is the default hash value for a non existant object, so you don't need to set your option defaults to nil
<godzillaenlacasa>
ljarvis so if I don't define it, it's still nil ?
djellemah has quit [Read error: Connection reset by peer]
djellemah has joined #ruby-lang
<ljarvis>
ugh yard
ta has quit [Ping timeout: 272 seconds]
chills42 has quit [Remote host closed the connection]
stamina has quit [Ping timeout: 252 seconds]
<|jemc|>
somebody here littered our pipeline with yard tasks, so I can't complete any of it on 2.2.0
<yorickpeterse>
Yard doesn't work on 2.2?
chills42 has joined #ruby-lang
<|jemc|>
yorickpeterse: crashes on the keyword arg syntax shown in the bugs.ruby-lang ticket
<yorickpeterse>
blegh
<yorickpeterse>
hey folks I have a great idea, lets use Ripper for parsing
<ljarvis>
i have a better idea, lets use yardoc
Pugsley_ has joined #ruby-lang
<godzillaenlacasa>
other than the stuff you guys pointed out... how does the code look? Am I making it harder than it needs to be, or is it pretty ruby-ish?
svajone has joined #ruby-lang
svajone has quit [Client Quit]
<ljarvis>
godzillaenlacasa: well it's fine, but if both a range and a host are set, it'll only hit your host branch
apeiros has quit [Remote host closed the connection]
<godzillaenlacasa>
ljarvis because it hits that first in the case statement?
<ljarvis>
godzillaenlacasa: also, I'd recommend using a 2-space indent if you can
<ljarvis>
godzillaenlacasa: exactly
<ljarvis>
also, your passed variable is pointless
apeiros has joined #ruby-lang
<godzillaenlacasa>
ljarvis which passed variable?
<ljarvis>
godzillaenlacasa: the one capturing Timeout.timeout
<godzillaenlacasa>
ljarvis oh, so i can just do Timeout.timeout(5) do ...
<ljarvis>
there's no need to exit either, unless there's something else happening after this code. Since that's the default behaviour of the program
apeiros has quit [Ping timeout: 264 seconds]
<godzillaenlacasa>
ljarvis ok, so I changed it a bit after I got past the OptParser thing..... needed to check for an actual URI since just the IP address throws an error with the Net::HTTP.get_response https://gist.github.com/godzilla74/c74f5d292894ea62758f
Lewix has quit [Remote host closed the connection]
<godzillaenlacasa>
ljarvis otherwise need to prepend a 'http://' to make it an actual URI (line 16)
<ljarvis>
godzillaenlacasa: the code is very repetative, since it only cares about uri. Why not change the value of uri and then write the rest of the code once?
qsuscs has left #ruby-lang ["WeeChat 1.1-dev"]
<ljarvis>
uri = "http://#{uri}" unless uri.start_with?("http://")
hotpancakes has quit [Remote host closed the connection]
<godzillaenlacasa>
ljarvis oh, that's cool
<ljarvis>
you don't want include, since that'll return true for `foo/bar/http/something`
revath has joined #ruby-lang
<ljarvis>
in fact, you should use URI.parse
<godzillaenlacasa>
ljarvis URI.parse is on line 7, is that what you mean?
<ljarvis>
URI() is the same as URI.parse() btw, just habit I always use URI()
ta has joined #ruby-lang
<godzillaenlacasa>
ljarvis ok, so now I'm guessing using IPAddr.new isn't what I want to use since I'm getting a new error: `test_uri': undefined method `start_with?' for #<IPAddr: IPv4:192.168.0.1/255.255.255.255> (NoMethodError)
revath has quit [Read error: Connection reset by peer]
<ljarvis>
godzillaenlacasa: right :)
rahul_j has quit [Quit: rahul_j]
<godzillaenlacasa>
what's the recommended way to create an IP range then (192.168.1.0..10) -> [192.168.1.0, 192.168.1.1, ...]
<godzillaenlacasa>
djellemah that still prepends Object info (I think that's what it is..?) <IPAddr: IPv4:192.168.1.0/255.255.255.0>..#<IPAddr: IPv4:192.168.1.255/255.255.255.0>
leonshalimov has quit [Ping timeout: 246 seconds]
lytol has joined #ruby-lang
kl has quit [Ping timeout: 255 seconds]
hotpancakes has joined #ruby-lang
ruby-lang190 has joined #ruby-lang
<ruby-lang190>
Hi
<ruby-lang190>
@all I have a couple of urls which retrive specific pages. And I want to know how fast it is, on a given bandwidth 3g, 4g and 2g. Is there a way of customising the network to these specific network covereageim by modifying bps when the page requests the pages Ruby ?
hotpancakes has quit [Remote host closed the connection]
<djellemah>
godzillaenlacasa: to_range returns an instance of Range
booly-yam-8846 has joined #ruby-lang
kadwill has joined #ruby-lang
GBrawl has joined #ruby-lang
seank__ has joined #ruby-lang
apeiros has joined #ruby-lang
symm- has joined #ruby-lang
kadwill has quit [Ping timeout: 252 seconds]
hotpancakes has joined #ruby-lang
seank_ has quit [Ping timeout: 264 seconds]
hotpancakes has quit [Remote host closed the connection]
[H]unt3r has joined #ruby-lang
revath has joined #ruby-lang
lytol has quit [Remote host closed the connection]
terabytest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby-lang
cored has quit [Quit: leaving]
<ruby-lang070>
One last question, how can you delete any given element value? I understand integers can be removed like this, array = [1,2,3,4]; array.delete(2) => [1,3,4] but what about strings?
<waxjar>
that works the same
tkuchiki has quit [Remote host closed the connection]
<ruby-lang070>
I get x = ["example ", "hello ", "world"]; x.delete(0) => TypeError: no implicit conversion of Fixnum into String
tkuchiki has joined #ruby-lang
<workmad3>
ruby-lang070: delete takes the object to remove, not the array index of the item to remove
<ruby-lang070>
Damn, not being able to write properly in english sucks. What I mean is suppose. x = ["example","hello","world"] I want to delete ["example"] without changing the 1,2 element at all
<centrx>
x[x.index('example')] = nil ?
<havenwood>
>> x = ["goodbye", "hello", "hello", "hello"]; x.delete_at(x.find_index("hello")); x
martinbmadsen has quit [Ping timeout: 264 seconds]
<ruby-lang070>
That's all I wanted but is there a shorter way? :p I'm still fine with that though.
lapide_viridi has joined #ruby-lang
<jhass>
which one of the two now? ;)
<ruby-lang070>
havenwood's :]
martinium has quit [Remote host closed the connection]
<jhass>
also maybe describe your goal, there might be an elegant way to doesn't require your wanted solution at all
<havenwood>
^
futilegames_ has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
futilegames has quit [Ping timeout: 255 seconds]
futilegames_ is now known as futilegames
<ruby-lang070>
I just wanted to know how to delete an array's element. I want to explain so bad but my english, you know, sucks.
<jhass>
point is, I never needed delete_at in the ruby I wrote
<jhass>
good chance you don't need it too
<jhass>
from what you've described, the answer is delete_at
lytol has joined #ruby-lang
<ruby-lang070>
You mean x = ["aa","bb","cc"]; x.delete_at("hello") ?
<ruby-lang070>
forgot the underscore, oops.
<jhass>
delete_at takes indexes, since that's how you reference array elements
rahul_j has quit [Quit: rahul_j]
<jhass>
again, what do you need to do that operation for? what's the goal?
<ruby-lang070>
Got it!
cored has joined #ruby-lang
cored has joined #ruby-lang
<waxjar>
my god, i'm lagging hard :/
dik_dak has joined #ruby-lang
<jhass>
don't blame your god for it, he's nothing to do with all that technology crap!
kl__ has joined #ruby-lang
workmad3 has quit [Ping timeout: 265 seconds]
djbkd has joined #ruby-lang
<ruby-lang070>
Thanks for the help guys! Bye.
<centrx>
*egads
lytol has quit [Remote host closed the connection]
godd2 has quit [Remote host closed the connection]
migbar has quit [Remote host closed the connection]
ruby-lang070 has quit [Ping timeout: 246 seconds]
migbar has joined #ruby-lang
hotpancakes has joined #ruby-lang
dRbiG has joined #ruby-lang
tenderlove has joined #ruby-lang
michaeldeol has joined #ruby-lang
hotpancakes has quit [Ping timeout: 264 seconds]
migbar has quit [Ping timeout: 276 seconds]
<godzillaenlacasa>
hey guys, another error I don't understand.... options.rb:18:in `test_uri': undefined local variable or method `options' for main:Object (NameError)
<godzillaenlacasa>
the command is: ruby options.rb -H 192.168.0.1 -p /index
<drbrain>
godzillaenlacasa: line 6 can't see options = on line 30
<darix>
godzillaenlacasa: you need to pass the options object into your test_uri function
<darix>
moin drbrain
ta has joined #ruby-lang
<drbrain>
godzillaenlacasa: I would pass in only options[:path] along with options[:host] isntead of all of options
<drbrain>
darix: hi
<godzillaenlacasa>
oh, so i define in the function? test_uri(uri, options[:path])
<darix>
godzillaenlacasa: naw
<darix>
you have
<darix>
def test_uri(uri, path)
<darix>
and call it with test_uri(..., options[:path])
<godzillaenlacasa>
ok, thanks darix drbrain
<drbrain>
yep ↑
hotpancakes has joined #ruby-lang
<godzillaenlacasa>
so much to learn ;)
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby-lang
oak1 has joined #ruby-lang
lytol has joined #ruby-lang
ta has quit [Ping timeout: 272 seconds]
gwendall has quit [Ping timeout: 276 seconds]
djbkd has quit [Remote host closed the connection]
<darix>
godzillaenlacasa: things that might be worth for you to look at: slop, mechanize, httparty
<godzillaenlacasa>
will do darix !
<godzillaenlacasa>
geez slop looks much easier than what I just went through darix
ruby-lang190 has quit [Ping timeout: 246 seconds]
<darix>
godzillaenlacasa: donations, kisses and just simple "thank you" go to ljarvis for that
<darix>
also for mechanize. but there you can include drbrain if i recall correctly
<godzillaenlacasa>
nice
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
<lapide_viridi>
If anyone remembers, I was wondering if setting up a IRC client with a detached server would be a good idea. Some said they' done it, while others preferred not to.
chouhoulis has quit []
iamninja has joined #ruby-lang
<lapide_viridi>
Now I wounder, wouldn't a detached client make up for a lot of data traffic?
wprice has quit [Quit: wprice]
<chris2>
i have 4gb irc logs since 2009?
<darix>
lapide_viridi: what do you mean with detached client? also irc in general is pretty low traffic depending on the irc channel
<chris2>
so: no
<darix>
2.3GB since probably even longer.
<chris2>
and i have 100+ channels
<darix>
chris2: window_switcher.pl?:p
chouhoulis has joined #ruby-lang
<chris2>
goto and M-a
<lapide_viridi>
Oh, not worse than that?
<lapide_viridi>
Well, that might actually work out then.
<darix>
lapide_viridi: naw
<chris2>
darix: but seems nice too
<darix>
chris2: window switcher allows switching by substring. which is pretty neat.
elia has quit [Quit: Computer has gone to sleep.]
<chris2>
yeah, goto as well
<darix>
ah. did you ever upload that to the archive?
<chris2>
*go.pl its called
<godzillaenlacasa>
question... how can I turn the actual rubygems documentation into something that I can learn from? For instance the source for new(version) at http://ruby-doc.org/stdlib-2.0/libdoc/rubygems/rdoc/Gem/Version.html makes no sense to me about how to use it in one of my progs.
<darix>
godzillaenlacasa: rdoc.info
<darix>
see gem help server
<darix>
or use the yard doc server
<darix>
that should help you
<darix>
godzillaenlacasa: also look up "pry" and especially its "binding.pry" feature
<drbrain>
godzillaenlacasa: or do you mean "how do I look at the source of a project to learn ruby from it?"
<darix>
it is gold for developing more or less interactively :p
<godzillaenlacasa>
drbrain yes.
<drbrain>
godzillaenlacasa: rubygems might not be the best place to start
<darix>
godzillaenlacasa: rubygems.org links to the source code
godzillaenlacasa has quit [Quit: Computer has gone to sleep.]
<nofxx>
Anyone watched imitation game recently? hehe, got a 'message' here I was told may contain the text '0001': "65dLo88h98p8fLb84ifi8x7fhO23ciam4kod4rsc" so I: pff, how easy, how jedi am I its base64... well, actually it is, but tryed all I can think (and realized I'm no jedi)...
<nofxx>
can't find that sequence there, but again, was told it contains, it may not...
martinium has joined #ruby-lang
<nofxx>
maybe brute force the pack/upack? kinda [1..2] [1..3] ... [ N-2, N-1]
<apeiros>
it's a one time pad. haha.
<nofxx>
apeiros, hm?
<apeiros>
if it's a one-time pad, you're f'ed.
<nofxx>
apeiros, what's a one time pad, pardon my ignorance
<apeiros>
you have a key of the same length as the message and XOR it with it.
<apeiros>
without the key, the message could decode to just any message of the same length
<bnagy>
well it's not that
<bnagy>
that's not random binary
hotpancakes has quit [Remote host closed the connection]
<apeiros>
bnagy: that just means the pad was well chosen! ;-)
<apeiros>
"look, look! it's cesar chiffre"
martinium has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby-lang
<bnagy>
well not unless they lied about the 0001
<bnagy>
there are no triple repeats
<bnagy>
but it does look like something simple, it's in a pretty tight binary range and there are lots of repeats
<nofxx>
apeiros, hm, got it.... bnagy yeah.. my frist attempt. Not related to this one, but once I had to support a very crazy protocol, binary wasn't fixed at 8 bits.... some where 4, 6. Hence my brute force idea
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<bnagy>
PER will do that :(
nickpassarella has quit [Quit: nickpassarella]
<yorickpeterse>
weeeee, run little Rubies, export that data for me
chills42 has quit [Remote host closed the connection]
<nofxx>
bnagy, partial equivalence relation?
djbkd has quit [Remote host closed the connection]
<ljarvis>
you probably dont watch catch for this :)
meschi has joined #ruby-lang
<godzillaenlacasa>
ljarvis why not ?
gix has joined #ruby-lang
skade has joined #ruby-lang
<ljarvis>
godzillaenlacasa: it shouldn't really be used unless it's absolutely required, and in most cases it's not required. It aids confusing/horrible code
hotpancakes has quit [Remote host closed the connection]
<godzillaenlacasa>
ljarvis ok, noted... guess I need to read up when to actually use it then
djbkd has joined #ruby-lang
<godzillaenlacasa>
y'all have been most helpful today! Thanks a ton! Learning alot!
<bnagy>
never
mattwildig has quit []
<ljarvis>
godzillaenlacasa: one thing to remember is that you should try to avoid using exceptions for control-flow. When that comes up, catch/throw might be an option (though that's also rarely the case :P)
<bnagy>
@@classvars and throw/catch, not even once (tm)
<wallerdev>
what about multi nested loops
<wallerdev>
:p
<ljarvis>
that's the only application for me
<godzillaenlacasa>
ljarvis do my rescue lines fall into the bucket as well?
<ljarvis>
godzillaenlacasa: not sure what you mean
leonshalimov has quit [Ping timeout: 245 seconds]
<godzillaenlacasa>
ljarvis are rescues part of the ruby exception class?
<ljarvis>
godzillaenlacasa: sorry I don't know what that means
hotpancakes has joined #ruby-lang
<godzillaenlacasa>
ljarvis hmm, maybe I don't know what I'm saying. lol
Pugsley_ has joined #ruby-lang
svajone has joined #ruby-lang
<svajone>
Hey guys.
<svajone>
:D
<svajone>
Question! :)
<svajone>
Say I have a file name, america_hertigage.csv, what’s the best way to match the “america” part in an array like this? CONTINENTS = ['ASIA', 'AFRICA', 'NORTH AMERICA', 'SOUTH AMERICA', 'ANTARCTICA', 'EUROPE', 'AUSTRALIA']
kadwill has quit [Remote host closed the connection]
martinium has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
ascarter has joined #ruby-lang
workmad3 has joined #ruby-lang
donove has quit [Quit: Leaving]
jefus_ has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby-lang
lytol has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
martinium has quit [Ping timeout: 256 seconds]
jefus has quit [Ping timeout: 264 seconds]
nickpassarella has joined #ruby-lang
tenderlove has quit [Quit: Leaving...]
wei_au has quit []
djbkd has joined #ruby-lang
AKASkip has quit [Ping timeout: 240 seconds]
jefus_ is now known as jefus
jo__ has joined #ruby-lang
nickpassarella has quit [Quit: nickpassarella]
djbkd has quit [Remote host closed the connection]
fclausen has quit [Quit: leaving]
charliesome has joined #ruby-lang
malconis_ has joined #ruby-lang
leonshalimov has quit [Ping timeout: 264 seconds]
leonshalimov has joined #ruby-lang
malconis has quit [Ping timeout: 245 seconds]
solars has quit [Ping timeout: 246 seconds]
gwendall_ has joined #ruby-lang
tzero has left #ruby-lang ["WeeChat 0.4.3"]
djbkd has joined #ruby-lang
[H]unt3r has quit []
chouhoulis has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
leonshalimov has quit [Ping timeout: 272 seconds]
dzejrou has quit [Quit: Leaving]
<nofxx>
but going to finish my brute force attempt... might came handy
charliesome has quit [Quit: zzz]
<nofxx>
ops, wrong window for shift up enter
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
konr has quit [Quit: Connection closed for inactivity]
JoshuaPaling has joined #ruby-lang
svajone has quit [Ping timeout: 265 seconds]
malconis_ has quit [Remote host closed the connection]
oleo is now known as Guest88962
oleo__ has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
djbkd has joined #ruby-lang
Guest88962 has quit [Ping timeout: 245 seconds]
<ddd>
so basically, all the * operator really is is an 'expander' operator correct? it expands whatever its argument is? (like for a range. k = 1..200 ; *k would print out 1 through 200)
<ericwood>
that's a decent way to look at it
<ericwood>
you can also use it to convert an array into a bunch of arguments
<yorickpeterse>
Does anybody know of the MRI CAPI allows one to basically use Data_Wrap_Struct but wrap a _class_ and not an instance? I'm looking for a way to store C objects on class level, opposed to instance level
<ddd>
ok. been trying to figure out the best way to mentally view it so as to make it stick
<ddd>
ericwood, is that by virtue of it's expansion operation?
<ericwood>
yeah
marr has quit [Ping timeout: 245 seconds]
<ddd>
ok
<ericwood>
it's called a "splat" in ruby parlance
<ddd>
right. was searching for the best words to define what it was coming out as in my head
whippythellama has quit [Quit: whippythellama]
<ddd>
thanks for the response. think so far (besides how blocks work in some instances) the splat's the only other thing that's been giving me troubles. I might be back once i get into the anonymous blocks and blocks as formal args again
<ericwood>
sure thing
<ericwood>
splat isn't something you'll find yourself using a ton, but it's really nice when you need it