ljarvis changed the topic of #ruby-lang to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p547: http://ruby-lang.org || Paste code on http://gist.github.com
Cort3z has joined #ruby-lang
drbrain has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 245 seconds]
wallerdev has quit [Ping timeout: 250 seconds]
Cort3z has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Remote host closed the connection]
ddv has quit [Ping timeout: 260 seconds]
wallerdev has joined #ruby-lang
mykoweb has joined #ruby-lang
yfeldblum has joined #ruby-lang
ddv has joined #ruby-lang
pr0ton has joined #ruby-lang
pr0ton has quit [Client Quit]
pr0ton has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
pr0ton has quit [Client Quit]
<senoralastair> hi folks. quick question: I'm using puppet and a ruby function to pull some data from an api. There are two hashes I'm requesting, and one of them seems to be missing the [ ] surrounding it (otherwise looks the same as the other one, which works). What's the best way to get this back to being recognised as a hash?
<senoralastair> working result: [{"host"=>{"name"=>"servername.something",....],
<senoralastair> broken one {"servername"=>"ipaddress_mgmt"=>"1.2.3.4"},....}
jonathanmarvens has quit [Remote host closed the connection]
kalehv has quit [Remote host closed the connection]
DivineEntity has joined #ruby-lang
lolmaus has quit [Ping timeout: 255 seconds]
kalehv_ has joined #ruby-lang
hahuang65 has joined #ruby-lang
jonathanmarvens has joined #ruby-lang
kalehv_ has quit [Ping timeout: 240 seconds]
ponch_ has joined #ruby-lang
nofxx__ has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 250 seconds]
broadcast has joined #ruby-lang
broadcast has quit [Client Quit]
mistym has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
<centrx> [] is an Array
shinnya has joined #ruby-lang
isale-eko has joined #ruby-lang
saarinen has quit [Quit: saarinen]
isale-eko has quit [Client Quit]
lolmaus has joined #ruby-lang
rh1n0 has quit [Ping timeout: 240 seconds]
kalehv has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 264 seconds]
kalehv has quit [Ping timeout: 264 seconds]
toastynerd has quit [Remote host closed the connection]
amsi has quit [Quit: Leaving]
toastyne_ has joined #ruby-lang
sarkyniin has joined #ruby-lang
<senoralastair> centrix: ahh. yeah i just did some testing in irb with xxx.is_a?(Hash) /Array and worked that out! not what I thought. I believe the array is an associative array, which I'm accessing in an each loop with xx["host"]["name"], what do I have to change to get the data out of he hash (that has hashes inside it)? I'm not too clear about this bit
havenwood has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby-lang
<wallerdev> associative arrays are just hashesh
<wallerdev> not arrays
<wallerdev> despite what php might pretend
tkuchiki has joined #ruby-lang
<centrx> PHP is an abomination and a scourge on the face of the earth.
<senoralastair> wallerdev: so do I address elements differently between the two? I'm getting hostnames from the first results (with surrounding []), which I'm then using to query ip addresses from the second results (surrounding {} only, with {"servername"=>{"ipaddress_mgmt"=>"1.2.3.4"},...} format, and I'm trying to get these ips out with the $host variable passed in from the first loop, using this bit of inline ruby templating: <% ip.each do|xxx| %><%= xxx[
davispuh has quit [Remote host closed the connection]
jonathanmarvens has quit [Remote host closed the connection]
Sirupsen has quit [Quit: Textual IRC Client: www.textualapp.com]
<wallerdev> xxx["servername"]["ipaddress_mgmt"]
hahuang65 has quit [Ping timeout: 255 seconds]
<senoralastair> ps I don't know php, but was trying to find out the difference between an array with just elements, and key-value pairs with string keys. I'm pretty new to ruby, and still getting my head around it all
<wallerdev> would get you 1.2.3.4
jonathanmarvens has joined #ruby-lang
sharpmachine has quit [Remote host closed the connection]
<wallerdev> the difference is mostly that in arrays you basically have a list of things, you can say get me the 5th item, or the 10th item, etc. with hashes you have things mapped between a key and a value, so you say get me the "servername" item, or get me the "ip" item, instead of asking for a specific item based on its order
<senoralastair> wallerdev: can I user xxx["$name"][ipaddress_mgmt], using the $name variable passed to it?
yfeldblum has quit [Remote host closed the connection]
<wallerdev> im not really sure what $name is
<wallerdev> you didnt mention it in your example at all
araujo has quit [Ping timeout: 245 seconds]
tectonic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<senoralastair> wallerdev: ah yeah. sorry. $name is meant to be the current servername passed to this loop, that I need to use to pull out the correct element from the hash
<wallerdev> well im not really sure what templating language you're using where variables starting with dollar are a thing
Miphix has joined #ruby-lang
vincent has joined #ruby-lang
<wallerdev> in erb itd probably look like <% my_list_of_ips.each do |ip| %> <%= ip["servername"]["ipaddress_mgmt"] %> <% end %>
<senoralastair> wallerdev: yeah sorry, that's puppet's variable. maybe that's why it's not working, because I'm trying to put the puppet variable into the ruby template line. it's in single quotes, so maybe it's not being interpreted
vincent is now known as Guest18316
kalehv has joined #ruby-lang
<wallerdev> yeah not sure
<wallerdev> never used puppet
<senoralastair> wallerdev: maybe I'll try and use double quotes to see if that interprets the variable correctly. maybe that's why it's saying 'no implicit conversion from nil to integer...'
yfeldblum has joined #ruby-lang
<wallerdev> yeah
<wallerdev> >> ary = []; ary[nil]
<wallerdev> f
<wallerdev> anyway
<wallerdev> thats what is probably happening
<wallerdev> you have an array and are trying to access the nil index
ponch_ has quit [Ping timeout: 240 seconds]
<senoralastair> wallerdev: ahh. yeah that makes sense. ok i'll give it a shot. but in theory, I'd access a hash with nested elements by hashname[key1][key2], and an array like array[3] ?
vintik has joined #ruby-lang
<wallerdev> yeah for the most part
<wallerdev> you can have an array of arrays and access it like ary[3][4]
<senoralastair> wallerdev: ahh ok. and there can be arrays/hashes nested in each other, can't there?
<senoralastair> or is it just the 1 type?
<wallerdev> yeah you can mix and match
<wallerdev> you can also have integer keys for a hash like {0 => "cool", 1 => "okay", 4 => "blah"}
<senoralastair> wallerdev: and can you do something like a regex match in the key name?
<senoralastair> wallerdev: oh right
<wallerdev> but if you say hash[4] its not going to give you the 4th item, its going to give you the item that corresponds to the key 4
<senoralastair> wallerdev: yeah of course. I'd have to keep that in mind
<wallerdev> the keys are usually just static keys, the point is usually to look up things based on the exact key which is very quick
<wallerdev> if you did a regex match against the keys you would have to iterate over every single key and check each one
<senoralastair> wallerdev: ah ok. that makes sense. Thank you. I've just got to duck out for a bit. back in a little while. Thanks heaps for your help if you're not around when I'm back!
<wallerdev> later :)
<senoralastair> wallerdev: cheers
mistym has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 240 seconds]
ponch_ has joined #ruby-lang
Sirupsen has joined #ruby-lang
shinnya has quit [Ping timeout: 240 seconds]
dik_dak has joined #ruby-lang
dik_dak has quit [Client Quit]
dik_dak has joined #ruby-lang
dik_dak has quit [Read error: Connection reset by peer]
toastyne_ has quit [Remote host closed the connection]
saarinen has joined #ruby-lang
ponch_ has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
dik_dak has joined #ruby-lang
dik_dak has quit [Read error: Connection reset by peer]
sduckett has joined #ruby-lang
Cort3z has joined #ruby-lang
pixelhandler has quit [Quit: pixelhandler]
Missphoenix has joined #ruby-lang
Cakey has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
kalehv has quit [Remote host closed the connection]
Cort3z has quit [Ping timeout: 250 seconds]
Miphix has quit [Ping timeout: 256 seconds]
nathanstitt has joined #ruby-lang
wallerdev has joined #ruby-lang
hahuang65 has joined #ruby-lang
apt-get_ has joined #ruby-lang
sarkyniin has quit [Ping timeout: 250 seconds]
_JokerDoom has joined #ruby-lang
tectonic has joined #ruby-lang
JokerDoom has quit [Ping timeout: 250 seconds]
centrx has quit [Quit: Mead error: Connection reset by beer]
centrx has joined #ruby-lang
|jemc| has joined #ruby-lang
centrx has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karamazov has quit []
monees has joined #ruby-lang
saarinen has quit [Quit: saarinen]
vvikus has quit [Quit: WeeChat 0.4.2]
araujo has joined #ruby-lang
vvikus has joined #ruby-lang
jonathanmarvens has quit [Remote host closed the connection]
vvikus has quit [Quit: WeeChat 0.4.2]
toretore has quit [Quit: This computer has gone to sleep]
sepp2k1 has quit [Read error: Connection reset by peer]
TrueJet has joined #ruby-lang
vvikus has joined #ruby-lang
vvikus has quit [Client Quit]
vvikus has joined #ruby-lang
vvikus has quit [Client Quit]
ctangent has joined #ruby-lang
vvikus has joined #ruby-lang
vvikus has quit [Client Quit]
vvikus has joined #ruby-lang
vvikus has quit [Client Quit]
vvikus has joined #ruby-lang
CaptainJet has quit [Ping timeout: 256 seconds]
vvikus has quit [Client Quit]
djbkd has joined #ruby-lang
rcvalle has quit [Quit: rcvalle]
CaptainJet has joined #ruby-lang
TrueJet has quit [Ping timeout: 256 seconds]
jonathanmarvens has joined #ruby-lang
gix has quit [Ping timeout: 240 seconds]
apt-get_ has quit [Quit: Quitte]
saarinen has joined #ruby-lang
gix has joined #ruby-lang
vvikus has joined #ruby-lang
ctangent has left #ruby-lang ["Textual IRC Client: www.textualapp.com"]
havenn has joined #ruby-lang
djbkd has quit [Ping timeout: 245 seconds]
djbkd has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
vvikus has quit [Client Quit]
vvikus has joined #ruby-lang
vvikus has quit [Client Quit]
vvikus has joined #ruby-lang
bruno- has joined #ruby-lang
charliesome has joined #ruby-lang
bruno- has quit [Ping timeout: 260 seconds]
vvikus has quit [Ping timeout: 264 seconds]
vvikus has joined #ruby-lang
vintik has quit [Remote host closed the connection]
ponch_ has joined #ruby-lang
spuk has quit [Ping timeout: 264 seconds]
ponch_ has quit [Ping timeout: 240 seconds]
spuk has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mistym has quit [Remote host closed the connection]
nathanstitt has quit [Quit: I growing sleepy]
<senoralastair> hi. I'm back with a quick question (should actually be quick this time). I'm accessing a hash in a ruby erb template, and I have a server hostname as one key I'm after, and it's giving me an error because it's truncating the hostname from server.domain.com to just server. do I have to do something to encapsulate the entire name? (this is in a puppet module with a ruby inline template in case you're wondering)
spastorino has quit [Quit: Connection closed for inactivity]
jonatha__ has joined #ruby-lang
jonathanmarvens has quit [Ping timeout: 264 seconds]
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
monees has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 245 seconds]
sduckett has quit [Ping timeout: 245 seconds]
Cort3z has joined #ruby-lang
gix has joined #ruby-lang
Cort3z has quit [Ping timeout: 240 seconds]
mistym has joined #ruby-lang
saarinen has quit [Read error: Connection reset by peer]
saarinen has joined #ruby-lang
monees has joined #ruby-lang
saarinen has quit [Quit: saarinen]
D9 has quit [Ping timeout: 264 seconds]
hgl has joined #ruby-lang
ponch_ has joined #ruby-lang
strmpnk has quit [Quit: Connection closed for inactivity]
mehlah has quit [Ping timeout: 260 seconds]
vvikus has quit [Ping timeout: 240 seconds]
vvikus has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
<senoralastair> hi. can anyone tell me how to access a hash key name that has dot/periods in it? (I have a server fqdn, like server.domain.com that is the key name I want to extract with). I get an error saying it can't find value for the 'server' part of 'server.domain.com'
tkuchiki has joined #ruby-lang
jonatha__ has quit [Remote host closed the connection]
ponch_ has quit [Ping timeout: 245 seconds]
tectonic has quit []
mehlah has joined #ruby-lang
monees has quit [Remote host closed the connection]
djbkd has quit [Quit: My people need me...]
vvikus has quit [Ping timeout: 264 seconds]
Missphoenix has quit [Quit: Leaving]
Miphix has joined #ruby-lang
vvikus has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 256 seconds]
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
vintik has joined #ruby-lang
mykoweb has quit [Ping timeout: 240 seconds]
havenn has quit [Remote host closed the connection]
tectonic has joined #ruby-lang
tectonic_ has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
toastynerd has joined #ruby-lang
tectonic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hakunin has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
imperator has joined #ruby-lang
|jemc| has quit [Quit: WeeChat 0.4.3]
yfeldblu_ has quit [Ping timeout: 264 seconds]
Miphix has quit [Quit: Leaving]
Miphix has joined #ruby-lang
kyb3r_ has joined #ruby-lang
alexju has joined #ruby-lang
_ht has joined #ruby-lang
CaptainJet has quit []
apeiros has joined #ruby-lang
jonathanmarvens has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
imperator has quit [Quit: Valete!]
apeiros has quit [Remote host closed the connection]
diegoviola has quit [Remote host closed the connection]
dangerousdave has joined #ruby-lang
Cort3z has joined #ruby-lang
Cort3z has quit [Ping timeout: 250 seconds]
beawesomeinstead has joined #ruby-lang
toastynerd has joined #ruby-lang
yfeldblum has joined #ruby-lang
brianpWins has joined #ruby-lang
woollyams has joined #ruby-lang
apeiros has joined #ruby-lang
Cort3z has joined #ruby-lang
AKASkip has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vvikus has quit [Ping timeout: 245 seconds]
dfalkner has quit [Quit: Textual IRC Client: www.textualapp.com]
kwd has joined #ruby-lang
relix has joined #ruby-lang
gnufied has quit [Ping timeout: 240 seconds]
francisfish has quit [Ping timeout: 245 seconds]
AKASkip has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
hgl_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
hgl_ has quit [Remote host closed the connection]
hgl_ has joined #ruby-lang
gnufied has joined #ruby-lang
hgl has quit [Ping timeout: 260 seconds]
woollyams has quit [Ping timeout: 272 seconds]
woollyams has joined #ruby-lang
tectonic_ has quit []
bruno- has joined #ruby-lang
Cort3z has quit [Ping timeout: 256 seconds]
bruno- has quit [Ping timeout: 240 seconds]
mistym has quit [Remote host closed the connection]
vintik has quit [Remote host closed the connection]
dfranciosi has joined #ruby-lang
woollyams has quit [Ping timeout: 272 seconds]
tbuehlmann has joined #ruby-lang
alexju has quit [Remote host closed the connection]
AKASkip has joined #ruby-lang
mikecmpbll has joined #ruby-lang
solars has joined #ruby-lang
shemerey has joined #ruby-lang
enkristoffer has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
vintik_ has joined #ruby-lang
jaimef has quit [Excess Flood]
jaimef has joined #ruby-lang
ironhide_604 has joined #ruby-lang
<ljarvis> senoralastair: can you show some code?
Technodrome has joined #ruby-lang
<Technodrome> how can I delete all gems on my system and start over?
woollyams has joined #ruby-lang
TvL2386 has joined #ruby-lang
<ljarvis> Technodrome: gem list, cut, and xargs?
<Technodrome> like my rails install and stuff is just so messed up, i woud just like to clear the gems and start over
alexju has joined #ruby-lang
Atttwww has quit [Ping timeout: 256 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
isale-eko has joined #ruby-lang
isale-eko has quit [Client Quit]
arBmind has joined #ruby-lang
mikecmpbll has joined #ruby-lang
francisfish has joined #ruby-lang
dfranciosi has quit [Remote host closed the connection]
isale-eko has joined #ruby-lang
elia has joined #ruby-lang
elia has quit [Client Quit]
yfeldblum has quit [Ping timeout: 256 seconds]
isale-eko has quit [Quit: ChatZilla 0.9.90.1 [Firefox 30.0/20140605174243]]
wallerdev has quit [Quit: wallerdev]
yfeldblum has joined #ruby-lang
enkristoffer has quit [Quit: ❤]
elia has joined #ruby-lang
bruno- has joined #ruby-lang
bruno- has quit [Ping timeout: 240 seconds]
postmodern has quit [Quit: Leaving]
isale-eko has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
achiu1 has joined #ruby-lang
achiu has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
vintik_ has quit [Remote host closed the connection]
bahar has quit [Ping timeout: 240 seconds]
workmad3 has quit [Quit: Reconnecting]
ddv has quit [Changing host]
ddv has joined #ruby-lang
workmad3 has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
jonathanmarvens has quit [Remote host closed the connection]
touzin has joined #ruby-lang
jonathan_alban has joined #ruby-lang
<Silex> Technodrome: start using rvm
<Technodrome> i’m using it now
<Technodrome> and have used it before
<Silex> ok, then remove the gemset, create it again, and "bundle"
<Technodrome> was just trying to ake a shortcut
<Silex> "bundle clean --force" removes all the gems not in your Femfile
<Silex> Gemfile*
<ljarvis> rvm D:
hgl_ has quit [Quit: Computer has gone to sleep.]
<Silex> ljarvis: what alternative do you recommend?
touzin has quit [Ping timeout: 256 seconds]
lolmaus has quit [Ping timeout: 240 seconds]
hgl_ has joined #ruby-lang
hgl_ has quit [Remote host closed the connection]
hgl_ has joined #ruby-lang
lolmaus has joined #ruby-lang
<workmad3> Silex: I like chruby + ruby-install personally
<Silex> interesting, thanks
<workmad3> Silex: mainly because rvm kept on getting in the way of my own ways of ensuring 'bundle exec' was called automatically ;)
<workmad3> (and rvm has a lot of stuff I don't use 90%+ of the time, and the few times I'd want it I can just hand-roll something... e.g. wrapper scripts)
<Silex> the "root install" support of ruby-install looks interesting
<workmad3> Silex: by 'support' do you mean 'defaults the prefix to /opt/rubies rather than $HOME/.rubies'? ;)
<Silex> ah, no gemsets?
<Silex> workmad3: yes, I meant that
<workmad3> Silex: no... I've found 0 use for gemsets since the advent of bundler ;)
<Silex> well for me gemsets are nice in the sense that each project has its gemset
<Silex> but I guess it's redundant with the info in the Gemfile
<workmad3> Silex: https://github.com/postmodern/chgems <-- use that then ;)
<Silex> yeah, well I think you made me realise gemsets are not really necessary
<workmad3> Silex: wouldn't be very difficult to roll your own version either, tbh... especially if you use zsh, so you can write a small function that looks for a '.ruby-gemset' file and set up $GEM_PATH and $GEM_HOME based on that ;)
<workmad3> Silex: what chruby showed me was that it can actually be stupidly simple to add some of these things in... at least up to the point that I'd want/need them :)
<Silex> Yeah. I like rvm as a dev, but on the server it's a bit annoying
<Silex> I'll probably switch to chruby & ruby-install in the future
<workmad3> Silex: I only use ruby-install on the server, because it's slightly easier than setting up the configure commands myself
<workmad3> Silex: and then all my scripts set up the appropriate PATH, RUBY_VERSION, etc. variables before launching something
yxhuvud has quit [*.net *.split]
thang has quit [*.net *.split]
pabs has quit [*.net *.split]
hackeron has quit [*.net *.split]
yliu has quit [*.net *.split]
Abuh has quit [*.net *.split]
Authenticator has quit [*.net *.split]
jtoy has quit [*.net *.split]
coffeejunk has quit [*.net *.split]
jhass|off has quit [*.net *.split]
_rgn has quit [*.net *.split]
<workmad3> (automating the generation of said scripts with chef helps with that approach)
tommylommykins has quit [*.net *.split]
Rubennn has quit [*.net *.split]
catepillar has quit [*.net *.split]
concernedcitizen has quit [*.net *.split]
hachiya has quit [*.net *.split]
flgr has quit [*.net *.split]
erichmenge has quit [*.net *.split]
thang has joined #ruby-lang
Rubennn has joined #ruby-lang
jtoy has joined #ruby-lang
yliu has joined #ruby-lang
tommylommykins has joined #ruby-lang
javilm has joined #ruby-lang
hackeron has joined #ruby-lang
catepillar has joined #ruby-lang
Authenticator has joined #ruby-lang
_rgn has joined #ruby-lang
yxhuvud has joined #ruby-lang
coffeejunk has joined #ruby-lang
flgr has joined #ruby-lang
erichmenge has joined #ruby-lang
concernedcitizen has joined #ruby-lang
Abuh has joined #ruby-lang
hachiya has joined #ruby-lang
pabs has joined #ruby-lang
<Silex> a'ight, ty for info
hgl_ has quit [Quit: Lingo - http://www.lingoirc.com]
hgl has joined #ruby-lang
jhass|off has joined #ruby-lang
<ljarvis> Silex: +1 to what workmad3 said, chruby + ruby-install
Miphix has quit [Quit: Leaving]
jhass|off is now known as jhass
<ljarvis> always been flawless for me, anyway
mnngfltg has joined #ruby-lang
Fushi has joined #ruby-lang
stamina has joined #ruby-lang
<Technodrome> Silex: i’m not even sure really how bundle works
<workmad3> Technodrome: at it's basic level, bundler sets up your ruby LOAD_PATH so that it can only see the gems listed in your Gemfile.lock (which contains all gem + version info for all gems in your Gemfile and dependencies)
<workmad3> s/it's/its
<Technodrome> i see
<Technodrome> so the only gems your ruby install can see are ones in the gem file?
<workmad3> Technodrome: the only gems your bundler-enabled app can see are the ones in its Gemfile
<Technodrome> yeah
<Technodrome> whats the disadvantage for allowing it to see all?
<Technodrome> i understand when moving between projects
<Technodrome> but why can’t it see whats on the local system? so you odn’t get issues when you move later on?
<workmad3> Technodrome: mostly, it's because rubygems only allows one version to be loaded at once, and if you use a 'require "whatever" ' it will load the latest possible version
woollyams has quit [Ping timeout: 272 seconds]
<workmad3> Technodrome: which can cause merry hell with dependency resolution
<workmad3> Technodrome: it's also so you don't accidentally rely on something you haven't explicitly declared (which can be a problem when deploying or changing machines later on)
hgl has quit [Quit: Computer has gone to sleep.]
cornerma1 has joined #ruby-lang
<Technodrome> I see yeah
Forgetful_Lion has joined #ruby-lang
<Technodrome> so when you say you “delete” gems from your budnle what does that mean?
<workmad3> Technodrome: they're removed from the Gemfile.lock and your app can no longer see them
<Technodrome> bundle clean --force"
<Technodrome> what does this do?
<workmad3> Technodrome: that then removes them from the systemtoo
<workmad3> *system too
<Technodrome> i see
<Technodrome> so it removes them from the gem file + the system?
Mon_Robot has joined #ruby-lang
<workmad3> Technodrome: well, you'd have already had to remove it from the Gemfile ;)
<Technodrome> why the system though, what’s the harm of it being on the system?
<Technodrome> or the rvm gemset etc?
<workmad3> Technodrome: nothing in dev
ascarter has joined #ruby-lang
<workmad3> Technodrome: but it could be taking up space you don't want it to in production, or just be useless if you've got a vendored bundle install path
ascarter has quit [Max SendQ exceeded]
cornerman has quit [Ping timeout: 240 seconds]
<workmad3> Technodrome: e.g. if you've installed with 'bundle install --path vendor/bundle' then 'bundle clean --force' will make sure that path only contains the gems in your bundle
ascarter has joined #ruby-lang
ascarter has quit [Max SendQ exceeded]
hgl has joined #ruby-lang
<Mon_Ouie> Btw, I just had my bot join here to replace eval-in
<Mon_Ouie> >> Math.sqrt(2)
<Mon_Robot> Mon_Ouie: => 1.4142135623730951 (https://eval.in:443/170532)
<workmad3> >> Math.sqrt(-1)
<Mon_Robot> workmad3: => Math::DomainError: Numerical argument is out of domain - "sqrt" (https://eval.in:443/170533)
<workmad3> >> require 'complex'; Math.sqrt(-1)
<Mon_Robot> workmad3: => (0+1.0i) (https://eval.in:443/170534)
<workmad3> better, good bot...
jxie_ has joined #ruby-lang
jonathan_alban has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jxie has quit [Ping timeout: 255 seconds]
spastorino has joined #ruby-lang
<Technodrome> workmad3: i see, cool
<Technodrome> workmad3: again i just sorta “used” the stuff and it always worked
<Technodrome> never really cared if my gemsets were filled with stuff
<workmad3> Technodrome: I don't particularly care if I've got old gems on my dev system tbh :)
<workmad3> Technodrome: but I do care on servers
jonathan_alban has joined #ruby-lang
<Technodrome> yeah
<Technodrome> i mean i get it, this is “similar” to virutalenv in python / django but a little different
<workmad3> yeah, the loading is pretty similar to virtualenv
<workmad3> the dependency resolution is quite a bit different though
<workmad3> that's the main thing bundler gives though, IMO... you give it a Gemfile, it tries it's damndest to figure out some set of gems that satisfy all the constraints at once ;)
<workmad3> gah, why do I keep on typing "it's" instead of "its" today? :(
bruno- has joined #ruby-lang
<Technodrome> yeah python doesn’t really have dependency stuff like this
<Technodrome> good old pip
achiu1 has quit [Ping timeout: 250 seconds]
bruno- has quit [Ping timeout: 256 seconds]
<Technodrome> you can freeze with pip though, that’s kinda cool
achiu1 has joined #ruby-lang
godd2 has quit [Ping timeout: 245 seconds]
<workmad3> Technodrome: freeze as in specify a fixed version? like with 'gem "foobar", "1.2.3" '?
<Technodrome> like this
<Technodrome> you just get a text file of the dev environemnt, then go and feed that into pip and it will pull in the same versions etc
<workmad3> Technodrome: ah... that's the Gemfile.lock :P
<Technodrome> yeah
<Technodrome> obviously it seems ruby’s dependency stuff is a few levels deeper
yfeldblum has quit [Ping timeout: 245 seconds]
<workmad3> Technodrome: bundler just does that for you, no matter what because it's a very sensible way to store versions all the time, not just at certain points :)
scmx has joined #ruby-lang
<Technodrome> i really just prefer everything to be running at it’s newest version available
<Technodrome> I’m in a transition period right now though, moving from django to rails for all of this type of development
<workmad3> Technodrome: the dependency stuff I'm talking about is when you have two gems (e.g. Thin and Rails) that depend on a third gem (e.g. Rack)... Thin has a >= 1.0 dependency on rack and Rails has a ~> 1.0 dependency... rack is at 1.4 (for the sake of the example)
<Technodrome> yeah
<workmad3> Technodrome: rubygems, and probably pip too, will go 'thin can have rack 1.4, so I'll download that... rails can have 1.0.1, so I'll download that' and then whether it works or not depends on which version of rack loads first
<workmad3> bundler goes 'rack 1.0.1 will satisfy both rails and thin... so I'll lock to that version and record it'
<Technodrome> it just loads one though right?
<Technodrome> ah
<Technodrome> so bundler handles that automatically
<workmad3> Technodrome: with normal rubygems, if thin loads first, it would load 1.4... and then rails would blow up
<Technodrome> ah
<workmad3> Technodrome: it was exactly that situation in rails 2.3 days that prompted the creation of bundler :)
<Technodrome> interesting , so people would just force a lower version usually to get it to work with everything?
<workmad3> pretty much... and that's also why gemsets were created... so you could keep your carefully crafted set of gems that works for project A separate from project B (and also isolated from updates in project B)
<Technodrome> gemset is that a ruby gems feature?
<Technodrome> or is that an rvm feature?
<workmad3> different solutions for the same problem... bundler handles it better IMO though, because it records the final result and allows that to be re-used on other machines, while gemsets require you to handle that propagation of the environment out-of-band
<workmad3> rvm feature (and also in some other ruby managers as plugins, e.g. chgems)
<Technodrome> i was going to go with chruby
<Technodrome> but rvm just seems like the most popular
<workmad3> I prefer chruby
<workmad3> it's nice and simple and does the job... I've not had any weird errors since switching to it either :)
<Technodrome> i will switch myself then!
<Technodrome> i know its a bit lighter etc
<workmad3> ruby-install is also nice and simple (written by the same guy), and builds rubies in a sensible manner (relies on dynamic linking a lot more, so you don't need to rebuild ruby when new dependency libraries are released, e.g. updated libyaml)
<workmad3> hehe, 'bit lighter' :)
marr has joined #ruby-lang
<Technodrome> yeah the chruby chgem ruby-install seems like the full stack for that solution in that direction
<Technodrome> then of course the rvm and the rbenv or what not
<workmad3> I don't bother with chgems personally :)
<Technodrome> you just run everything in the global gem?
<workmad3> sure... bundler isolates stuff
<Technodrome> i see yeah
<Technodrome> isolates as in , locks a ruby app down to certain versions etc, in reality though the system at that time of execution does have access to the other gems though right?
<workmad3> if I had a project where I couldn't use bundler, I'd probably add chgems
<Technodrome> so the true power of bundler is the version control of the gems
<workmad3> yeah, the app running in bundler's context can only see those gems, other apps can see different gems
<workmad3> and yes, bundler turns your complete gem dependency graph into something you can version control
<Technodrome> so when they require the gem they are forced to get htat version , even if a newer is available etc yeah
<Technodrome> realy nice
<workmad3> which is an *awesome* power :)
<Technodrome> rails stuff is so much more interesting and fun than django
<Technodrome> i’ve known for this years, and always played with rails but , blah shame on me
<workmad3> (seriously... talk to someone who has had to figure that shit out with maven in java... assuming you can get them to stop drooling and twitching long enough to form sentences)
<Technodrome> i was a j2ee dev for a long time
<workmad3> maven
<Technodrome> maven is much better than not having maven :)
* workmad3 watches Technodrome twitch
<Technodrome> but i got into spring mvc pretty quick, so its almost like a full stack thing, set it and forget and use etc
<workmad3> sure... as long as you then set up your pom.xml correctly... and spot when something is pulling in a library provided by your servlet container and you remember to exclude it from the transitive dependencies during packaging...
<workmad3> etc.
shemerey has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3> I had that 'fun' at one point... the errors you get are not easy :)
<Technodrome> nothing fun about java
<Technodrome> but
shemerey has joined #ruby-lang
<Technodrome> i mean , it has a litle bit of everything
jonathan_alban has quit [Quit: Textual IRC Client: www.textualapp.com]
<Technodrome> but ruby has more “fun” and is more of a business advantage than using java where things take longer + it’s not quite as fun :P
jonathan_alban has joined #ruby-lang
isale-eko has quit [Quit: ChatZilla 0.9.90.1 [Firefox 30.0/20140605174243]]
<jonathan_alban> Hi everyone.
Mon_Robot has quit [Remote host closed the connection]
Mon_Robot has joined #ruby-lang
yfeldblum has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
workmad3 has quit [Quit: leaving]
jonathan_alban has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
railzForDaiz has joined #ruby-lang
kyb3r_ has quit [Quit: Leaving]
jonathan_alban has joined #ruby-lang
railzForDaiz has quit [Client Quit]
scmx has quit [Ping timeout: 264 seconds]
alexju has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
bruno- has joined #ruby-lang
tkuchiki has quit [Ping timeout: 264 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toretore has joined #ruby-lang
banisterfiend has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
tkuchiki has joined #ruby-lang
ldnunes has joined #ruby-lang
Sgeo has quit [Read error: Connection reset by peer]
mehlah has quit [Quit: Leaving...]
Miphix has joined #ruby-lang
yfeldblum has joined #ruby-lang
vondruch has quit [Quit: Ex-Chat]
Mon_Robot has quit [Remote host closed the connection]
kek has joined #ruby-lang
<TvL2386> I've always wondered what happens with a surrounding block if you call return from within it, does anybody know?
yfeldblum has quit [Ping timeout: 255 seconds]
mehlah has joined #ruby-lang
sonander has quit [Quit: leaving]
Mon_Robot has joined #ruby-lang
Mon_Robot has quit [Remote host closed the connection]
Mon_Robot has joined #ruby-lang
mnngfltg has quit [Remote host closed the connection]
Mon_Robot has quit [Remote host closed the connection]
Mon_Robot has joined #ruby-lang
Technodrome has joined #ruby-lang
workmad3 has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
imperator has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
DivineEntity has quit [Quit: Lost terminal]
hgl_ has joined #ruby-lang
hgl has quit [Ping timeout: 245 seconds]
<ljarvis> TvL2386: try it?
<apeiros> he actually got answered in #rubyonrails
<apeiros> and that'd be why:
<ljarvis> sigh
TvL2386 was kicked from #ruby-lang by apeiros [if you cross-post, announce on all channels where you cross post, that you cross post. thanks. this is a warning-kick only. you're not banned.]
Technodrome has quit [Quit: Technodrome]
hgl__ has joined #ruby-lang
cajone has joined #ruby-lang
hgl_ has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby-lang
TvL2386 has joined #ruby-lang
<TvL2386> I apologize for cross posting
Sirupsen has joined #ruby-lang
yfeldblum has quit [Ping timeout: 255 seconds]
valner has joined #ruby-lang
valner has quit [Client Quit]
valner has joined #ruby-lang
malconis has joined #ruby-lang
bin7me has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby-lang
banister has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
banister has quit [Client Quit]
valner has quit [Quit: valner]
valner has joined #ruby-lang
davidfrey has joined #ruby-lang
Technodrome has joined #ruby-lang
imperator has quit [Quit: Leaving]
lolmaus has quit [Remote host closed the connection]
vvikus has joined #ruby-lang
TvL2386 has quit [Quit: Ex-Chat]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
Maitiu has joined #ruby-lang
sarkyniin has joined #ruby-lang
banister has joined #ruby-lang
woollyams has quit [Ping timeout: 272 seconds]
sonvu_ae has joined #ruby-lang
<sonvu_ae> hello
<sonvu_ae> how do you prefer to both initialize and getter/setter variable in a class?
<apeiros> sonvu_ae: ?
<apeiros> use initialize method to initialize. use attr_accessor to define getter/setter
<sonvu_ae> yeah i mean combine them together
Mon_Robot has quit [Remote host closed the connection]
Mon_Robot has joined #ruby-lang
weems|mac has joined #ruby-lang
<sonvu_ae> my class have 2 variable age and name
<apeiros> in that case: none
<sonvu_ae> class Foo
<sonvu_ae> attr_accessor :name, :age, :email, :gender, :height
<sonvu_ae> @age = age
<sonvu_ae> @name = name
<sonvu_ae> def initialize(name, age, email, gender, height)
<sonvu_ae> @email = email
<sonvu_ae> @gender = gender
<sonvu_ae> @height = height
<sonvu_ae> end
<sonvu_ae> end
<apeiros> dude
<sonvu_ae> is what i found
<apeiros> gist.github.com
<sonvu_ae> ok sorry
<apeiros> and yes, that's the common way. if you don't want that, you'll have to write something which does that for you.
<apeiros> IME it's not worth to meta-program this
<apeiros> if this is all your class does, consider Foo = Struct.new(:name, :age, :email, :gender, :height)
valner has quit [Quit: valner]
valner has joined #ruby-lang
<sonvu_ae> ok thanks you
thoolihan has quit [Ping timeout: 240 seconds]
thoolihan has joined #ruby-lang
yfeldblum has joined #ruby-lang
banisterfiend has quit [Quit: Computer has gone to sleep.]
weems|mac has quit [Quit: weems|mac]
shinnya has joined #ruby-lang
AncientAmateur has joined #ruby-lang
bradcliffe has joined #ruby-lang
bradcliffe has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 260 seconds]
rcvalle has joined #ruby-lang
sarkyniin has quit [Quit: Quitte]
benlovell has joined #ruby-lang
gregf_ has joined #ruby-lang
valner has quit [Quit: valner]
valner has joined #ruby-lang
valner has quit [Client Quit]
valner has joined #ruby-lang
valner has quit [Client Quit]
hgl__ has quit [Quit: Computer has gone to sleep.]
valner has joined #ruby-lang
hgl__ has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vvikus has quit [Ping timeout: 240 seconds]
loincloth has joined #ruby-lang
hgl__ has quit [Ping timeout: 272 seconds]
benlovell has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby-lang
dwknoxy has joined #ruby-lang
cmhobbs has joined #ruby-lang
benlovell has joined #ruby-lang
ponch_ has joined #ruby-lang
Cakey has joined #ruby-lang
JohnFord has joined #ruby-lang
touzin has joined #ruby-lang
valner has left #ruby-lang [#ruby-lang]
nathanstitt has joined #ruby-lang
symm-_ has joined #ruby-lang
karamazov has joined #ruby-lang
symm- has quit [Ping timeout: 250 seconds]
symm- has joined #ruby-lang
symm-_ has quit [Read error: Connection reset by peer]
davidfrey has quit []
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
foucist has joined #ruby-lang
<foucist> how do you add hash of arrays together like: {:a => [0,1,2]} + {:a => [0,0,2]} => {:a => [0,1,4] }
bantic has joined #ruby-lang
<whitequark> you can pass a block to Hash#merge
hgl__ has joined #ruby-lang
yubrew has joined #ruby-lang
<foucist> whitequark: the merge dumps the first array and keeps the second
<foucist> it doesn't add the arrays together
<sluukkonen> >> {:a => [0,1,2]}.merge({:a => [0,0,2]}) { |k, o, v| o.zip(v).map { |a, b| a + b} }
<Mon_Robot> sluukkonen: => {:a=>[0, 1, 4]} (https://eval.in:443/170628)
<sluukkonen> or whatever
<foucist> nice, thanks
<foucist> just noticed the block bit heh
kwd has quit [Read error: Connection reset by peer]
touzin has quit [Quit: Leaving.]
kwd has joined #ruby-lang
hgl__ has quit [Ping timeout: 260 seconds]
saarinen has joined #ruby-lang
chouhoulis has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
scmx has joined #ruby-lang
x0f has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby-lang
x0f has joined #ruby-lang
kwd has quit [Quit: Leaving.]
test_ has joined #ruby-lang
Guest18316 has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
vincent__ has joined #ruby-lang
vincent__ is now known as Guest5221
stamina has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
banister has quit [Ping timeout: 272 seconds]
scmx has quit [Ping timeout: 250 seconds]
Guest5221 has quit [Ping timeout: 250 seconds]
vvikus has joined #ruby-lang
apeiros has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
jonathan_alban has quit [Quit: Textual IRC Client: www.textualapp.com]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
tomkadwill has joined #ruby-lang
banister has joined #ruby-lang
saarinen has joined #ruby-lang
nathanstitt has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
apeiros has quit [Ping timeout: 264 seconds]
AKASkip has quit [Ping timeout: 264 seconds]
sonvu_ae has quit [Remote host closed the connection]
mistym has joined #ruby-lang
solars has quit [Ping timeout: 245 seconds]
Cakey has joined #ruby-lang
tomkadwill has quit []
bronky has joined #ruby-lang
mistym has quit [Remote host closed the connection]
banister has quit [Ping timeout: 255 seconds]
nathanstitt has quit [Read error: Connection reset by peer]
jlovick has joined #ruby-lang
bantic has quit [Quit: bantic]
nathanstitt has joined #ruby-lang
foucist has quit [Quit: leaving]
Sirupsen has joined #ruby-lang
shemerey has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davispuh has joined #ruby-lang
Technodrome has joined #ruby-lang
mistym has joined #ruby-lang
skade has joined #ruby-lang
Cakey has quit [Ping timeout: 264 seconds]
nathanstitt has quit [Ping timeout: 250 seconds]
diegoviola has joined #ruby-lang
centrx has joined #ruby-lang
apeiros has joined #ruby-lang
yfeldblum has joined #ruby-lang
monees has joined #ruby-lang
banister has joined #ruby-lang
nathanstitt has joined #ruby-lang
yfeldblum has quit [Ping timeout: 260 seconds]
vincent__ has joined #ruby-lang
jgpawletko has joined #ruby-lang
vincent__ is now known as Guest61100
anjen has joined #ruby-lang
anjen has quit [Read error: Connection reset by peer]
test_ has quit [Quit: Leaving]
matti has quit [Quit: Oh dear...]
test_ has joined #ruby-lang
test__ has joined #ruby-lang
test__ has quit [Client Quit]
sharpmachine has joined #ruby-lang
jlovick has quit [Remote host closed the connection]
tbuehlmann has quit [Quit: Leaving]
jlovick has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
shemerey has joined #ruby-lang
Technodrome has quit [Quit: Technodrome]
banisterfiend has quit [Quit: Computer has gone to sleep.]
Technodrome has joined #ruby-lang
test_ has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby-lang
banisterfiend has joined #ruby-lang
banisterfiend has quit [Client Quit]
bantic has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sirupsen has joined #ruby-lang
mehlah has joined #ruby-lang
AncientAmateur has quit [Remote host closed the connection]
bantic has quit [Quit: bantic]
solars has joined #ruby-lang
jxpx777 has joined #ruby-lang
banister has quit [Ping timeout: 255 seconds]
alexju has joined #ruby-lang
benlovell has quit [Ping timeout: 255 seconds]
nathanstitt has quit [Read error: Connection reset by peer]
Mon_Robot has quit [Remote host closed the connection]
Mon_Robot has joined #ruby-lang
nathanstitt has joined #ruby-lang
vvikus has quit [Ping timeout: 240 seconds]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
__butch__ has joined #ruby-lang
banister has joined #ruby-lang
benlovell has joined #ruby-lang
ironhide_604 has quit [Ping timeout: 264 seconds]
tbuehlmann has joined #ruby-lang
alexju has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Ping timeout: 245 seconds]
rippa has joined #ruby-lang
alexju has joined #ruby-lang
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistym has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
tectonic has joined #ruby-lang
yfeldblum has joined #ruby-lang
Miphix has quit [Quit: Leaving]
benlovell has quit [Ping timeout: 245 seconds]
francisfish has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
yfeldblum has quit [Ping timeout: 240 seconds]
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
anjen has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
AncientAmateur has joined #ruby-lang
toastynerd has joined #ruby-lang
ironhide_604 has joined #ruby-lang
anjen has quit [Client Quit]
kek has quit [Ping timeout: 250 seconds]
toastynerd has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 240 seconds]
toastynerd has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
mikecmpbll has joined #ruby-lang
mistym has joined #ruby-lang
CaptainJet has joined #ruby-lang
banister_ has joined #ruby-lang
banister has quit [Read error: Connection reset by peer]
JohnFord has joined #ruby-lang
ponch_ has quit [Ping timeout: 272 seconds]
elia has quit [Quit: Computer has gone to sleep.]
ht_ has joined #ruby-lang
_ht has quit [Ping timeout: 250 seconds]
vvikus has joined #ruby-lang
wallerdev has joined #ruby-lang
vintik has joined #ruby-lang
nathanstitt has quit [Read error: Connection reset by peer]
benlovell has joined #ruby-lang
workmad3 has quit [Ping timeout: 264 seconds]
cleopatra has joined #ruby-lang
charliesome has joined #ruby-lang
amerine has quit [Ping timeout: 264 seconds]
amerine has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
toastynerd has quit [Read error: Connection reset by peer]
toastynerd has joined #ruby-lang
banister has joined #ruby-lang
banister_ has quit [Read error: Connection reset by peer]
Guest61100 has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 245 seconds]
postmodern has joined #ruby-lang
blurredbits has joined #ruby-lang
weems|mac has joined #ruby-lang
tectonic has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mykoweb has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
mykoweb has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
mykoweb has quit [Ping timeout: 240 seconds]
elia has joined #ruby-lang
stamina has joined #ruby-lang
nathanstitt has joined #ruby-lang
brianpWins has joined #ruby-lang
benlovell has joined #ruby-lang
havenwood has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
devgiant has joined #ruby-lang
cleopatra has quit [Quit: Saliendo]
matti has joined #ruby-lang
dfranciosi has joined #ruby-lang
elia has quit [Ping timeout: 260 seconds]
benlovell has quit [Ping timeout: 260 seconds]
jxie_ has quit [Ping timeout: 264 seconds]
jxie has joined #ruby-lang
banister is now known as banisterfiend
vvikus has quit [Quit: WeeChat 0.4.2]
Asher has quit [Quit: Leaving.]
charliesome has joined #ruby-lang
agarie has joined #ruby-lang
banister has joined #ruby-lang
mykoweb has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banister is now known as banisterfiend
stamina has quit [Ping timeout: 255 seconds]
AKASkip has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
ohsix has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Quit: WeeChat 0.4.3]
arooni-mobile has joined #ruby-lang
vintik has quit [Remote host closed the connection]
alexju has quit [Remote host closed the connection]
__butch__ has quit [Quit: Leaving.]
loincloth has joined #ruby-lang
rcvalle has joined #ruby-lang
elia has joined #ruby-lang
hahuang65 has joined #ruby-lang
surrounder1 has joined #ruby-lang
nathanstitt has quit [Read error: Connection reset by peer]
surrounder has quit [Ping timeout: 256 seconds]
dwknoxy is now known as dknox-lunch
benlovell has joined #ruby-lang
yfeldblum has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Read error: Connection reset by peer]
banister has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
hahuang65 has quit [Read error: Connection reset by peer]
Fushi has quit [Quit: Connection closed for inactivity]
hahuang65 has joined #ruby-lang
jxpx777_ has joined #ruby-lang
jxpx777_ has quit [Client Quit]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
weems|mac has quit [Quit: weems|mac]
jxpx777 has quit [Ping timeout: 250 seconds]
nathanstitt has joined #ruby-lang
stardiviner has quit [Ping timeout: 250 seconds]
nathanstitt has quit [Client Quit]
marr has quit [Ping timeout: 260 seconds]
JohnFord has joined #ruby-lang
malconis has quit [Remote host closed the connection]
malconis has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
Voker57 has quit [Ping timeout: 245 seconds]
__butch__ has joined #ruby-lang
sarkyniin has joined #ruby-lang
nathanstitt has joined #ruby-lang
malconis has quit [Client Quit]
vincent__ has joined #ruby-lang
vincent__ is now known as Guest72320
malconis has joined #ruby-lang
malconis has quit [Remote host closed the connection]
malconis has joined #ruby-lang
AncientAmateur has quit [Remote host closed the connection]
surrounder1 is now known as surrounder
Guest72320 has quit [Ping timeout: 240 seconds]
elikem has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
banister has quit [Read error: Connection reset by peer]
banister_ has joined #ruby-lang
JokerDoom has joined #ruby-lang
bartoindahouse has joined #ruby-lang
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_JokerDoom has quit [Ping timeout: 245 seconds]
pixelhandler has joined #ruby-lang
jxpx777 has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
malconis has quit [Quit: Textual IRC Client: www.textualapp.com]
jxpx777 has quit [Client Quit]
malconis has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mistym has quit [Remote host closed the connection]
dfranciosi has quit []
elikem has quit [Read error: Connection reset by peer]
diego__ has joined #ruby-lang
AKASkip has quit [Read error: Connection reset by peer]
diego__ has quit [Ping timeout: 272 seconds]
AKASkip has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
pixelhandler has quit [Quit: pixelhandler]
banister has joined #ruby-lang
banister_ has quit [Read error: Connection reset by peer]
loincloth has joined #ruby-lang
vintik has joined #ruby-lang
Asher has joined #ruby-lang
djbkd has joined #ruby-lang
sharpmachine has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
mistym has joined #ruby-lang
chouhoul_ has joined #ruby-lang
ironhide_604 has quit [Ping timeout: 264 seconds]
_djbkd has joined #ruby-lang
djbkd has quit [Ping timeout: 264 seconds]
shemerey has quit [Quit: Textual IRC Client: www.textualapp.com]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ironhide_604 has joined #ruby-lang
Squarepy has joined #ruby-lang
chouhoulis has quit [Ping timeout: 264 seconds]
_djbkd has quit [Ping timeout: 250 seconds]
mykoweb has joined #ruby-lang
Mon_Robot has quit [Remote host closed the connection]
Mon_Robot has joined #ruby-lang
ht_ has quit [Remote host closed the connection]
mehlah has joined #ruby-lang
JohnFord has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
vincent__ has joined #ruby-lang
toastynerd has joined #ruby-lang
vincent__ is now known as Guest379
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
francisfish has quit []
godd2 has joined #ruby-lang
yfeldblum has quit [Ping timeout: 250 seconds]
Guest379 has quit [Ping timeout: 250 seconds]
djbkd has quit [Remote host closed the connection]
nathanstitt has quit [Read error: Connection reset by peer]
jkprg has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
sharpmachine has joined #ruby-lang
banister has joined #ruby-lang
<sarkyniin> hey
<sarkyniin> I'm trying to do a function in my irc bot that allows a user to kickban only if the user is OP and the target isn't an op/admin
<sarkyniin> or the user is admin and the target isn't admin
<sarkyniin> if m.user == $op && query.user != $op && query.user != $admin || m.user == $admin && query.user != $admin
<sarkyniin> this doesn't seem to work
<sarkyniin> (m.user is the user and query.user is the target)
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
nathanstitt has joined #ruby-lang
heftig has joined #ruby-lang
<centrx> sarkyniin, That's a pretty complicated expression to not have any parentheses
<centrx> sarkyniin, You should split it up into methods that actually describe what are you trying to do
<centrx> sarkyniin, Rather than stringing together a single long, complicated boolean expression
<sarkyniin> I guess
<wallerdev> just add parenthesis on how you think it should be evaluated
<wallerdev> and see if it works then
<centrx> if !user.op? && !target.admin?
<centrx> easy as pie
<centrx> unless user.op? || target.admin?
jaimef has quit [Excess Flood]
jaimef has joined #ruby-lang
ponch_ has joined #ruby-lang
ponch_ has quit [Remote host closed the connection]
chris2 has quit [Ping timeout: 240 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
diegoviola has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
mistym has quit [Remote host closed the connection]
yubrew has quit []
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
elia has joined #ruby-lang
banister has joined #ruby-lang
mistym has joined #ruby-lang
nathanstitt has quit [Read error: Connection reset by peer]
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Atttwww has joined #ruby-lang
jeff_r has joined #ruby-lang
nathanstitt has joined #ruby-lang
nathanstitt has quit [Client Quit]
loincloth has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
dangerou_ has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
dangerousdave has quit [Read error: Connection reset by peer]
mykoweb has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
mykoweb has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
centrx has quit [Quit: Mead error: Connection reset by beer]
vincent__ has joined #ruby-lang
vincent__ is now known as Guest46514
yfeldblum has quit [Ping timeout: 240 seconds]
mykoweb has quit [Ping timeout: 240 seconds]
jkprg has quit [Quit: jkprg]
mykoweb has joined #ruby-lang
Sirupsen has joined #ruby-lang
jkprg has joined #ruby-lang
mykoweb has quit [Remote host closed the connection]
mykoweb has joined #ruby-lang
nottheoilrig has quit [Remote host closed the connection]
nottheoilrig has joined #ruby-lang
stardiviner has joined #ruby-lang
Guest46514 has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
jkprg has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby-lang
mykoweb has quit [Ping timeout: 260 seconds]
jgpawletko has quit [Quit: jgpawletko]
yfeldblum has joined #ruby-lang
wallerdev has joined #ruby-lang
dangerou_ has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
banister has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sirupsen has quit [Ping timeout: 245 seconds]
banister has joined #ruby-lang
bin7me has quit [Quit: Leaving]
Sirupsen has joined #ruby-lang
bin7me has joined #ruby-lang
chris2 has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bin7me has quit [Client Quit]
banister has quit [Client Quit]
bin8me has joined #ruby-lang
malconis has joined #ruby-lang
bin8me has quit [Client Quit]
chris2 has quit [Client Quit]
chris2 has joined #ruby-lang
malconis has quit [Client Quit]
nathanstitt has joined #ruby-lang
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
devgiant has quit [Quit: Leaving]
chouhoulis has quit [Ping timeout: 250 seconds]
spuk has joined #ruby-lang
mykoweb has joined #ruby-lang
spuk has quit [Read error: Connection reset by peer]
yfeldblu_ has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 264 seconds]
benlovell has quit [Ping timeout: 264 seconds]
woollyams has joined #ruby-lang
yfeldblum has joined #ruby-lang
KM has joined #ruby-lang
Guest49096 has quit [Read error: Connection reset by peer]
KM is now known as Guest85999
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spuk has joined #ruby-lang
woollyams has quit [Ping timeout: 272 seconds]
__butch__ has quit [Quit: Leaving.]
agarie has quit [Quit: Leaving...]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jsullivandigs has quit [Remote host closed the connection]
jeff_r has quit [Remote host closed the connection]
jeff_r has joined #ruby-lang
banisterfiend has joined #ruby-lang
jeff_r has quit [Ping timeout: 245 seconds]
DivineEntity has joined #ruby-lang
alexju has joined #ruby-lang
Squarepy has quit [Remote host closed the connection]
solars has quit [Ping timeout: 250 seconds]
jsullivandigs has joined #ruby-lang
nathanstitt has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
cmhobbs has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
jsullivandigs has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 0.4.3]
jkprg has joined #ruby-lang
nathanstitt has quit [Read error: Connection reset by peer]
bin7me has joined #ruby-lang
alexju_ has joined #ruby-lang
alexju has quit [Read error: Connection reset by peer]
loincloth has quit [Remote host closed the connection]
Technodrome has quit [Quit: Technodrome]
bin7me has quit [Client Quit]
jkprg has quit [Ping timeout: 255 seconds]
vincent__ has joined #ruby-lang
vincent__ is now known as Guest25732
karamazov has quit [Remote host closed the connection]
jarto has joined #ruby-lang
Sgeo has joined #ruby-lang
jlovick has quit [Ping timeout: 240 seconds]
apeiros has quit [Remote host closed the connection]
mannyt has quit [Quit: Connection closed for inactivity]
Technodrome has joined #ruby-lang
apeiros has joined #ruby-lang
bruno- has quit [Ping timeout: 260 seconds]
ohsix has joined #ruby-lang
ari-_-e has joined #ruby-lang
bartoindahouse has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
apeiros has quit [Ping timeout: 240 seconds]
Guest25732 has quit [Ping timeout: 250 seconds]
mykoweb has quit [Remote host closed the connection]
blurredbits has quit [Quit: ZZZzzz…]
banister has joined #ruby-lang
mykoweb has joined #ruby-lang
AKASkip has quit [Ping timeout: 245 seconds]
nathanstitt has joined #ruby-lang
nathanstitt has quit [Client Quit]
woollyams has joined #ruby-lang
jeff_r has joined #ruby-lang
nathanstitt has joined #ruby-lang
jeff_r has quit [Client Quit]
nathanstitt has quit [Client Quit]
mykoweb has quit [Remote host closed the connection]
jarto has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
dangerousdave has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
senoralastair has left #ruby-lang [#ruby-lang]
ironhide_604 has quit [Ping timeout: 264 seconds]
vincent has joined #ruby-lang
vincent is now known as Guest57533
monees has quit [Ping timeout: 250 seconds]
cornerman has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
ap4y has joined #ruby-lang
Asher1 has joined #ruby-lang
rubynewbie has joined #ruby-lang
<rubynewbie> hey need some help with a simple regex :/
<rubynewbie> someone can help?
cornerma1 has quit [Ping timeout: 255 seconds]
hahuang61 has joined #ruby-lang
Asher has quit [Ping timeout: 245 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
ari-_-e has quit [Quit: Leaving]
godd2 has quit [Ping timeout: 245 seconds]
kalehv has joined #ruby-lang
<drbrain> rubynewbie: probably!
bronky has quit [Ping timeout: 245 seconds]
<rubynewbie> so
<rubynewbie> i have a string like:
<rubynewbie> "[RandomWord] abc 123"
<rubynewbie> and i want to remove [RandomWord]
<rubynewbie> so i just have abc 123
<drbrain> what did you try?
<rubynewbie> well i used simple if and else but looks ugly
Technodrome has quit [Quit: Technodrome]
<rubynewbie> i never worked with regex
<drbrain> can you show it? if its more than three lines, paste to gist.github.com
<rubynewbie> but its not regex
<rubynewbie> if name.include? "[name1]"
<rubynewbie> but it wourld be nicer with a regex
Guest57533 has quit [Ping timeout: 255 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<drbrain> here's a start:
jonathanmarvens has joined #ruby-lang
hahuang61 has quit [Quit: WeeChat 0.4.3]
hahuang65 has joined #ruby-lang
jaimef has quit [Excess Flood]
godd2 has joined #ruby-lang
jaimef has joined #ruby-lang
<rubynewbie> the solution
<drbrain> are your random words only two characters long?
<rubynewbie> no
<rubynewbie> damn :D
shinnya has quit [Ping timeout: 255 seconds]
<drbrain> so then use + after instead of . before (as . matches any character)
<serhart> rubynewbie: maybe something like http://www.rubular.com/r/KFFXK1EctC ?
yfeldblum has quit [Remote host closed the connection]
<drbrain> yep
<drbrain> you can put in multiple test strings too
yfeldblum has joined #ruby-lang
nathanstitt has joined #ruby-lang
<rubynewbie> ok so + makes a loop
<rubynewbie> thank u guys
nathanstitt has quit [Client Quit]
<drbrain> yes
<drbrain> you're welcome
yfeldblum has quit [Remote host closed the connection]
<serhart> rubynewbie: sort of, + is a meta character
kalehv has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
yfeldblum has joined #ruby-lang
shinnya has joined #ruby-lang
ap4y has quit [Remote host closed the connection]
Sirupsen has joined #ruby-lang
ap4y has joined #ruby-lang
bruno- has joined #ruby-lang
banister has joined #ruby-lang
godd2 has quit [Ping timeout: 264 seconds]
bartoindahouse has joined #ruby-lang
thrownaway has joined #ruby-lang
bruno- has quit [Ping timeout: 255 seconds]
arooni-mobile has quit [Ping timeout: 245 seconds]
bartoindahouse has quit [Ping timeout: 250 seconds]
apeiros has joined #ruby-lang
alexju_ has quit [Remote host closed the connection]
sarkyniin has quit [Quit: Quitte]
sarkyniin has joined #ruby-lang
ari-_-e has joined #ruby-lang
apeiros has quit [Ping timeout: 260 seconds]
mykoweb has joined #ruby-lang
symm- has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Quit: WeeChat 0.4.3]
hahuang65 has joined #ruby-lang
Technodrome has joined #ruby-lang
arooni-mobile has joined #ruby-lang
Cakey has joined #ruby-lang
karamazov has joined #ruby-lang