apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
robbyoconnor has joined #ruby
jacktrick has quit [Quit: Leaving]
Jamie___ has joined #ruby
<Jamie___> hello?
<Jamie___> anyone here?
etcetera has quit [Ping timeout: 252 seconds]
<Jamie___> i could use some help with some ruby code
<jokke> Jamie___: shoot
<jokke> don't ask to ask
<Jamie___> i have been trying to use the "+=" operator, but it gives me an error
<Yulli> Is there any reason for me to use RVM if I don't want to switch between ruby versions?
<Xeago_> is there something wrong with my connection?
<jokke> Yulli: no
<Jamie___> in `<top (required)>': undefined method `+' for nil:NilClass (NoMethodError) from -e:1:in `load' from -e:1:in `<main>'
<Jamie___> that is my error
<jokke> Yulli: you will want to though
<Jamie___> how do i correct this?
<Yulli> jokke: For what reason? Is it wrong for me to stick with 1.9.3?
<jokke> Jamie___: you're trying to add something to nil
ckrailo has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
waxjar has quit [Ping timeout: 258 seconds]
<Jamie___> jokke: how do i correct this?
<jokke> Yulli: if you don't develop ruby (projects that require different ruby versions) you will not need to switch them.
<jokke> Jamie___: well.. you need to find out why it is nil
robbyoconnor has quit [Remote host closed the connection]
<Jamie___> so then i get teh error because there is no value in the variable?
<jokke> your first argument is nil
randomau_ has quit [Remote host closed the connection]
autumn has quit [Ping timeout: 252 seconds]
thomasfedb has quit [Ping timeout: 246 seconds]
<jokke> gist the code
mellow888 has quit [Quit: http://www.kiwiirc.com/ - A hand-crafted IRC client]
madb055 has joined #ruby
sivoais has quit [Ping timeout: 240 seconds]
otters has quit [Ping timeout: 256 seconds]
mercwithamouth has joined #ruby
fixl has quit [Remote host closed the connection]
stnly has quit [Ping timeout: 245 seconds]
Rym has joined #ruby
<Jamie___> clear
<Jamie___> yokke: here is the line of code where i get my error
<Jamie___> finaltotal += itemtotal
<jokke> that doesn't help... at all
randomautomator has joined #ruby
<jokke> i need to see the whole thing
<Jamie___> ok
<Jamie___> give me a 2nd
<jokke> or you tell me what you think finaltotal should be
bubblehead has quit [Remote host closed the connection]
<Yulli> jokke: Okay, thanks. :)
<jokke> is this the first time you have it in your code?
tommyvyo has quit [Quit:]
<jokke> if so it is nil of course.
bricker has quit [Ping timeout: 248 seconds]
stnly has joined #ruby
autumn has joined #ruby
<jokke> you need to set it to an initial value (like 0 or what ever)
thomasfedb has joined #ruby
eliasp has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
eliasp has joined #ruby
<Jamie___> yokke i though values were already initialized to 0 in ruby
momomomomo has joined #ruby
<jokke> no
<jokke> wrong
otters has joined #ruby
waxjar has joined #ruby
tspike has quit [Ping timeout: 240 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
fixl has joined #ruby
etcetera has joined #ruby
nathancahill has quit [Quit: nathancahill]
<jokke> Jamie___: for the future: gem install pry && gem install pry-nav. Then include 'pry-nav' in your project and if you get any error just put binding.pry before the line that gives you the error. Then you can inspect variables etc and can move around in your code with next or step or continue
<jokke> actually just gem install pry-nav
alexim has quit [Quit: bye]
<jokke> pry will be dependency
<jokke> afaik
<jokke> pry is like irb but better
BSaboia has joined #ruby
ferdev has quit [Ping timeout: 252 seconds]
<banister_> Jamie___: or use pry-rescue which will automatically open pry when u get an error
pcarrier_ has joined #ruby
rwilcox has quit []
<jeffreylevesque> someone tell me how to acquire ruby build log?
<banister_> jeffreylevesque: no
<banister_> refusal
Rumsteak has quit [Quit: Rumsteak]
slainer68 has joined #ruby
<jeffreylevesque> haha, ok!
timmow has joined #ruby
sivoais has joined #ruby
<Jamie___> jokke: here is the code
<Jamie___> itax = (amount * cost * 0.15 * 20.0).round / 20.0 taxsum += itax itemtotal = itax + (amount * cost) finaltotal += itemtotal
rads has joined #ruby
<jokke> Jamie___: that's everything there is?
<jokke> still please use gist next time
<Jamie___> its pretty lengthy
_nitti has joined #ruby
pavilionXP has joined #ruby
allaire has quit []
c0rn has quit [Quit: Computer has gone to sleep.]
jimeh_ has quit [Quit: Bye.]
eliasp has quit [Read error: Connection reset by peer]
bricker has joined #ruby
eliasp has joined #ruby
bubblehead has joined #ruby
c0rn has joined #ruby
<jokke> well as i said, you need to initialize your variables. It's as simple a that. From what i gather here i guess you're still quite new to programming so what i will tell you next might not make sense to you. Still: in ruby + is a _method_ because in ruby everything is an _object_ even numbers are objects. Somewhere in their source code they have a method definition like this def + other_number. even nil (which
<jokke> you might know as null from other languages) is an object and it doesn't have that + method. There's your error explained. :)
c0rn has quit [Client Quit]
slainer68 has quit [Ping timeout: 255 seconds]
sivoais has quit [Ping timeout: 255 seconds]
<Jamie___> jokke i understand that thanks. i initialized it and while i dont get the error the values i want arent being calculated. here is the jist link https://gist.github.com/anonymous/e72edaf67ff9331eee36
stuartrexking has quit [Quit: Linkinus - http://linkinus.com]
timmow has quit [Ping timeout: 252 seconds]
ferdev has joined #ruby
sivoais has joined #ruby
moted has quit [Ping timeout: 264 seconds]
rburton- has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
rburton- has joined #ruby
<jokke> Jamie___: having a hard time reading that. Can you please edit it and set language to ruby?
<jokke> i would fork it and do it my self but my github account is not working properly atm
banjara has quit [Quit: Leaving.]
pioz has joined #ruby
LennyLinux has quit [Remote host closed the connection]
doritostains has quit [Quit: Leaving...]
feedbackloop has joined #ruby
nari has quit [Ping timeout: 255 seconds]
eliasp has quit [Read error: Connection reset by peer]
sivoais has quit [Ping timeout: 246 seconds]
eliasp has joined #ruby
tootooroo has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
<jokke> thats better ;)
Mattix has joined #ruby
sivoais has joined #ruby
tootooroo has joined #ruby
<jokke> your indentation still kinda sucks but oh well
yshh has quit [Remote host closed the connection]
tish has joined #ruby
rads has quit []
c0rn has joined #ruby
idkazuma has quit [Remote host closed the connection]
sambio has quit []
mattbl has quit [Quit: This computer has gone to sleep]
nezumi has joined #ruby
rburton- has quit [Read error: Connection reset by peer]
mattbl has joined #ruby
<jokke> okay now..
rburton- has joined #ruby
<shevy> jokke hehe
<Jamie___> im here jokke
<jokke> shevy: i copied it to vim and let it indent it correctly
hogeo has joined #ruby
<shevy> I usually tell people to fix their indent first
<jokke> so Jamie___ where's the problem
<shevy> it is a simple sign of intelligence :)
<jokke> i'm too kind
<shevy> yeah
<Jamie___> well
<shevy> by the way Jamie___
sivoais has quit [Ping timeout: 246 seconds]
<Jamie___> i actually just ran the program after your suggestion and its works lol
<shevy> you can replace things like:
<shevy> elsif name == "Bottle of Perfume" or name == "Music CD"
<shevy> with
<shevy> when "Bottle of Perfume","Music CD"
<shevy> if you use a case menu
<Jamie___> just had to initialize it
<jokke> :D
<jokke> lol
tommyvyo has joined #ruby
Domon has joined #ruby
<jokke> Jamie___: also a good idea might be to check if name.start_with? "Imported"
<shevy> yeah, you can use if/else/elsif too, I just find case/when simpler when the checks are long
<shevy> Jamie___ in ruby it usually is best to be as short as possible
<jokke> but that wouldn't work like that in a case/when
<Jamie___> ii can do that?
<jokke> yes you can :)
sivoais has joined #ruby
rburton- has quit [Client Quit]
<Jamie___> i have a general question with while statements. can i use a string when using a condition?
Domon has quit [Remote host closed the connection]
<shevy> and I think puts " " is the same as puts alone, or?
<Jamie___> like while (variable != "string")?
bean has joined #ruby
<shevy> jokke he should be able to, for Imported in case/when, he could use:
<shevy> when /^Imported/
<jokke> shevy: puts alone adds a newline, so yeah thats what he wants
<shevy> which should be equal to start_with? for a string object
randomautomator has quit [Remote host closed the connection]
madb055 has quit [Ping timeout: 264 seconds]
<jokke> sure
<jokke> but then he has to know about regexp
<shevy> hehehehe
<shevy> good point
<shevy> he does not even know what indent is :D
<shevy> Jamie___ you can use everything that can be used in ruby for a valid conditional check
<jokke> Jamie___: have you written some methods in ruby?
<shevy> it must evaluate to true or false
<shevy> while (true) # continue for any condition that evals to true
<Jamie___> i am going to to handle the calculations
<jokke> because you could make the thing a whole bit shorter by defining a method which calculates your item total and puts your string
julian-delphiki has quit [Ping timeout: 256 seconds]
<jokke> you have a lot of redundance there. Redundance is always bad
tomsthumb has quit [Quit: Leaving.]
<Jamie___> so i see
DonRichie has quit [Ping timeout: 256 seconds]
pitzips has joined #ruby
DonRichie has joined #ruby
sambio has joined #ruby
sambio has joined #ruby
sambio has quit [Changing host]
browndawg has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
<jokke> you see the three calculations are almost identical. You woudn't think so about the last one because it doesn't have a tax, but once you set tax to 0 you can use the same calculation tax + (amount * cost) you see?
<Jamie___> true
<Jamie___> so use a simple method to handle the calculations
<Jamie___> and then when i need it i can call it whenever i need it in the code right?
pac1 has joined #ruby
timmow has joined #ruby
<jokke> basically you're calculation depends on three variables: tax percentage, item_cost and amount, right?
niklasb has quit [Ping timeout: 264 seconds]
rdev5|away has quit [Quit: Leaving...]
<Jamie___> yes
sivoais has quit [Ping timeout: 252 seconds]
bradleyprice has quit [Remote host closed the connection]
sivoais has joined #ruby
<jokke> so now you can write a method which gets those three variables and calculates what you need and puts the string you need. (then you need to pass name too)
Ontolog_ has quit [Remote host closed the connection]
<Jamie___> ok
doritostains has joined #ruby
<jokke> good luck Jamie___ and happy coding
<Jamie___> can i create the method and and call it all in the same code?
<jokke> yes
<Jamie___> ok
<Jamie___> thats it then
angusiguess has joined #ruby
<Jamie___> this chat is fuckin awesome!
<jokke> put the method definition on top
<Jamie___> thanks for your help
Ohga has joined #ruby
<jokke> no problem :)
<Xeago_> apeiros: you awake perhaps>?
timmow has quit [Ping timeout: 252 seconds]
<Ohga> hello, what might be wrong with: https://gist.github.com/rogernorling/5297336
<Xeago_> would anyone mind giving my resume a comment? disaster recovery plans
<Xeago_> bah, stupid copy paste
danslo has quit [Quit: danslo]
eliasp_ has joined #ruby
jumpei has joined #ruby
eliasp has quit [Read error: Connection reset by peer]
<jokke> Jamie___: still there? what editor are you using?
<jokke> on what operating system are you on?
yshh has joined #ruby
axsuul_ has joined #ruby
Tricon has quit [Quit: Leaving...]
Nisstyre-laptop has joined #ruby
sivoais has quit [Ping timeout: 248 seconds]
Domon has joined #ruby
NiteRain has joined #ruby
Jamie___ has quit [Ping timeout: 245 seconds]
<jokke> fuuuuuuuu.... i gotta get up in 4 hours!!
Yulli is now known as Yulli|away
willbradley has left #ruby [#ruby]
<jokke> alright time to sleep
<jokke> night
Yulli|away is now known as Yulli
jamie_ca_ has joined #ruby
__main__ has quit [Ping timeout: 252 seconds]
twoism has quit [Remote host closed the connection]
sambio has quit []
sivoais has joined #ruby
calmyournerves has quit [Read error: Operation timed out]
bricker`LA has joined #ruby
lewix has joined #ruby
freerobby has quit [Quit: Leaving.]
X-Jester has joined #ruby
etcetera has quit []
nari has joined #ruby
jamie_ca_ has quit [Client Quit]
<lewix> unstable: most of the plugins are unstable
pcarrier_ has quit [Quit: Computer has gone to sleep.]
ebobby has quit [Ping timeout: 264 seconds]
eliasp_ has quit [Read error: Connection reset by peer]
calmyournerves has joined #ruby
rupee has quit [Quit: Leaving]
eliasp has joined #ruby
onceler has joined #ruby
tommyvyo has quit [Quit:]
jhowarth has joined #ruby
thejefflarson_ has joined #ruby
tommyvyo has joined #ruby
Matip has joined #ruby
feedbackloop has quit [Quit: Leaving]
rdev has joined #ruby
feedbackloop has joined #ruby
wyhaines has quit [Remote host closed the connection]
tomsthumb has joined #ruby
eliasp has quit [Read error: Connection reset by peer]
eliasp has joined #ruby
pioz has quit [Quit: This computer has gone to sleep]
sivoais has quit [Ping timeout: 245 seconds]
Yulli is now known as Yulli|away
Mattix has quit [Ping timeout: 240 seconds]
sivoais has joined #ruby
robscomputer_ has quit [Remote host closed the connection]
flowerhack has joined #ruby
X-Jester has quit [Ping timeout: 252 seconds]
tew88 has joined #ruby
__main__ has joined #ruby
pcarrier_ has joined #ruby
kofno has joined #ruby
im0b has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
voodoofish430 has quit [Quit: Leaving.]
cam` has joined #ruby
mtlatif has joined #ruby
notbrent has joined #ruby
ariedler has quit [Remote host closed the connection]
veer has quit [Ping timeout: 258 seconds]
sambio has joined #ruby
mercwithamouth has joined #ruby
`brendan has joined #ruby
veer has joined #ruby
Xeago_ is now known as Xeago
ebobby has joined #ruby
sivoais has quit [Ping timeout: 264 seconds]
anonymuse has quit [Quit: Leaving...]
brianpWins has quit [Quit: brianpWins]
sivoais has joined #ruby
madb055 has joined #ruby
momomomomo has quit [Quit: momomomomo]
eliasp_ has joined #ruby
eliasp has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
bigoldrock has quit [Read error: Operation timed out]
veer has quit [Ping timeout: 258 seconds]
TheFuzzball has quit [Quit: Leaving...]
madb055 has quit [Ping timeout: 276 seconds]
dhruvasagar has joined #ruby
sivoais has quit [Ping timeout: 264 seconds]
X-Jester has joined #ruby
ilyam has quit [Quit: ilyam]
pskosinski has quit [Quit: Red Eclipse developer and moderators are racist: http://pawelk.pl/racist-red-eclipse-quin-zeroknight-gingerbear/]
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
sivoais has joined #ruby
havenwood has quit [Remote host closed the connection]
veer has joined #ruby
jonathanwallace has joined #ruby
eliasp has joined #ruby
freerobby has joined #ruby
eliasp_ has quit [Read error: Connection reset by peer]
rickmasta has joined #ruby
tylersmith has joined #ruby
hiyakashi has quit [Quit: お前は知りすぎた]
kofno has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
chong_ has quit [Quit: Leaving]
chong has joined #ruby
beneggett has joined #ruby
sharkbyteusa has quit [Quit: WeeChat 0.3.7]
chong is now known as Guest9250
Guest9250 has quit [Client Quit]
BSaboia has quit [Ping timeout: 258 seconds]
chongyu has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
heliumsocket_ has joined #ruby
axsuul_ has quit [Quit: axsuul_]
Nisstyre-laptop has quit [Read error: Operation timed out]
sivoais has quit [Ping timeout: 260 seconds]
heliumsocket has quit [Ping timeout: 258 seconds]
heliumsocket_ is now known as heliumsocket
ariedler has joined #ruby
hamakn has joined #ruby
nathancahill has joined #ruby
sivoais has joined #ruby
jumpei has quit []
jumpei has joined #ruby
freerobby has quit [Ping timeout: 260 seconds]
Tricon has joined #ruby
apok has quit [Quit: apok]
drim has quit [Quit: drim]
skattyadz has quit [Quit: skattyadz]
heliumsocket has quit [Ping timeout: 252 seconds]
jumpei has quit [Client Quit]
jumpei has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
kofno has joined #ruby
SCommette has joined #ruby
sivoais has quit [Ping timeout: 240 seconds]
Hanmac2 has joined #ruby
sivoais has joined #ruby
alainus has joined #ruby
JamieJ has joined #ruby
<alainus> how can I loop through a hash in a block ? I can only find hash.each_pair { |k,v| function } in the docs
<JamieJ> ok back...
beneggett has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
jbueza has quit [Quit: Leaving.]
Skofo has joined #ruby
mhf has quit [Remote host closed the connection]
<Xeago> alainus: what kind of loop are you looking for?
mhf has joined #ruby
<alainus> Xeago: I was wrong. .each do |k,v| works fine
Nisstyre-laptop has joined #ruby
Evixion has quit []
Evixion has joined #ruby
zeroeth has joined #ruby
sivoais has quit [Read error: Connection reset by peer]
chaluopa has joined #ruby
sivoais has joined #ruby
Animawish has joined #ruby
Xeago has quit [Remote host closed the connection]
<banister_> alainus: .each_pair and .each are exactly the same
<Animawish> i want to write a regex that matches "asdfxasdf" but not "asdf(x)asdf"
eliasp has quit [Ping timeout: 240 seconds]
eliasp_ has joined #ruby
<Animawish> where the asdfs can be 0 or more word characters
mahmoudimus has quit [Quit: Computer has gone to sleep.]
rcosta has quit [Remote host closed the connection]
<alainus> I read somewhere that it is not recommended to store arrays in hashes, why ?
<banister_> alainus: to use them as *keys*
banister_ is now known as banister`sleep
mocfive has joined #ruby
<alainus> oh.
<alainus> no problem then
marcdel has quit []
mocfive has quit [Remote host closed the connection]
chongyu has quit [Quit: Leaving]
sambao21 has joined #ruby
ttt has joined #ruby
pac1 has quit [Ping timeout: 258 seconds]
eliasp has joined #ruby
eliasp_ has quit [Ping timeout: 258 seconds]
jumpei has quit []
mhf has quit [Read error: Connection reset by peer]
Tricon has quit [Quit: Leaving...]
mhf has joined #ruby
lewix has quit [Remote host closed the connection]
mephux has quit [Excess Flood]
browndawg has quit [Quit: Leaving.]
browndawg has joined #ruby
_nitti has quit [Remote host closed the connection]
eliasp has quit [Read error: Connection reset by peer]
jumpei has joined #ruby
freerobby has joined #ruby
eliasp has joined #ruby
generalissimo has joined #ruby
mephux has joined #ruby
jumpei has quit [Remote host closed the connection]
adkron has joined #ruby
browndawg has quit [Client Quit]
jumpei has joined #ruby
Monie has joined #ruby
freerobby has quit [Ping timeout: 258 seconds]
cburyta has quit [Remote host closed the connection]
Animawish has quit [Quit: Animawish]
Animawish has joined #ruby
nateberkopec has joined #ruby
Rym has quit [Quit: Rym]
Rym has joined #ruby
jumpei has quit []
<awc737> are there any good OOTB ecommerce solutions for Ruby? easy to develop on?
jumpei has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
eliasp_ has joined #ruby
shevy has quit [Ping timeout: 256 seconds]
eliasp has quit [Read error: Connection reset by peer]
yannis has quit [Quit: yannis]
heliumsocket has joined #ruby
freezey has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
kofno has quit [Remote host closed the connection]
ttt_ has joined #ruby
jumpei has quit [Remote host closed the connection]
jumpei has joined #ruby
anonymuse has joined #ruby
ping-pong has quit [Ping timeout: 264 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
mmitchell has quit [Remote host closed the connection]
generalissimo has quit [Read error: Connection reset by peer]
chaluopa has quit [Remote host closed the connection]
Tricon has joined #ruby
generalissimo has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
chaluopa has joined #ruby
heliumsocket_ has joined #ruby
shevy has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
mhf has quit [Remote host closed the connection]
heliumsocket has quit [Ping timeout: 252 seconds]
heliumsocket_ is now known as heliumsocket
Tricon has quit [Quit: Linkinus - http://linkinus.com]
jumpei has quit []
<tewlz> awc737: I have only messed with magento and spree (a ruby based ecommerce) and magento was a lot easier to work with, but I like ruby so I use spree.
ebobby has quit [Ping timeout: 260 seconds]
dougireton has joined #ruby
rads has joined #ruby
Yulli|away is now known as Yulli
jumpei has joined #ruby
radic has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
ping-pong has joined #ruby
aeontech has joined #ruby
slakware has joined #ruby
bigmac has quit [Quit: Leaving]
eliasp has joined #ruby
drim has joined #ruby
eliasp_ has quit [Ping timeout: 255 seconds]
radic_ has quit [Ping timeout: 248 seconds]
pavilionXP has joined #ruby
chimkan_ has joined #ruby
voodoofish has quit [Ping timeout: 252 seconds]
adkron has quit [Ping timeout: 240 seconds]
kofno has joined #ruby
<awc737> tewlz, spree seems to have very basic features compared to magento
<awc737> we need multi-site, heave product/attribute configuration
<awc737> but magento is a nightmare to develop on
rads has quit []
Yulli has left #ruby ["Bye bye"]
axsuul_ has joined #ruby
beneggett has joined #ruby
zph has joined #ruby
bradleyprice has joined #ruby
<GeekOnCoffee> tewlz: magento was easier to work with?
<GeekOnCoffee> awc737: did you look at the extension gallery? there's a lot of code for a lot of different things… It's the most powerful ruby option you're going to find, and set up well for doing custom implementations
<awc737> spree?
<GeekOnCoffee> yeah
zeroeth has quit [Ping timeout: 264 seconds]
<awc737> thanks i'll check it out
<GeekOnCoffee> awc737: #spree is generally fairly helpful too
brian_000_ has quit [Read error: Connection reset by peer]
eliasp_ has joined #ruby
voodoofish has joined #ruby
marcdel has joined #ruby
eliasp has quit [Ping timeout: 276 seconds]
tootooroo has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
sayan has joined #ruby
terrorpup has quit [Remote host closed the connection]
eliasp_ has quit [Read error: Connection reset by peer]
jumpei has quit [Remote host closed the connection]
eliasp has joined #ruby
drale2k has quit [Quit: Leaving...]
matayam has joined #ruby
sayan has quit [Max SendQ exceeded]
cearls has joined #ruby
aapzak has quit [Read error: Operation timed out]
jumpei has joined #ruby
sayan has joined #ruby
cearls has quit [Remote host closed the connection]
cearls has joined #ruby
seme has quit [Quit: Leaving.]
dhruvasagar has quit [Ping timeout: 246 seconds]
io_syl has quit [Quit: Computer has gone to sleep.]
eliasp has quit [Read error: Connection reset by peer]
eliasp has joined #ruby
aapzak has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
tootooroo has joined #ruby
sayan has quit [Read error: Connection reset by peer]
yacks has joined #ruby
v0n has quit [Ping timeout: 245 seconds]
pitzips has quit [Ping timeout: 248 seconds]
[rust] has joined #ruby
havenwood has joined #ruby
ilyam has joined #ruby
freerobby has joined #ruby
eliasp_ has joined #ruby
rubarLion has joined #ruby
eliasp has quit [Ping timeout: 255 seconds]
rezzack has quit [Ping timeout: 276 seconds]
nullx has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
<nullx> hi all, anyone have experience getting capybara going without rails?
aeontech has quit [Quit: aeontech]
dhruvasagar has joined #ruby
pcarrier_ has quit [Quit: Computer has gone to sleep.]
chimkan_ has quit [Quit: chimkan_]
<Quadlex> nullx: Yup, quite a bit
<Quadlex> What's the issue?
Ohga has left #ruby [#ruby]
jumpei has quit [Remote host closed the connection]
jumpei has joined #ruby
eliasp_ has quit [Read error: Operation timed out]
axsuul_ has quit [Quit: axsuul_]
allaire has joined #ruby
eliasp has joined #ruby
sayan has joined #ruby
<JamieJ> hello again
<JamieJ> quick question
<JamieJ> i am making a method where i am adding a value into an array. would i have to pass that array into the method?
zph has quit [Quit: Computer has gone to sleep.]
nfk has quit [Quit: yawn]
julian-delphiki has joined #ruby
theRoUS has joined #ruby
otherj has joined #ruby
bean has quit [Ping timeout: 252 seconds]
momomomomo has quit [Quit: momomomomo]
chimkan_ has joined #ruby
<Rym> JamieJ: is this a reference vs value question, or a learning to program question?
drale2k has joined #ruby
chimkan_ has quit [Client Quit]
<nullx> Quadlex: my bad, back now.. I wrote a basic example test in rspec, I wasn't able to get it to run.. Any chance you can tell me how you did it?
beneggett has joined #ruby
generalissimo has quit [Remote host closed the connection]
<Quadlex> nullx: All I had to do was include "capybara/rspec"
<Quadlex> And then add :type => :feature to the tests I wanted to use capybara with
<nullx> Quadlex: hmm?
<nullx> so put tests in spec/test_name.rb
<nullx> or
reset has quit [Ping timeout: 258 seconds]
<nullx> spec/test_suite/test_name.rb?
rubarLion has quit [Ping timeout: 248 seconds]
<nullx> maybe I'm just completely unfamilliar with rspec
bradleyprice has quit [Remote host closed the connection]
<Quadlex> Ph, and set the Capybara.app to your Rack app
<nullx> Rack..
<nullx> I'm not using Rack
<nullx> well I'm doing bare ruby basicly ;P)
<Quadlex> I don't think it matters where you're using them
<Quadlex> Wait, I'm wrong
<Quadlex> You ony need to set the Rack app if you're using a Rack app *duh*
nateberkopec has quit [Quit: Leaving...]
<nullx> hm
<Quadlex> But if you're not testing a rack application, you need to use a different driver then the default
<nullx> I just need a gateway to use phantomJS, that's what my 'app' per se is
<nullx> I'm not testing an application, it's more like this is the test
rubarLion has joined #ruby
mmitchell has joined #ruby
<Quadlex> There's the Capybara.javascript_driver which defaults to :selenium
<nullx> yup
ilyam has quit [Quit: ilyam]
<Quadlex> nullx: https://github.com/jonleighton/poltergeist Or the PhantomJS driver
<nullx> yeah that's what I am using
<nullx> basicly
<nullx> or trying to
<nullx> but that doesn't seem to be the problem
<nullx> if I run it via ruby, it requires it to be an actual test
<nullx> so I have to run it via rspec.. otherwise it doesn't see the includes or something
<Quadlex> I'm not entirely clear what the problem is
<Quadlex> Can you not run using rspec?
<nullx> I believe I don't know how to properly use rspec, and every attempt seems to fail
freerobby has joined #ruby
<Quadlex> Can you paste the output of a test run into a gist for me?
<nullx> you know what, I'll just write this in C# like originally intended.. it's just too much work, it just works in C# heh
<nullx> thanks though
mmitchell has quit [Ping timeout: 264 seconds]
<Quadlex> nullx: No worries
ckrailo has joined #ruby
allaire has quit []
eliasp_ has joined #ruby
<jumpei> hi i like Ruby, and I'm interested in Ruby because ruby's easy to do something.
eliasp has quit [Ping timeout: 246 seconds]
rubarLion has quit [Ping timeout: 252 seconds]
rubarLion has joined #ruby
MrZYX is now known as MrZYX|off
freerobby has quit [Quit: Leaving.]
<Rym> jumpei: Ruby likes you too :)
Animawish has quit [Quit: Animawish]
<JamieJ> hello i have two questions?
<tos9> one down one to go
<JamieJ> lol
ariedler has quit [Remote host closed the connection]
<JamieJ> but seriously...
<jumpei> hello lol
ariedler has joined #ruby
ariedler has quit [Remote host closed the connection]
rubarLion has quit [Ping timeout: 248 seconds]
timmow has joined #ruby
starburst has quit [Ping timeout: 256 seconds]
<jumpei> uh...so another question?
<JamieJ> i am using a case statement where the conditions evaluated are strings (ie when "Hello", "Goodbye". is ruby case sensitive enough to go to the default case if i type in all caps or all lowercase?
<bnagy> string comparison is case sensitive, so the strings would have to match exactly
<bnagy> you can compare target.upcase == "Blah".upcase
<bnagy> or you can do when /Blah/i should work
miso1337 has joined #ruby
dry_ has joined #ruby
chaluopa has quit [Ping timeout: 245 seconds]
yours_truly has joined #ruby
Nisstyre-laptop has quit [Read error: Connection reset by peer]
timmow has quit [Ping timeout: 252 seconds]
eliasp has joined #ruby
v0n has joined #ruby
yours_truly has quit [Read error: Connection reset by peer]
eliasp_ has quit [Read error: Connection reset by peer]
Nisstyre-laptop has joined #ruby
macabhaird has quit [Ping timeout: 246 seconds]
chaluopa has joined #ruby
kofno has quit [Remote host closed the connection]
rubarLion has joined #ruby
<JamieJ> ok so then /Blah/ can eliminate case sensitivity?
<DesertFoxATX> /i
<DesertFoxATX> as in ignore case.
gabrielrotbart has joined #ruby
alainus has left #ruby ["Leaving"]
kofno has joined #ruby
divout has joined #ruby
sayan has quit [Read error: Connection reset by peer]
rhys has joined #ruby
nateberkopec has joined #ruby
<rhys> i noticed when i do 'stuff = array.each {|x| dostuff x }' that stuff still ends up the array.
banjara has joined #ruby
<rhys> is there a way to get stuff to equal the output of what i'm doing in the block?
Guedes has quit [Ping timeout: 258 seconds]
<rhys> i feel like this is a really dumb question i'm not seeing
eliasp has quit [Read error: Connection reset by peer]
eliasp has joined #ruby
akamit has joined #ruby
anonymuse has quit [Quit: Leaving...]
onceler has quit [Quit: Leaving]
sdavis_ has joined #ruby
<welandB> It's returning an array of the return value of the block.
sdavis has quit [Read error: Operation timed out]
sdavis_ is now known as sdavis
<welandB> If you don't want that, store the data you want within the block.
<tylersmith> rhys: you want to use #map instead of #each
akamit is now known as akam-it
<rhys> that i do. ty tylersmith.
oqioi has joined #ruby
<tylersmith> welandB: it's returning the array itself. map returns an array of results of executing the block on every statement
eliasp has quit [Read error: Connection reset by peer]
eliasp has joined #ruby
momomomomo has joined #ruby
nateberkopec has quit [Ping timeout: 252 seconds]
SCommette has quit [Quit: SCommette]
eliasp_ has joined #ruby
io_syl has joined #ruby
eliasp has quit [Read error: Connection reset by peer]
SCommette has joined #ruby
rippa has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
mvangala has joined #ruby
dry_ has quit [Quit: Leaving]
guyz has quit [Ping timeout: 264 seconds]
jgrevich_ has joined #ruby
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
kofno has quit [Remote host closed the connection]
miso1337 has quit [Quit: afk]
sdavis_ has joined #ruby
digifiv5e has joined #ruby
digifiv5e is now known as Guest3100
raycloud_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
_theriffer_ has joined #ruby
sdavis has quit [Ping timeout: 245 seconds]
sdavis_ is now known as sdavis
rubarLion has quit [Ping timeout: 264 seconds]
raycloud has quit [Read error: Connection reset by peer]
pacbard has quit [Ping timeout: 240 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
pacbard has joined #ruby
monomyth has quit [Remote host closed the connection]
monomyth has joined #ruby
ninegrid has quit [Ping timeout: 240 seconds]
heliumsocket has quit [Quit: heliumsocket]
quazimodo has joined #ruby
tr4656 has quit [Ping timeout: 240 seconds]
Domon has quit [Remote host closed the connection]
tr4656 has joined #ruby
ninegrid has joined #ruby
slakware has quit [Remote host closed the connection]
sdavis_ has joined #ruby
jurassic_ has joined #ruby
momomomomo has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
axsuul_ has joined #ruby
shock_one has joined #ruby
lewix has joined #ruby
tommyvyo has quit [Quit:]
jurassic_ has quit [Client Quit]
sdavis has quit [Ping timeout: 262 seconds]
sdavis_ is now known as sdavis
dhruvasagar has joined #ruby
nateberkopec has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
bubblehead has quit [Remote host closed the connection]
girija has joined #ruby
bradleyprice has joined #ruby
IceDragon has quit [Quit: Space~~~]
nateberkopec has quit [Ping timeout: 258 seconds]
dwon has joined #ruby
dwon has quit [Client Quit]
mahmoudimus has joined #ruby
ukd1 has quit [Remote host closed the connection]
dqminh has joined #ruby
dougireton has quit [Quit: Leaving.]
havenn_ has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
malcolmva has joined #ruby
yacks has quit [Read error: Operation timed out]
jgrevich has quit [Quit: jgrevich]
etcetera has joined #ruby
freakazoid0223 has quit [Ping timeout: 248 seconds]
tomsthumb has quit [Quit: Leaving.]
yacks has joined #ruby
freezey has quit [Remote host closed the connection]
baz_ has quit [Ping timeout: 256 seconds]
codecop has joined #ruby
baz_ has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
sdavis_ has joined #ruby
sdavis has quit [Ping timeout: 245 seconds]
sdavis_ is now known as sdavis
DrCode has joined #ruby
otherj has quit []
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
<JamieJ> hello
eliasp_ has quit [Read error: Connection reset by peer]
<JamieJ> having problem with my while loop as seen on this gist https://gist.github.com/SkoobySparksMIA/0cce0cdcfd654a55eae9
eliasp has joined #ruby
<JamieJ> the variable in the condition is not being recgonized
axsuul_ has quit [Quit: axsuul_]
aeontech has joined #ruby
aeontech has quit [Client Quit]
<tylersmith> JamieJ: keep going is a String and /No/i is a RegExp
<tylersmith> String != RegExp doesn't do what you're wanting
lewix_ has joined #ruby
<tylersmith> try making it "keep going !~ /No/i"
<tylersmith> "keep_going !~ /No/i"
angusiguess has quit [Ping timeout: 246 seconds]
end_guy has joined #ruby
Myconix has quit [Read error: Connection reset by peer]
<JamieJ> tyler here is the error `<top (required)>': undefined local variable or method `keepgoing' for main:Object (NameError) from -e:1:in `load' from -e:1:in `<main>'
angusiguess has joined #ruby
momomomomo_ has joined #ruby
<JoeHazzers> what sort of logic loop should i be using to read from a socket, but also to write to it?
momomomomo has quit [Ping timeout: 258 seconds]
momomomomo_ is now known as momomomomo
<JamieJ> i fixed that line of code but it didnt work
<JoeHazzers> i assume multithreaded?
momomomomo has quit [Client Quit]
lewix has quit [Ping timeout: 246 seconds]
<tylersmith> JamieJ: the first time it goes keep going isn't defined
<tylersmith> add "keepgoing = nil" before the loop
jonahR has joined #ruby
pygmael has joined #ruby
Elminster has joined #ruby
Zespre_ is now known as Zespre
io_syl has quit [Ping timeout: 252 seconds]
robustus has quit [Ping timeout: 255 seconds]
Hanmac1 has quit [Ping timeout: 248 seconds]
pen has joined #ruby
timonv has joined #ruby
Domon has joined #ruby
tootooroo has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
eliasp has quit [Read error: Operation timed out]
jonahR has quit [Remote host closed the connection]
robustus has joined #ruby
<bnagy> JoeHazzers: there's almost no possible reason to work with Socket directly, there are so many support libs
eliasp has joined #ruby
<JoeHazzers> i'm doing this as a learning experience, just fyi
<bnagy> but you can either use Threads and blocking reads / writes, or a select loop
io_syl has joined #ruby
jumpei has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 264 seconds]
<bnagy> a nice basic learning project would probably use Queues and Threads
rubarLion has joined #ruby
<JoeHazzers> so, like a read queue and a write queue?
a_a_g has joined #ruby
<bnagy> yeah
<JoeHazzers> that sounds quite interesting
a_a_g has quit [Client Quit]
jumpei has joined #ruby
<bnagy> and then some thread that does your 'work' and feeds or reads both queues
<bnagy> and threads to run your sockets
<bnagy> Queue is threadsafe
<bnagy> if you used an Array or whatever you'd have to play with Mutex
quazimodo has joined #ruby
bradleyprice has quit [Remote host closed the connection]
<JoeHazzers> so we're assuming here that the socket's scope is entirely within its own thread. the workers don't even have to know about it, because the queue deals with it all?
oqioi has quit [Quit: Leaving.]
tylersmith has quit [Quit: tylersmith]
<bnagy> yeah
angusiguess has quit [Ping timeout: 252 seconds]
<bnagy> that also gives you room to abstract that, if you want to get fancy
sdavis_ has joined #ruby
<JoeHazzers> which would be useful
a_a_g has joined #ruby
<JoeHazzers> depending on how i go about this, and how i go about my workers, it would probably scale quite well
<bnagy> eg you can have exactly the same API for a thing reading from a TCPSocket as a UNIXSocket as a File or Raw or anything
<JamieJ> ok...
<bnagy> and you write the underlying handler as a module and mix it in to your reader
<JoeHazzers> my biggest fear is blocking on the sockets, which this will avoid
<bnagy> it will scale fine if you add an appropriate amount of Threads, and if the app is IO bound
<bnagy> you've got the GIL on MRI but not on JRuby
<JoeHazzers> it will be
rubarLion has quit [Ping timeout: 264 seconds]
uris has quit [Quit: Leaving]
<JoeHazzers> i'm not expecting this to be used for production or anything like that, more just for education and learning.
sdavis has quit [Read error: Operation timed out]
sdavis_ is now known as sdavis
<JamieJ> ok so im getting that nil error again except i initialized my value already
<JamieJ> in `taxcal': undefined method `+' for nil:NilClass (NoMethodError)
<JamieJ> that is the error
shock_one has quit [Read error: Operation timed out]
<bnagy> looks like you need to learn about basic debugging
<bnagy> you can use p some_var to output the 'inspect' output of the variable
ilyam has joined #ruby
<bnagy> which will tell you which of your variables is nil
<bnagy> my guess is that one of your input conversions is failing
<bnagy> but your code hurts my eyes, so I didn't look at it too much
<JamieJ> lol how does it hurt?
<bnagy> so many ways :(
miso1337 has joined #ruby
<JamieJ> is it that bad?
<bnagy> also I think you've got scope issues
seme has joined #ruby
<bnagy> it looks like you want receipt to be modifed by your taxcal method, but it won't be
dqminh has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 255 seconds]
Hanmac has joined #ruby
<JamieJ> yeah i think i asked earlier if i would have to pass an already initialized array into the method
rubarLion has joined #ruby
<bnagy> as an exercise, I would think about a Register class which performs the register operations
apeiros has quit [Remote host closed the connection]
kofno has joined #ruby
<bnagy> and then keeps the receipt as an @ivar for each overall transaction
braoru has joined #ruby
br4ndon has joined #ruby
rubarLion has quit [Read error: Connection reset by peer]
<bnagy> have you learned about classes yet?
Opettaja has joined #ruby
<JamieJ> yeah
<DesertFoxATX> switches make me cringe
Nisstyre-laptop has quit [Ping timeout: 260 seconds]
ksinkar has joined #ruby
kofno has quit [Ping timeout: 258 seconds]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
jonahR has joined #ruby
amth has joined #ruby
<bnagy> JamieJ: ok well then why don't you have a think about the API a Register class would need, then stub it out, then gist that
mockra_ has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
gommo has joined #ruby
gommo has quit [Remote host closed the connection]
gommo has joined #ruby
rubarLion has joined #ruby
ChronocityLC has joined #ruby
cearls has quit [Remote host closed the connection]
osvico has quit [Ping timeout: 276 seconds]
nateberkopec has joined #ruby
aganov has joined #ruby
<Rym> DesertFoxATX: they're neat from a compilation optimisation perspective ;P Although I'm unsure how much that applies for general ruby!
pbertain has quit [Quit: pbertain]
ilyam has quit [Quit: ilyam]
nomenkun has joined #ruby
yacks has quit [Ping timeout: 260 seconds]
<DesertFoxATX> heh
yacks has joined #ruby
wedgeV has quit [Read error: Connection reset by peer]
jarin has quit [Quit: WeeChat 0.4.0]
Nisstyre-laptop has joined #ruby
SCommette has quit [Quit: SCommette]
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
ph^ has quit [Remote host closed the connection]
dqminh has joined #ruby
tomzx_mac has quit [Ping timeout: 245 seconds]
drale2k has quit [Ping timeout: 264 seconds]
nateberkopec has quit [Ping timeout: 258 seconds]
pbertain has joined #ruby
ksinkar has quit [Read error: Connection reset by peer]
Elminster has quit [Remote host closed the connection]
d3 has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
ksinkar has joined #ruby
Tectonic has joined #ruby
tonini has joined #ruby
wedgeV has joined #ruby
Nisstyre-laptop has quit [Read error: Operation timed out]
girija has quit [Ping timeout: 264 seconds]
lewix_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
rickruby has joined #ruby
carraroj has joined #ruby
clocKwize has joined #ruby
jumpei has quit [Remote host closed the connection]
dmiller has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 240 seconds]
ananthakumaran has joined #ruby
sdavis_ has joined #ruby
girija has joined #ruby
zigomir has joined #ruby
timonv has joined #ruby
Hanmac has quit [Quit: Leaving.]
megha has quit [Ping timeout: 246 seconds]
sdavis has quit [Ping timeout: 252 seconds]
sdavis_ is now known as sdavis
ilyam has joined #ruby
tootooroo has joined #ruby
eliasp_ has joined #ruby
pen has quit [Remote host closed the connection]
eliasp has quit [Ping timeout: 255 seconds]
jdunck has joined #ruby
generalissimo has joined #ruby
ksinkar has quit [Read error: Connection reset by peer]
rdev has quit [Quit: Leaving...]
chaluopa has quit [Remote host closed the connection]
chaluopa has joined #ruby
Proshot has quit [Ping timeout: 258 seconds]
zeroeth has joined #ruby
ksinkar has joined #ruby
Hanmac has joined #ruby
JamieJ has quit [Ping timeout: 245 seconds]
Hanmac has quit [Client Quit]
chaluopa has quit [Ping timeout: 255 seconds]
rickruby has quit [Remote host closed the connection]
benwoody has joined #ruby
havenn_ has quit [Remote host closed the connection]
Opettaja has quit [Ping timeout: 276 seconds]
megha has joined #ruby
ericmathison has quit [Ping timeout: 260 seconds]
puppeh has joined #ruby
angusiguess has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
answer_42 has joined #ruby
a_a_g has quit [Ping timeout: 255 seconds]
rippa has quit [Ping timeout: 240 seconds]
dsadsdasd has joined #ruby
angusiguess has quit [Ping timeout: 246 seconds]
a_a_g has joined #ruby
Hanmac2 has quit [Quit: Leaving.]
havenwood has joined #ruby
tagrudev has joined #ruby
dmiller has joined #ruby
xll11 has quit []
Hanmac has joined #ruby
lewix has quit [Remote host closed the connection]
miso1337 has quit [Quit: unplugging]
workmad3 has joined #ruby
HecAtic has joined #ruby
<shevy> what is that char? hehe
Opettaja has joined #ruby
monkegjinni has joined #ruby
_theriffer_ has quit [Quit: _theriffer_]
Weazy has quit [Ping timeout: 276 seconds]
plains has joined #ruby
a_a_g1 has joined #ruby
dmiller has quit [Ping timeout: 245 seconds]
a_a_g2 has joined #ruby
kofno has joined #ruby
a_a_g3 has joined #ruby
Elminster has joined #ruby
huoxito has quit [Quit: Leaving]
x0F has joined #ruby
a_a_g has quit [Ping timeout: 252 seconds]
girija has quit [Ping timeout: 260 seconds]
a_a_g1 has quit [Ping timeout: 252 seconds]
redeyez88 has joined #ruby
<redeyez88> How do you list all users in a Ruby application?
a_a_g2 has quit [Ping timeout: 252 seconds]
kofno has quit [Ping timeout: 258 seconds]
KevinSjoberg has joined #ruby
nopolitica has quit [Ping timeout: 248 seconds]
amth has quit [Read error: Connection reset by peer]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
jumpei has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
megha has quit [Ping timeout: 252 seconds]
backjlack has joined #ruby
drim has quit [Quit: drim]
Monie has quit [Quit: This computer has gone to sleep]
pduin has joined #ruby
pduin has quit [Remote host closed the connection]
pduin has joined #ruby
ilyam has quit [Quit: ilyam]
Tectonic has quit []
redeyez88 has quit [Quit: redeyez88]
jumpei has quit [Remote host closed the connection]
Morkel has joined #ruby
nopolitica has joined #ruby
nateberkopec has joined #ruby
ph^ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Remote host closed the connection]
KevinSjoberg has quit [Quit: Textual IRC Client: www.textualapp.com]
etcetera has quit []
arturaz has joined #ruby
nopolitica has quit [Ping timeout: 246 seconds]
bubblehead has joined #ruby
mahmoudimus has joined #ruby
sayan has joined #ruby
DrCode has quit [Remote host closed the connection]
amth has joined #ruby
Monie has joined #ruby
DrCode has joined #ruby
yannis has joined #ruby
nateberkopec has quit [Ping timeout: 264 seconds]
girija has joined #ruby
Monie has quit [Client Quit]
gabrielrotbart has quit [Remote host closed the connection]
chandankumar has joined #ruby
sdavis has quit [Ping timeout: 252 seconds]
DrCode has quit [Remote host closed the connection]
sayan has quit [Excess Flood]
bubblehead has quit [Ping timeout: 252 seconds]
threesome has quit [Read error: Connection reset by peer]
DrCode has joined #ruby
sayan has joined #ruby
axsuul_ has joined #ruby
nomenkun has quit [Remote host closed the connection]
whitedawg has joined #ruby
jurassic_ has joined #ruby
<akam-it> Hello! Is it possible in irb to output HEX values, if I calculate HEX?
sayan has quit [Max SendQ exceeded]
<akam-it> i.e. I calculate 0x50 + 0x50 and output is 160 (in decimal)
a_a_g3 has quit [Quit: Leaving.]
<akam-it> but I need 0xa0 (without to_s(16) )
sdavis has joined #ruby
dqminh has quit [Remote host closed the connection]
sayan has joined #ruby
mafolz has joined #ruby
<JoeHazzers> how would i read from a socket in a non-blocking fashion on a per-line basis?
casheew has quit [Read error: Connection reset by peer]
jonahR has quit [Quit: jonahR]
casheew has joined #ruby
jprovazn has joined #ruby
nathancahill has quit [Quit: nathancahill]
chandankumar has quit [Ping timeout: 245 seconds]
Heero has quit [Ping timeout: 276 seconds]
nathancahill has joined #ruby
dqminh_ has joined #ruby
charliesome has joined #ruby
jdunck has quit [Quit: Computer has gone to sleep.]
weeb1e has quit [Ping timeout: 246 seconds]
sayan has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby
sdavis_ has joined #ruby
sdavis has quit [Ping timeout: 252 seconds]
sdavis_ is now known as sdavis
chandankumar has joined #ruby
snearch has joined #ruby
blaxter_ has joined #ruby
chandankumar has quit [Client Quit]
weeb1e has joined #ruby
monkegjinni has joined #ruby
flexd has quit [Ping timeout: 255 seconds]
arietis has joined #ruby
a_a_g has joined #ruby
dr_bob has joined #ruby
yannis has quit [Ping timeout: 260 seconds]
dr_bob has quit [Client Quit]
weeb1e has quit [Client Quit]
snearch has quit [Quit: Verlassend]
weeb1e has joined #ruby
nathancahill has quit [Ping timeout: 264 seconds]
dr_bob has joined #ruby
shevy has quit [Ping timeout: 260 seconds]
chandankumar has joined #ruby
rickruby has joined #ruby
tewlz has quit [Ping timeout: 256 seconds]
ninegrid has quit [Read error: Operation timed out]
JohnBat26 has joined #ruby
ninegrid has joined #ruby
io_syl has quit [Ping timeout: 260 seconds]
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
io_syl has joined #ruby
rickruby has quit [Ping timeout: 276 seconds]
piotr has joined #ruby
dr_bob has quit [Quit: Leaving.]
nathancahill has joined #ruby
sambio has quit []
dr_bob has joined #ruby
kofno has joined #ruby
Vainoharhainen has joined #ruby
generalissimo has quit [Remote host closed the connection]
hamed_r has joined #ruby
zeroeth has quit [Ping timeout: 252 seconds]
eldariof has joined #ruby
lewix has joined #ruby
weeb1e has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
gommo has quit [Remote host closed the connection]
gommo has joined #ruby
ph^ has quit [Remote host closed the connection]
shevy has joined #ruby
ph^ has joined #ruby
kofno has quit [Ping timeout: 258 seconds]
lewix has quit [Ping timeout: 255 seconds]
toekutr has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
gommo has quit [Ping timeout: 256 seconds]
Hanmac1 has joined #ruby
ferdev has quit [Quit: ferdev]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
nateberkopec has joined #ruby
gommo has joined #ruby
MrZYX|off is now known as MrZYX
maxmanders has joined #ruby
zeroeth has joined #ruby
jumpei has joined #ruby
timmow has joined #ruby
nateberkopec has quit [Ping timeout: 260 seconds]
jacobw has joined #ruby
ksinkar has quit [Ping timeout: 264 seconds]
timmow has quit [Remote host closed the connection]
nathancahill has quit [Quit: nathancahill]
bubblehead has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
casheew has quit [Read error: Connection reset by peer]
francisfish has quit [Remote host closed the connection]
casheew has joined #ruby
francisfish has joined #ruby
agarie has quit [Read error: Connection reset by peer]
casheew has quit [Read error: Connection reset by peer]
agarie has joined #ruby
Al_ has joined #ruby
MrZYX is now known as MrZYX|off
v0n has quit [Ping timeout: 260 seconds]
casheew has joined #ruby
Elminster has quit [Quit: Leaving]
francisfish has quit [Ping timeout: 260 seconds]
tewlz has joined #ruby
banghouse has joined #ruby
heidar has quit [Quit: leaving]
heidar has joined #ruby
a_a_g has quit [Quit: Leaving.]
jumpei_ has joined #ruby
pydave6367 has joined #ruby
jumpei has quit [Ping timeout: 276 seconds]
jimeh has joined #ruby
bubblehead has quit [Ping timeout: 252 seconds]
[rust] has quit [Quit: Leaving]
jumpei_ has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 252 seconds]
zeroeth has quit [Ping timeout: 248 seconds]
ferdev has joined #ruby
pi3r has joined #ruby
v0n has joined #ruby
rubarLion has quit [Ping timeout: 252 seconds]
answer_42 has quit [Ping timeout: 245 seconds]
apeiros has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
wallclockbuilder has joined #ruby
awestroke has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
rubarLion has joined #ruby
Axsuul has quit [Ping timeout: 264 seconds]
axsuul_ is now known as axsuul
axsuul has left #ruby [#ruby]
timmow has joined #ruby
banghouse has quit [Remote host closed the connection]
wallclockbuilder has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
casheew has joined #ruby
rdark has joined #ruby
girija has quit [Ping timeout: 245 seconds]
<bnagy> akam-it: numbers are numbers
<bnagy> irb will output them as base 10 because that's how people work. If you want to see it in another base you need to convert it
amth has quit [Quit: Leaving.]
<apeiros> s/convert it/represent it in that base/
<bnagy> you might find the sprintf formatting less cumbersome though
<apeiros> (and representation is strings)
francisfish has joined #ruby
<apeiros> alternatively, you can patch #inspect :)
timmow has quit [Ping timeout: 252 seconds]
<apeiros> >> class Integer; def inspect; "0%o" % self; end; end; 17
<eval-in> apeiros => 17 (http://eval.in/14518)
apod has joined #ruby
<apeiros> oh, eval-in uses to_s not inspect? o0
<apeiros> >> RUBY_VERSION
<eval-in> apeiros => "2.0.0" (http://eval.in/14519)
<injekt> hah
casheew has quit [Read error: Connection reset by peer]
<apeiros> ah, no, difference of 1.9 vs 2.0
casheew has joined #ruby
<apeiros> >> class Fixnum; def inspect; "0%o" % self; end; end; 17
<eval-in> apeiros => 021 (http://eval.in/14520)
elaptics`away is now known as elaptics
<apeiros> means you have to define them separately for Fixnum and Bignum :-(
monkegjinni has joined #ruby
<injekt> wouldn't he want x anyway?
strax_ has joined #ruby
<injekt> oh right
<bnagy> can you just patch Numeric?
<apeiros> that's even higher up in the chain
<injekt> >> "%#x" % (0x50 + 0x50)
<eval-in> injekt => "0xa0" (http://eval.in/14521)
<apeiros> in 2.0.0, inspect is on Fixnum directly
bigkm has quit [Quit: Computer has gone to sleep.]
<bnagy> oh.. wow, ew
<apeiros> injekt: I missed the backlog. my example is for octal, you could change it to whatever you want
<injekt> apeiros: yeah I realized that :)
<apeiros> >> class Fixnum; def inspect; "(36)#{to_s(36)}"; end; end; 57
<eval-in> apeiros => (36)1l (http://eval.in/14522)
kofno has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<apeiros> is there a universal base notation? o0
slainer68 has joined #ruby
v0n has quit [Ping timeout: 248 seconds]
<Hanmac1> apeiros:
<Hanmac1> >> [x = (1 << 100).coerce(42).first,x.class]
<eval-in> Hanmac1 => [42, Bignum] (http://eval.in/14523)
casheew has joined #ruby
<apeiros> Hanmac1: that's about what judofyr tweeted a day or two ago, no?
<Hanmac1> yeah it is :P
<apeiros> it's a funny thing. I wonder whether it's a necessity or an oversight
<Hanmac1> huch, tweeted? is there a twitter message about that?
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
kofno has quit [Ping timeout: 258 seconds]
<apeiros> yes
chussenot has joined #ruby
mneorr has joined #ruby
davetherat has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
<Hanmac1> show me :P
seme has quit [Quit: Leaving.]
davetherat has joined #ruby
<apeiros> o0
<apeiros> if I can find it in less than a minute
Neandre has joined #ruby
timmow has joined #ruby
casheew has joined #ruby
<apeiros> yepp, that
<apeiros> his methodology is flawed, though, since .min could return a negative bignum too :)
vbajpai has joined #ruby
<Hanmac1> the funies of the things is: i also found an bignum 0 that is false for zero? :P ... and i am still wonder why
<vbajpai> how do I see what options a rake task takes?
<injekt> vbajpai: you dont
girija has joined #ruby
<vbajpai> ?
<injekt> rake -T 'task' should display any parameters in the description
<injekt> ie `rake do[something, else]`
rubarLion has quit [Ping timeout: 255 seconds]
Nisstyre-laptop has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<injekt> there's also Rake::TaskArguments and you can use default args but I think rake parameter passing sucks so bad that more people appear to use env variables instead
hmarr has joined #ruby
nateberkopec has joined #ruby
veer has quit [Ping timeout: 258 seconds]
<injekt> vbajpai: are you writing the tasks or looking for options for existing tasks someone else has written?
<vbajpai> injekt: trying to see options for existing task of a project, I see a -T option that gives description of each task, but how do I learn what options each task can take?
<injekt> vbajpai: if the author has written the task properly, they'll be in that description
veer has joined #ruby
<vbajpai> i see, then he has not written the task description properly
<injekt> the only way to write a rake task which displays the parameters in the description without the author writing them themselves is like this: task :foo, [:one, :two] do |task, args|
<injekt> and that would display foo[one, two] in the description
fire has joined #ruby
<injekt> then you can do args[:one] args[:two]
dsadsdasd has quit [Quit: Leaving.]
jumpei has joined #ruby
nateberkopec has quit [Ping timeout: 258 seconds]
dsadsdasd has joined #ruby
noxoc has joined #ruby
nomenkun_ has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
Zai00 has joined #ruby
duosrx has joined #ruby
chussenot has quit [Read error: Operation timed out]
chussenot has joined #ruby
rubarLion has joined #ruby
Macaveli has joined #ruby
yashshah_ has quit [Ping timeout: 240 seconds]
rcosta has joined #ruby
adambeynon has joined #ruby
Macaveli has quit [Client Quit]
nari has quit [Ping timeout: 245 seconds]
<JoeHazzers> say i have two queues, how do i wait until *either* of them is ready?
Macaveli has joined #ruby
AzizLight has joined #ruby
<Macaveli> what's the difference if you start your ruby code in an html.erb file with <%= or <% ?
veer has quit [Ping timeout: 255 seconds]
<bnagy> JoeHazzers: you can check empty? or pop nonblocking
jumpei has quit [Remote host closed the connection]
rubarLion has quit [Ping timeout: 264 seconds]
<JoeHazzers> well, i might as well outright specify my issue, whilst also stating that i want to implement the solution myself as a learning experience
jimeh has quit [Quit: Bye.]
Macaveli has quit [Client Quit]
<JoeHazzers> i have a socket, and a queue, and i want to either write to the socket by popping the queue, or i want to read from the socket, but not block on the reading from the socket
Flex has joined #ruby
threesome has joined #ruby
threesome has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
blaxter_ is now known as blaxter
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<injekt> Macaveli: <%= is for displaying output, <% is not, so you would put things like conditionals or assignments in <% and things you want 'displayed' in <%=
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<Macaveli> injekt, thanks for this clear answer!
monkegjinni has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
eka has joined #ruby
statarb3 has quit [Client Quit]
tevio has joined #ruby
rubarLion has joined #ruby
Proshot has joined #ruby
Proshot has joined #ruby
Proshot has quit [Changing host]
casheew has joined #ruby
whitedawg has quit [Quit: Leaving.]
joast has quit [Ping timeout: 240 seconds]
threesome has joined #ruby
mneorr_ has joined #ruby
jimeh has joined #ruby
rcosta has quit [Remote host closed the connection]
emergion has joined #ruby
alup has joined #ruby
casheew has quit [Read error: Connection reset by peer]
rdark has quit [Ping timeout: 255 seconds]
casheew has joined #ruby
rubarLion has quit [Read error: No route to host]
mneorr has quit [Ping timeout: 255 seconds]
tvw has joined #ruby
rdark has joined #ruby
awestroke has quit [Ping timeout: 264 seconds]
casheew has quit [Read error: Connection reset by peer]
tonini has quit [Remote host closed the connection]
casheew has joined #ruby
rcosta has joined #ruby
casheew has quit [Read error: Connection reset by peer]
gommo has quit [Remote host closed the connection]
indyrl has joined #ruby
indyrl has quit [Max SendQ exceeded]
awestroke has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
threesome has quit [Remote host closed the connection]
timmow_ has joined #ruby
nari has joined #ruby
tonini has joined #ruby
monkegjinni has joined #ruby
casheew has joined #ruby
rcosta has quit [Ping timeout: 240 seconds]
gommo has joined #ruby
casheew has quit [Read error: Connection reset by peer]
matayam has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
rubarLion has joined #ruby
timmow_ has quit [Ping timeout: 252 seconds]
mneorr_ has quit [Read error: Connection timed out]
greenarrow has quit [Ping timeout: 252 seconds]
greenarrow has joined #ruby
HecAtic has quit [Quit: Àá¼ö]
casheew has joined #ruby
veer has joined #ruby
casheew has quit [Read error: Connection reset by peer]
kofno has joined #ruby
sdavis has quit [Read error: Connection reset by peer]
skattyadz has joined #ruby
sdavis has joined #ruby
blaxter has quit [Ping timeout: 240 seconds]
rubarLion has quit [Ping timeout: 276 seconds]
casheew has joined #ruby
emergion has joined #ruby
Elhu has joined #ruby
mneorr has joined #ruby
emergion has quit [Client Quit]
monkegji_ has joined #ruby
JamieJ has joined #ruby
yashshah_ has joined #ruby
<JamieJ> hello
kofno has quit [Ping timeout: 258 seconds]
<JamieJ> ok just a test
monkegjinni has quit [Ping timeout: 260 seconds]
obs has joined #ruby
unflores has joined #ruby
niklasb has joined #ruby
hashmal has joined #ruby
eldariof has quit [Read error: No route to host]
BigAxe has joined #ruby
hamed_r has quit [Quit: Leaving]
nateberkopec has joined #ruby
BigAxe has left #ruby [#ruby]
dsadsdasd has quit [Quit: Leaving.]
tonini has quit [Remote host closed the connection]
blaxter has joined #ruby
mneorr has quit [Remote host closed the connection]
veer has quit [Ping timeout: 246 seconds]
yacks has quit [Read error: Connection reset by peer]
veer has joined #ruby
yacks has joined #ruby
horrror has joined #ruby
<horrror> does anybody know a good want to preview images (web) before uploaded via paperclip?
<JamieJ> good morning
mneorr has joined #ruby
nateberkopec has quit [Ping timeout: 276 seconds]
rubarLion has joined #ruby
<JamieJ> hey folks.....having a problem with this class i created. want to make some calculations with a method. not sure im doing it correctly
danslo has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
rubarLion has quit [Ping timeout: 252 seconds]
veer has quit [Ping timeout: 258 seconds]
Domon has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
veer has joined #ruby
end_guy has quit [Remote host closed the connection]
bubblehead has joined #ruby
maxmanders has joined #ruby
matayam has joined #ruby
end_guy has joined #ruby
a_a_g has joined #ruby
<bnagy> JamieJ: looking better - but you need to move receipt etc into that class as @ivars, whereas the params to taxcal that were there before need to NOT be ivars
<bnagy> because they're method params
rubarLion has joined #ruby
<JamieJ> brb
ksinkar has joined #ruby
piotr_ has joined #ruby
veer has quit [Ping timeout: 258 seconds]
bubblehead has quit [Ping timeout: 264 seconds]
mmitchell has joined #ruby
bulters has joined #ruby
<JamieJ> ok back
piotr has quit [Ping timeout: 258 seconds]
rubarLion has quit [Ping timeout: 255 seconds]
withnale has joined #ruby
withnale has quit [Client Quit]
Layke has quit [Ping timeout: 258 seconds]
<JamieJ> bnagy: so then i would add this line in the taxcal method @receipt = []
<JamieJ> ?
skbierm has joined #ruby
skbierm has left #ruby [#ruby]
withnale has joined #ruby
pydave6377 has joined #ruby
x0F has quit [Ping timeout: 260 seconds]
<bnagy> JamieJ: no, all those are you 'long term' storage variables in the class, right?
<bnagy> so you want to set them up in initialize
includex has joined #ruby
rdark has quit [Ping timeout: 252 seconds]
ksinkar has quit [Read error: Connection reset by peer]
rubarLion has joined #ruby
ksinkar has joined #ruby
rdark has joined #ruby
obs has quit [Quit: Konversation terminated!]
<JamieJ> bnagy are you referring to varaibles like "itemtotal" and taxsum" as the 'long term' storage variables?
timmow_ has joined #ruby
rubarLion has quit [Ping timeout: 276 seconds]
haxrbyte has joined #ruby
x0F has joined #ruby
<bnagy> yes
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
stef_204 has joined #ruby
Layke has joined #ruby
<JamieJ> ok
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<JamieJ> so those too would need a @
timmow_ has quit [Ping timeout: 252 seconds]
jprovazn has quit [Quit: Leaving]
<JamieJ> only thing is that they are made within the method while the others are from outside the mehtod (ie cost, name)
<bnagy> those are parameters
<bnagy> so they're not supposed to be @ivars
skattyadz_ has joined #ruby
mhf has joined #ruby
<bnagy> it's like having class Sack; attr_reader :gold; def insert coins; @gold+=coins; end; end
DEVID has joined #ruby
<JamieJ> ah! ok
ereslibre_laptop has joined #ruby
ohcibi has quit [Remote host closed the connection]
rubarLion has joined #ruby
ohcibi has joined #ruby
skattyadz has quit [Ping timeout: 264 seconds]
ereslibre has quit [Ping timeout: 264 seconds]
skattyadz_ is now known as skattyadz
ntzrmtthihu777 has joined #ruby
haxrbyte_ has joined #ruby
<ntzrmtthihu777> not exactly a ruby question, but related. If I'm building a C++ project on linux I have to manually include the ruby headers path in order for it to build right; is there a way to include the headers in the normal include path?
gyre007 has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
haxrbyte_ has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
ksinkar has quit [Read error: Connection reset by peer]
ksinkar_ has joined #ruby
casheew has joined #ruby
haxrbyte_ has joined #ruby
rubarLion has quit [Ping timeout: 255 seconds]
horrror has quit [Quit: horrror]
chussenot_ has joined #ruby
haxrbyte has quit [Ping timeout: 248 seconds]
Scient has quit [Read error: Operation timed out]
monkegji_ has quit [Remote host closed the connection]
Scient has joined #ruby
pydave6377 has quit [Quit: leaving]
marcgg_ has joined #ruby
<Hanmac1> ntzrmtthihu777: use pkg-config for that
mhf has quit [Remote host closed the connection]
<ntzrmtthihu777> Hanmac1: we meet again :D. again, huge n00b here, exactly what does that mean/entail?
pydave6377 has joined #ruby
marcgg has quit [Ping timeout: 245 seconds]
chussenot has quit [Ping timeout: 264 seconds]
chussenot_ is now known as chussenot
Neandre has quit [Ping timeout: 252 seconds]
Neandre has joined #ruby
marcgg has joined #ruby
Xeago has joined #ruby
apod has quit []
monkegjinni has joined #ruby
marcgg__ has joined #ruby
jtperreault has quit [Ping timeout: 248 seconds]
marcgg_ has quit [Read error: No route to host]
obs has joined #ruby
Sacha_ has joined #ruby
marcgg has quit [Ping timeout: 246 seconds]
Neandre has quit [Ping timeout: 248 seconds]
Macaveli has quit [Ping timeout: 248 seconds]
nateberkopec has joined #ruby
marcgg__ has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
marcgg_ has joined #ruby
BSaboia has joined #ruby
keymone has joined #ruby
Mathieu has joined #ruby
d3 has joined #ruby
end_guy_ has joined #ruby
end_guy has quit [Ping timeout: 276 seconds]
Macaveli has quit [Client Quit]
camilasan has joined #ruby
nateberkopec has quit [Ping timeout: 264 seconds]
pydave6377 has quit [Quit: leaving]
razibog has joined #ruby
jnoob22 has joined #ruby
emergion has joined #ruby
nateberkopec has joined #ruby
emergion has quit [Client Quit]
ChristianS has joined #ruby
nateberkopec has quit [Client Quit]
cantonic is now known as cantonic|away
maxmanders has quit [Quit: Computer has gone to sleep.]
Proshot has quit [Quit: Leaving]
maxmanders has joined #ruby
Bry8Star_ is now known as Bry8Star
ehellman has joined #ruby
havenwood has quit [Remote host closed the connection]
davetherat has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 260 seconds]
davetherat has joined #ruby
<JamieJ> bnagy: here is an update of my code https://gist.github.com/SkoobySparksMIA/fa5e7dfcb2681de77384
Macaveli has joined #ruby
maxmanders has quit [Client Quit]
<JamieJ> still getting an error....not quite understanding the issue though
dsadsdasd has joined #ruby
Fuzai has joined #ruby
<Fuzai> is there an easy way to turn a set into an array?
<JamieJ> fuzai was that question for me?
<Fuzai> for anyone
<Fuzai> right now i'm using an each do loop and i feel like there should be a better way
<Fuzai> nm i think i finally found it
<Fuzai> at the bottom of the set page
raycloud_ has quit [Quit: Leaving]
threesome has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
<akam-it> Hello! I looking for algorithm or function for "per-byte" addition, can you help me please?
<Hanmac1> ntzrmtthihu777: do "man pkg-config" and look how to use it
<akam-it> For example I have HEX value: 0xfefdfcfb, and I need to add 0x02020202 and I need to get on output 0x00fffefd
<akam-it> Or I have 0x100fffefd + 0x02020202 and I need not 0x1030200ff but 0x020100ff
sayan has joined #ruby
threesome has quit [Remote host closed the connection]
hmarr has quit []
kirun has joined #ruby
threesome has joined #ruby
gommo has quit [Remote host closed the connection]
dsadsdasd has quit [Quit: Leaving.]
veer has joined #ruby
hmarr has joined #ruby
mmitchell has quit [Remote host closed the connection]
Nisstyre-laptop has quit [Quit: Leaving]
<JamieJ> anyone here to help?
Zolo has joined #ruby
DEVID has quit []
skattyadz has quit [Quit: skattyadz]
TempleD has joined #ruby
Skofo has quit [Ping timeout: 255 seconds]
Proshot has joined #ruby
carraroj has quit [Ping timeout: 252 seconds]
Guest88866 has quit [Ping timeout: 240 seconds]
<TempleD> Well, this is an awkward place to be again.
fbernier has quit [Quit: ZNC - http://znc.in]
<JamieJ> temple u looking for help too?
veer has quit [Ping timeout: 258 seconds]
<TempleD> Some people I was talking to on here yesterday gave me some interest in Ruby.
kofno has joined #ruby
carraroj has joined #ruby
<elaptics> JamieJ: what error are you getting?
veer has joined #ruby
<JamieJ> elaptics let me give you the gist https://gist.github.com/SkoobySparksMIA/fa5e7dfcb2681de77384
<JamieJ> here is the error `<top (required)>': undefined method `taxcal' for main:Object (NoMethodError) from -e:1:in `load' from -e:1:in `<main>'
timmow_ has joined #ruby
<JamieJ> i know it is something wrong with how i made taxcal mehtod...i dont understand ruby enough to solve it
<JamieJ> im sure its an easy fix though
BSaboia has quit [Quit: Leaving]
<TempleD> Maybe the fact that taxcal is in a class?
<TempleD> I'm just guessing, I have no idea about Ruby as of yet.
<elaptics> JamieJ: you're not instantiating a Taxes object at any time in that code
dsadsdasd has joined #ruby
<elaptics> TempleD: good guess - you're right :)
<elaptics> JamieJ: either move that taxcal method out of the class or create your taxes objects - note you may well need to rewrite code to make that work - I haven't looked at the actual code properly
<TempleD> elaptics: Heh, I was just thinking that languages generally have a different way of accessing methods within classes than just accessing them directly.
jurassic_ has quit [Quit: jurassic_]
<elaptics> JamieJ: I assume this is just a learning thing for you?
m8 has joined #ruby
<JamieJ> yes it is
<elaptics> JamieJ: are you learning anything in particular?
<JamieJ> just how to properly use a class
timmow_ has quit [Ping timeout: 252 seconds]
<JamieJ> this is getting me frustrated...shoulda been done with this code
thone_ has joined #ruby
<e-dard> Hi, how do I share a let(:foo) across separate contexts? I've tried defining :foo in a shared context and including that in each context but not luck?? :-S
Muz has quit [Ping timeout: 252 seconds]
<elaptics> JamieJ: ok, well 2 things jump out. 1. you've created the class itself, but you're not instantiating any objects of that class in your code, e.g. tax = Taxes.new(10, 10, 10)
Zolo has quit [Remote host closed the connection]
hmarr has quit []
<elaptics> JamieJ: 2. I expect that you'll have errors when you do use it because there's references to 'receipt' in your taxcal method but that will only be a local variable called receipt in there and you're calling push on it but you haven't defined it as an array in that method or class in any way
<JamieJ> i defined the array outside the method. the code should call for that taxcal function and push in values
<elaptics> JamieJ: 3. in your while loop you're using taxcal there as if it's just a method passing in arguments so that's also not going to work
thone has quit [Ping timeout: 245 seconds]
<elaptics> JamieJ: no, that won't work. the object doesn't have access to that array directly. You would have to pass that into the class
<elaptics> JamieJ: so either pass it in the initialise or have a setter method that will accept it
<JamieJ> ok so first pass the array in the function
sailias has joined #ruby
ehellman has quit []
<JamieJ> when i instantiate the class, can i do that in the method inside the class?
<elaptics> JamieJ: also no 4. You're using floats to do calculations with currency - fine just while learning but in the real world that's a bad idea - you'll get rounding errors. ruby has a big decimal class so better to use that
<elaptics> JamieJ: no, instantiate means make an object of that class, e.g. Taxes.new
<JamieJ> ok so when i instantiate i'd have to do so in the case statement
<JamieJ> so i can put in Taxes.new(10, 10, 10) there, right?
<elaptics> JamieJ: well somewhere. Just looking at what you have now and I can see various other problems with what you have
carraroj has quit [Ping timeout: 248 seconds]
dqminh_ has quit [Remote host closed the connection]
dqminh has joined #ruby
LennyLinux has joined #ruby
<JamieJ> is it fmore than just those 4 problems you pointed out?
<elaptics> JamieJ: I would suggest that you start simpler and just work with a couple of simple classes manage the items and the tax calculations and get that working passing in the data you need. Then you can expand it to ask for input, etc
<JamieJ> ok thanks for your input
<elaptics> JamieJ: I'm about to have some lunch, would you like me to try and quickly knock up a quick example of what it looks like you're trying to do? You can keep trying yours and then look at mine to compare when you've got yourself further?
duosrx has quit [Remote host closed the connection]
<JamieJ> yes sure that would help
veer has quit [Ping timeout: 258 seconds]
<elaptics> ok, I'm just going to grab my lunch so be about 15 mins or so that'll give you time to have another go :)
<JamieJ> thanks
<JamieJ> ill be here
veer has joined #ruby
jrajav has joined #ruby
mengu has joined #ruby
postmodern has quit [Quit: Leaving]
moos3 has quit [Quit: Computer has gone to sleep.]
Floydzy has joined #ruby
moos3 has joined #ruby
chandankumar has quit [Ping timeout: 258 seconds]
Skofo has joined #ruby
Floydzy has left #ruby [#ruby]
matayam has quit [Remote host closed the connection]
nkr has joined #ruby
Floydzy has joined #ruby
agarie has quit [Read error: Connection reset by peer]
agarie has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
Macaveli has quit [Quit: This computer has gone to sleep]
jon_w has joined #ruby
casheew has quit [Read error: Connection reset by peer]
jon_w has quit [Max SendQ exceeded]
jon_w has joined #ruby
hmarr has joined #ruby
dqminh has quit [Remote host closed the connection]
danslo has quit [Quit: danslo]
mmitchell has joined #ruby
duosrx has joined #ruby
sailias has quit [Quit: Leaving.]
casheew has joined #ruby
dustint has joined #ruby
mmitchell has quit [Remote host closed the connection]
eldariof has joined #ruby
peterhellberg has joined #ruby
callmeivan has joined #ruby
mneorr has quit [Remote host closed the connection]
<callmeivan> yolo, does anybody know why this loop only runs one time?
bubblehead has joined #ruby
maxmanders has joined #ruby
<tagrudev> callmeivan, it should run just one time
<callmeivan> but why?
<tagrudev> try with while true maybe ?
<callmeivan> thanks
<callmeivan> that works
<callmeivan> so i guess thats a ruby convention thing
maxmanders has quit [Client Quit]
bubblehead has quit [Read error: Operation timed out]
Guedes_out is now known as Guedes
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<injekt> callmeivan: while true or there's loop { ... } which does the same
<JamieJ> elaptics are you back?
<elaptics> JamieJ: just writing my version for you now
<JamieJ> oh ok cool
<JamieJ> itll be great if you showed me how to pass in array in a method as well....that was one of my main concerns all along
geekbri has joined #ruby
<callmeivan> thanks injekt, yeah works as well
jrajav has quit [Quit: I tend to be neutral about apples]
dqminh has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
El_loco has joined #ruby
<elaptics> JamieJ: why are you calculating the tax multiplying by 20.0 and then dividing by 20.0?
Muz has joined #ruby
nfk has joined #ruby
subbyyy has joined #ruby
pydave6367 has quit [Ping timeout: 252 seconds]
logix812 has joined #ruby
TempleD has left #ruby [#ruby]
monkegji_ has joined #ruby
<JamieJ> it is weird but it rounds the tax to the nearest 0.05
<JamieJ> i tested it myself and it works
noxoc has quit [Quit: noxoc]
monkegjinni has quit [Ping timeout: 246 seconds]
maxmanders has joined #ruby
<elaptics> JamieJ: well like I said earlier it's probably cos you're using floats to calculate currency
fbernier has joined #ruby
wfht has joined #ruby
mark_locklear has joined #ruby
Hanmac1 has quit [Ping timeout: 264 seconds]
<bnagy> akam-it: break your dwords into bytes
tommyvyo has joined #ruby
Macaveli has joined #ruby
<bnagy> or use shifting
eliasp_ has quit [Read error: Connection reset by peer]
eliasp has joined #ruby
Hanmac1 has joined #ruby
Xeago has quit [Remote host closed the connection]
<Hanmac1> shevy did you hear about Adobes "blank"-Font?
tommyvyo has quit [Client Quit]
divout has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
<JamieJ> elaptics: yep exactly
<akam-it> bnagy, What do you mean? Should I write new function?
carraroj has joined #ruby
monkegji_ has quit [Read error: Connection reset by peer]
sayan has quit [Ping timeout: 258 seconds]
<shevy> Hanmac1 april joke??
<bnagy> there is no way to add 0x02020202 to 0x01010101 and get 0x03030303, per se
monkegjinni has joined #ruby
<bnagy> so you need to operate per byte
<Hanmac1> shevy no :P http://heise.de/-1833872
angusiguess has joined #ruby
<bnagy> which gives you two basic paths - you can start with hexstrings and do like "02020202".scan(/\h\h/).map {|x| x.to_i 16}
<bnagy> or you can call it a number, and add directly
<JamieJ> sup bnagy
monkegjinni has quit [Read error: Connection reset by peer]
timmow_ has joined #ruby
monkegjinni has joined #ruby
<bnagy> >> (0x02020202 + (0x03 << 8)).to_s 16
<eval-in> bnagy => "2020502" (http://eval.in/14557)
<bnagy> akam-it: ^^
monkegjinni has quit [Read error: Connection reset by peer]
<bnagy> either way you're going to need to decompse something into bytes at some point
wfht has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
blaxter has quit [Ping timeout: 245 seconds]
rcosta has joined #ruby
<bnagy> JamieJ: you got it working yet? :)
jani has joined #ruby
peterhellberg has quit [Remote host closed the connection]
shock_one has joined #ruby
jani is now known as Guest16877
krawchyk has joined #ruby
<JamieJ> bangy: not quite
shock_one has quit [Read error: Connection reset by peer]
<JamieJ> bnagy: still having a bit trouble with that taxcal function....i know im not passing the values correct
<JamieJ> someone else here is helping me as well
seme has joined #ruby
<akam-it> bnagy, tnak you I try "02020202".scan(/\h\h/).map {|x| x.to_i 16}. I realy thought there was some method to do "per-byte" addition without new function(
timmow_ has quit [Ping timeout: 252 seconds]
monkegjinni has joined #ruby
<bnagy> akam-it: no, because it's stupid
idkazuma has joined #ruby
carloslopes has joined #ruby
<bnagy> well, rather, it makes no real sense :)
aapzak has quit [Ping timeout: 248 seconds]
<bnagy> the only time you would do that in asm would be when you're pretending a number is actually an array of bytes
Flex has quit [Ping timeout: 258 seconds]
arietis has joined #ruby
<bnagy> whereas in Ruby we'd just use, like, an array of bytes
<akam-it> so, I trying to reverse engineering vce binary file format..
aapzak has joined #ruby
<bnagy> oh, there are some good binary carvers in ruby
<bnagy> binstruct I think is the coolest looking
<bnagy> oh, one more thing - you can use pack and unpack for a lot of this stuff as well
<bnagy> to do your composition / decomposition
<JamieJ> elaptics: you still around buddy?
<bnagy> it's just that some of that gets gnarly
Elhu has joined #ruby
rcosta has quit [Remote host closed the connection]
<bnagy> so make that three main approaches you could take :P
brendan-__ has quit [Quit: brendan-__]
wallerdev has joined #ruby
girija has quit [Read error: Connection reset by peer]
includex has quit [Quit: Leaving...]
<akam-it> oh.. if I had known about binstruct Ithink my life would be easier...
<Hanmac1> bnagy & akam-it: about per-byte, what about this:
<Hanmac1> >> ["02020202"].pack("h*").each_byte.to_a
<eval-in> Hanmac1 => [32, 32, 32, 32] (http://eval.in/14561)
ikst has joined #ruby
<elaptics> JamieJ: sorry, got sidetracked for a moment
<elaptics> JamieJ: here's my example https://gist.github.com/andyh/49405ac9ffe06b4a2731
ikst has quit [Remote host closed the connection]
<bnagy> Hanmac1: well yours swapped nibbles
<elaptics> JamieJ: this is a simplistic model, not worrying about invalid data and the like but serves as a reasonable example to show you a more object oriented approach
<bnagy> Hanmac1: but sure, it can be done with pack as well :)
<JamieJ> ok
<bnagy> Hanmac1: should be [02,02,02,02] no?
casheew has quit [Read error: Connection reset by peer]
<JamieJ> is BigDecimal a variable or a command
casheew has joined #ruby
<JamieJ> ?
v1p has joined #ruby
BizarreCake has joined #ruby
<elaptics> JamieJ: you should be able to see from that how to expand around it to collect your data from your user
<elaptics> JamieJ: big decimal is a class, in the ruby standard library - used instead of floats
El_loco has quit [Ping timeout: 264 seconds]
dylan has joined #ruby
<Hanmac1> bnagy: how cares about nibbles :P only the women ones :P
<Hanmac1> JamieJ: BigDecimal is also a method
fourq has quit [Disconnected by services]
<bnagy> Hanmac1: ('H*')
skattyadz has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
<Hanmac1> bnagy: i know, the joke was about "nibble" ... imo it shows that most of programmer and informaticians are still are puberty teenager inside :P
maxmanders has joined #ruby
yshh has joined #ruby
veer has quit [Ping timeout: 258 seconds]
monkegji_ has joined #ruby
yashshah- has joined #ruby
yshh has quit [Remote host closed the connection]
monkegjinni has quit [Ping timeout: 264 seconds]
tomzx_mac has joined #ruby
yshh has joined #ruby
veer has joined #ruby
jpfuentes2 has joined #ruby
eliasp has quit [Read error: Connection reset by peer]
eliasp has joined #ruby
v0n has joined #ruby
yashshah_ has quit [Ping timeout: 245 seconds]
NiteRain has quit [Ping timeout: 248 seconds]
angusiguess has quit [Ping timeout: 240 seconds]
Macaveli has quit [Quit: This computer has gone to sleep]
arya has joined #ruby
sailias has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
veer has quit [Ping timeout: 258 seconds]
AzizLight is now known as peterb
peterb has left #ruby [#ruby]
doritostains has quit [Quit: Leaving...]
maxmanders has quit [Quit: Computer has gone to sleep.]
veer has joined #ruby
rudisimo has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
maxmanders has joined #ruby
ariedler has joined #ruby
dr_bob has quit [Quit: Leaving.]
anonymuse has joined #ruby
anonymuse has quit [Excess Flood]
Macaveli has joined #ruby
monkegji_ has quit [Ping timeout: 246 seconds]
<JamieJ> elaptics: thanks sso much for your help
<JamieJ> this helps a lot
atno has quit [Remote host closed the connection]
anonymuse has joined #ruby
obs has quit [Quit: Konversation terminated!]
dEPy has joined #ruby
danslo has joined #ruby
Sacha_ has quit [Quit: No Ping reply in 180 seconds.]
dr_bob has joined #ruby
Neandre has joined #ruby
maxmanders has quit [Client Quit]
subbyyy has quit [Ping timeout: 260 seconds]
apod has joined #ruby
troessner has joined #ruby
<JamieJ> i have just a couple of ?
monkegjinni has joined #ruby
<akam-it> 0xfefdfcfb + 0x04040404 =>
sonda has joined #ruby
<akam-it> 0xfb+0x04 = 0xff % 256 = 0xff
<akam-it> 0xfe+0x04 = 0x102 % 256 = 0x02
<akam-it> 0xfd+0x04 = 0x101 % 256 = 0x01
<akam-it> 0xfc+0x04 = 0x100 % 256 = 0x00
<akam-it> should be 0xff000102
dr_bob has quit [Read error: Connection reset by peer]
<elaptics> JamieJ: fire away :)
breakingthings has joined #ruby
wallerdev has quit [Quit: wallerdev]
<JamieJ> to.s('F')
idkazuma has quit [Remote host closed the connection]
<JamieJ> what is that exactly?
<elaptics> JamieJ: just a method on big decimal to format the output as a string
atno has joined #ruby
<JamieJ> ok
<elaptics> JamieJ: .to_s is a method found on most (all?) objects which will convert it to a string
<JamieJ> ok
<shevy> and .to_peanut will turn your object into a peanut
<elaptics> shevy: lol
<JamieJ> elaptics: because the main goal is to place take some values and placing them into an array, then printing a receipt
<Xeago> just remember to require 'peanuts' first!
<Hanmac1> but there is no automatic :P so you cant call to_xyz and its turned into Xyz :P
[yalue] has joined #ruby
<Fuzai> Hi if i have a string that looks like this ".tset something" and i have "tset" in a variable how would i remove everything from the start of the string to the end of the 2nd string?
failshell has joined #ruby
<Xeago> Hanmac1: nothing an agressive gem can't fix :)
<Xeago> Fuzai: have a look at the methods a string has
<JamieJ> elaptics: so what you have is good, but then i have to finagle it to make a sentence for each instance
<Xeago> before diving into regexes
* Hanmac1 must resist to write a function
ph^_ has joined #ruby
solidoodlesuppor has joined #ruby
<Fuzai> i understand it's sub or gsub something but the . is throwing me off
yalue has quit [Ping timeout: 276 seconds]
<JamieJ> elaptics: like when i did with my other code with this line - receipt.push " " + amount.to_s + " " + name.to_s + "(s): " + itemtotal.to_s
<Hanmac1> JamieJ use string interpolaration or sprintf or join
huttan has quit [Quit: leaving]
<elaptics> JamieJ: well in the receipt object I would just create a method called to_sentence or something then and interpolate a string with the amounts
__main__ has quit [Ping timeout: 260 seconds]
huttan has joined #ruby
Zolo has joined #ruby
sepp2k has joined #ruby
arya has quit [Ping timeout: 248 seconds]
<JamieJ> thats easy enough
[yalue] has quit [Client Quit]
hmarr has quit []
Mattx has joined #ruby
<elaptics> JamieJ: well strictly speaking I wouldn't actually do that - if this were real production code then I'd more likely separate out the formatting of a receipt from the receipt object itself but let's not go there right now :)
yalue has joined #ruby
Macaveli has quit [Quit: This computer has gone to sleep]
ph^ has quit [Ping timeout: 252 seconds]
divout has joined #ruby
<Xeago> does ruby call to_s automatically to convert stuff when "#{interpolating}"ing?
sailias has joined #ruby
veer has quit [Ping timeout: 258 seconds]
<Hanmac1> Xeago: yes
veer has joined #ruby
<lunarjar> any rubyists using vim? how do you highlight do end?
<Xeago> lunarjar: use vim, I don't highlight it
nezumi has quit [Ping timeout: 264 seconds]
Matip has quit [Ping timeout: 245 seconds]
<Xeago> not using ruby/vim for too long either..
<elaptics> lunarjar: what do you mean by highlighting do/end?
ttt_ has quit [Remote host closed the connection]
<lunarjar> elaptics, you know how you get highlighting for matching {} ()
<lunarjar> I want that for do end
_nitti has joined #ruby
<lunarjar> as I understand matchit does that, but matchit is kinda old
EPIK has quit [Ping timeout: 245 seconds]
Macaveli has joined #ruby
<tobiasvl> doesn't matchit work any more?
_nitti_ has joined #ruby
<troessner> lunarjar, you can try my vim setup: http://troessner.wordpress.com/2012/10/02/my-glorious-vim-setup/
hiyakashi has joined #ruby
<lunarjar> don't know matchit is old so I didn't give it a go
<lunarjar> troessner, thanks ;)
<troessner> i have nasty highlighting and syntax checking and god knows what
<elaptics> lunarjar: I don't highlight mine. matchit isn't to do with highlighting it
wallerdev has joined #ruby
smigg has joined #ruby
wallerdev has quit [Client Quit]
jerius has joined #ruby
<lunarjar> troessner, from your setup I don't have vim-autoclose
<elaptics> lunarjar: I use a plugin called vim-blockle that makes it easy to toggle blocks between do/end and {} so that'd be an easy way to switch and then get your highlighting :)
<troessner> lunarjar, there you go..:)
<elaptics> lunarjar: matchit just lets you use % to jump between the beginning and end bits
freezey has joined #ruby
_nitti has quit [Ping timeout: 264 seconds]
Zolo has quit [Remote host closed the connection]
__main__ has joined #ruby
timmow_ has joined #ruby
blacktulip has joined #ruby
hmarr has joined #ruby
Skofo has quit [Ping timeout: 240 seconds]
Proshot has quit [Quit: Leaving]
geggam has quit [Ping timeout: 256 seconds]
wmoxam has joined #ruby
huoxito has joined #ruby
<shevy> got problem
<shevy> in bash, in mate-terminal, if I do this:
<shevy> echo -en "\e]0;Test\a"
<shevy> I can set the terminal title to "Test"
<shevy> that works
KenDhia has joined #ruby
<shevy> buuuut if I use that from within a ruby script
sleetdrop has joined #ruby
<shevy> like so:
<shevy> system 'echo -en "\e]0;Test\a"'
<shevy> it does not work... instead, it just seems to print this string here:
<shevy> "-en \e]0;Test"
<shevy> does "echo" not work from within a .rb script?
timmow_ has quit [Ping timeout: 252 seconds]
<shevy> system 'echo hi' works hmmmmmmm
<Xeago> shevy: the reason it doesn't work is probably because your shell doesn't pick it up
pavilionXP has quit [Read error: Connection reset by peer]
KenDhia has quit [Client Quit]
<Fuzai> there is an ansi color gem if that's what you are trying to do
geggam has joined #ruby
Macaveli has quit [Quit: This computer has gone to sleep]
<shevy> Xeago it does not pick it up?
<shevy> hmm
<shevy> but echo hi works ...
<shevy> oh well, this eludes me
clocKwize has quit [Quit: clocKwize]
mmitchell has joined #ruby
Macaveli has joined #ruby
freerobby has joined #ruby
dqminh has quit [Remote host closed the connection]
heliumsocket has joined #ruby
artem has joined #ruby
m8 has quit [Ping timeout: 255 seconds]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
jkim has left #ruby ["WeeChat 0.4.0"]
arya has joined #ruby
freeayu has joined #ruby
kloeri has quit [Read error: Operation timed out]
senayar has joined #ruby
gaahrdner has joined #ruby
kloeri has joined #ruby
<tobiasvl> system 'echo', '-en', '"\e]0;Test\a"'
<tobiasvl> ?
<shevy> whoa cool
<shevy> that works
<shevy> hmmm
<shevy> now I must find out why that works
dayom has joined #ruby
ffranz has joined #ruby
dylan has quit [Read error: Connection reset by peer]
matayam has joined #ruby
<shevy> hmmm
<tobiasvl> "If a two-element array at the beginning of the command, the first element is the command to be executed, and the second argument is used as the argv[0] value, which may show up in process listings.
dqminh has joined #ruby
El_loco has joined #ruby
<shevy> hmm ok... still not sure why 'echo','-en' would not be the same as 'echo -en'
rdev has joined #ruby
v1p has quit [Ping timeout: 255 seconds]
<Politoed> because it would try to execute the command "echo -en", and not the command "echo" with argument "-en"
monkegjinni has quit [Ping timeout: 264 seconds]
nateberkopec has joined #ruby
<shevy> aaaaah
El_loco has quit [Remote host closed the connection]
adamjleonard has joined #ruby
nplusp has joined #ruby
<shevy> now I finally understand... that took me damn long :)
dsadsdasd has quit [Quit: Leaving.]
dsadsdasd has joined #ruby
tommyvyo has joined #ruby
dqminh has quit [Ping timeout: 258 seconds]
Davey has joined #ruby
dayom has quit [Quit: dayom]
arya has quit [Ping timeout: 255 seconds]
Morkel has quit [Quit: Morkel]
hogeo has quit [Remote host closed the connection]
joast has joined #ruby
akam_ has joined #ruby
dylan has joined #ruby
arya has joined #ruby
Proshot has joined #ruby
akam_ has quit [Client Quit]
pskosinski has joined #ruby
akam_ has joined #ruby
akam_ has quit [Client Quit]
akam-it has quit [Remote host closed the connection]
akam-it has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
jonathanwallace has quit [Ping timeout: 260 seconds]
mljsimone has joined #ruby
arietis has joined #ruby
mljsimone has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
mljsimone has joined #ruby
mattbl has joined #ruby
mattbl has quit [Client Quit]
gaahrdner has quit [Remote host closed the connection]
banister`sleep has quit [Read error: Connection reset by peer]
arya has joined #ruby
Neandre has quit [Ping timeout: 258 seconds]
elux has joined #ruby
banister`sleep has joined #ruby
arya has left #ruby [#ruby]
phantasm66 has joined #ruby
arya has joined #ruby
gaahrdne_ has joined #ruby
chandankumar has joined #ruby
eldariof has quit [Read error: No route to host]
rdark has quit [Ping timeout: 240 seconds]
momomomomo has joined #ruby
codecop has quit [Remote host closed the connection]
adkron has joined #ruby
veer has quit [Ping timeout: 258 seconds]
ntzrmtthihu777 has left #ruby [#ruby]
JonnieCache has joined #ruby
veer has joined #ruby
rdark has joined #ruby
flexd has joined #ruby
jgarvey has joined #ruby
sambao21 has joined #ruby
thinkdevcode has joined #ruby
himsin has quit [Ping timeout: 245 seconds]
akashj87 has joined #ruby
theRoUS has quit [Read error: Operation timed out]
monkegjinni has quit [Remote host closed the connection]
thinkdevcode has quit [Remote host closed the connection]
freerobby1 has joined #ruby
veer has quit [Ping timeout: 258 seconds]
freerobby has quit [Read error: Connection reset by peer]
tish has quit [Quit: Leaving.]
NiteRain has joined #ruby
mattbl has joined #ruby
veer has joined #ruby
a_a_g has quit [Quit: Leaving.]
artem has quit [Ping timeout: 246 seconds]
IrishGringo has joined #ruby
cmarques has joined #ruby
monkegjinni has joined #ruby
v0n has joined #ruby
m8 has joined #ruby
virtuose has quit [Read error: No route to host]
jtharris has joined #ruby
luckyruby has joined #ruby
monkegji_ has joined #ruby
m8 has quit [Read error: Connection reset by peer]
zeroeth has joined #ruby
Amnesthesia has joined #ruby
skattyadz has quit [Quit: skattyadz]
monkegji_ has quit [Remote host closed the connection]
m8 has joined #ruby
lewix has joined #ruby
monkegji_ has joined #ruby
dqminh has joined #ruby
dylan has quit [Read error: Connection reset by peer]
virtuose has joined #ruby
internet_user has joined #ruby
puppeh has quit [Remote host closed the connection]
wolcanus has joined #ruby
Al____ has joined #ruby
monkegjinni has quit [Ping timeout: 240 seconds]
pydave6367 has joined #ruby
_nitti_ has quit [Read error: No route to host]
_nitti has joined #ruby
Al_ has quit [Read error: Operation timed out]
SCommette has joined #ruby
dylan has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
interactionjaxsn has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
rippa has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
gaahrdne_ has quit [Remote host closed the connection]
<gestahlt> Hi
<gestahlt> How do i actually write a yaml file.. i know i can convert my hash to yaml with .to_yaml but now i need the yaml in a file
m8 has quit [Ping timeout: 248 seconds]
<gestahlt> How do i do that?
eliasp has quit [Ping timeout: 246 seconds]
x0F has quit [Ping timeout: 246 seconds]
kop has quit [Ping timeout: 246 seconds]
x0F has joined #ruby
_theriffer_ has joined #ruby
kuzushi_ has quit [Ping timeout: 246 seconds]
kop has joined #ruby
kuzushi_ has joined #ruby
MrZYX|off is now known as MrZYX
ph^_ has quit [Remote host closed the connection]
ChronocityLC has quit [Ping timeout: 246 seconds]
Monie has joined #ruby
<mr-rich> file.puts var.to_yaml
ravster1 has joined #ruby
dylan has quit [Disconnected by services]
m8 has joined #ruby
eliasp has joined #ruby
dylan` has joined #ruby
dylan` has quit [Client Quit]
generalissimo has joined #ruby
deavidsedice has quit [Read error: Connection reset by peer]
deavid has joined #ruby
dqminh has quit [Ping timeout: 258 seconds]
<gestahlt> thanks mr-rich
jonathanwallace has joined #ruby
maxmanders has joined #ruby
Macaveli has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
arya has quit [Ping timeout: 248 seconds]
dr_bob has joined #ruby
foobArrr has quit [Ping timeout: 258 seconds]
arya has joined #ruby
Macaveli has joined #ruby
faen has quit [Ping timeout: 260 seconds]
pioz has joined #ruby
io_syl has joined #ruby
<JamieJ> hey
<gestahlt> mr-rich: where do i set the filename or redirect to stdin?
timmow_ has joined #ruby
<mr-rich> gestahlt: you open a file in ruby code like any other file ...
m8 has quit [Ping timeout: 246 seconds]
osvico has joined #ruby
<mr-rich> gestahlt: yaml is just a text file ...
ttt has joined #ruby
bean has joined #ruby
kpshek has joined #ruby
jgarvey has quit [Ping timeout: 246 seconds]
mercwithamouth has joined #ruby
dsadsdasd has quit [Quit: Leaving.]
benwoody has left #ruby [#ruby]
rudisimo1 has joined #ruby
rudisimo has quit [Read error: Connection reset by peer]
timmow_ has quit [Ping timeout: 252 seconds]
ShellFu has joined #ruby
braoru has quit [Quit: Leaving]
etcetera has joined #ruby
bean has quit [Client Quit]
RORgasm has joined #ruby
kiwnix has joined #ruby
monkegjinni has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
mollitz has joined #ruby
v0n has quit [Quit: WeeChat 0.4.0]
x0F has quit [Ping timeout: 276 seconds]
veer has quit [Ping timeout: 264 seconds]
v0n has joined #ruby
monkegji_ has quit [Read error: Operation timed out]
jlast has joined #ruby
veer has joined #ruby
<mollitz> i'm learning ruby atm and so I wrote a small Todo-App/Script to improve my skills. If someone would look over it and tell me what could be better I'd really appreciate that! https://gist.github.com/mollitz/5301705
monkegjinni has quit [Remote host closed the connection]
<mollitz> With "better" i mean rubyisher
aganov has quit [Remote host closed the connection]
monkegjinni has joined #ruby
sayan has joined #ruby
tagrudev has quit [Remote host closed the connection]
<tobiasvl> mollitz: sometimes you use parentheses in method calls and sometimes not, you can probably remove them all for readability (you only have single arguments)
<MrZYX> mollitz: if the first thing you do in a method is begin and the last thing rescue you can omit the begin
monkegjinni has quit [Remote host closed the connection]
<MrZYX> and the end for the rescue
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
<tobiasvl> mollitz: `print "string\n"` can be replaced with `puts "string"`, more readable to drop the \n
<mollitz> thx tobiasvl and MrZYX. is there something "deeper"? Like structure of the code etc.?
<mollitz> tobiasvl: thats great. i was looking for that!
sleetdrop has joined #ruby
sleetdrop has quit [Client Quit]
jlast has quit [Remote host closed the connection]
<tobiasvl> mollitz: the structure seems nice to me, but you could probably do some magic in order to not have to define the commands specifically when they're all reflected as methods in the manager? i dunno how though
freeayu has quit [Remote host closed the connection]
foobArrr has joined #ruby
monkegjinni has joined #ruby
<MrZYX> mollitz: hmm not really ruby specific but currently your Todo class also communicates with the user
skattyadz has joined #ruby
<MrZYX> IMO it should only communicate with its caller
<mollitz> tobiasvl: i know what you mean.
<MrZYX> i.e. instead of directly printing raise an exception and then let the manager, who interacts with the user, print the message
<mollitz> MrZYX: understanding.
<mollitz> MrZYX: k
<MrZYX> also more specific exception catching would be a good thing
<MrZYX> saves you headaches later
<mollitz> MrZYX: k
freerobby1 has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
<mollitz> well thx for the quick overview! really helped me
<MrZYX> for manager Manager#list have a look at Enumerable#with_index
chandankumar has quit [Ping timeout: 258 seconds]
<MrZYX> er, Enumerator#with_index
<tobiasvl> yeah, was about to say that
<tobiasvl> having a specific number iterator in loops isn't very ruby-ish
<MrZYX> another separation of concerns thingy would be parsing ARGV either completely inside the manager or outside and passing the values in
logix812 has quit [Quit: Computer has gone to sleep.]
<mollitz> MrZYX: yeah i thougt that
<MrZYX> but that's more of a nitpick
<mollitz> MrZYX: The thing with the index!
aytch has quit [Remote host closed the connection]
arya has quit [Ping timeout: 255 seconds]
<mollitz> :q
<MrZYX> oh and also in #list: puts "#{i}: #{todo}"
TooTubular has joined #ruby
<MrZYX> ruby people highly prefer #{} over + when working with strings
mpfundstein has joined #ruby
momomomomo has quit [Quit: momomomomo]
gianlucadv has quit [Quit: ZNC - http://znc.sourceforge.net]
carloslopes has quit [Remote host closed the connection]
chrishough has joined #ruby
<mollitz> thx MrZYX
llaskin1 has joined #ruby
<llaskin1> are all ruby gems licensed under 1 license type?
<MrZYX> nope it's up to the authors
darkc0met has quit [Ping timeout: 240 seconds]
<MrZYX> but most use MIT
<llaskin1> ...crap
<Xeago> Would anyone mind having a look at my resume? https://www.filepicker.io/api/file/Hu5icLnISvmq6OmanAnn
x0F has joined #ruby
jcheng has joined #ruby
<llaskin1> Xeago: please add bullet points
gianlucadv has joined #ruby
<llaskin1> each thing you did at each job tends to "flow together" into what looks like 1 long sentence/paragraph
arya has joined #ruby
<llaskin1> do not mention IRC
<llaskin1> noone cares what you do in your spare time
lewix_ has joined #ruby
<Xeago> horizontal rulers not enough?
<llaskin1> you can list the clarineting under "other skills" or some such. I'd also list that you are bilingual
<llaskin1> Xeago: no they aren't.
<llaskin1> also, you are (based on this resume) just getting out of college right?
<llaskin1> find a way to make it stick to 1 page.
<Xeago> yup
<Xeago> I often just take page 1
<Xeago> or atleast, I did before Primary skills went on the second page
rudisimo1 has quit [Quit: Leaving.]
rudisimo has joined #ruby
Heero has joined #ruby
Heero has quit [Changing host]
Heero has joined #ruby
gaahrdner has joined #ruby
<Xeago> where would you add the bullet points if I may ask?
<Xeago> per work experience item?
<llaskin1> Xeago: see pm
<Xeago> or instead/in addition to the horizontal ruler
chandankumar has joined #ruby
<tobiasvl> Xeago: hej hej hemskt mycket hej
<Xeago> I don't speak swedish, but hey :)
<llaskin1> dutch, not swedish.
lewix has quit [Ping timeout: 276 seconds]
<tobiasvl> yeah, i just saw that you lived in sweden
<tobiasvl> Xeago: 29 and 38 months? use years instead maybe?
zph has joined #ruby
<Xeago> I'd omit the months then
monkegji_ has joined #ruby
ananthakumaran has joined #ruby
<tobiasvl> or 2.5 and 3 years
<Xeago> and just leave it to the year - year part
dougireton has joined #ruby
zph has quit [Client Quit]
monkegjinni has quit [Read error: Connection reset by peer]
<tobiasvl> sure
<Xeago> the reason I added it was so I could add contract work (carnaval-radio) in a similar style
<tobiasvl> Xeago: s/clan's/clans
mneorr has joined #ruby
<llaskin1> Xeago: i hope my resume helps you out...you can see how I bulleted it out...
m8 has joined #ruby
<llaskin1> also if you are trying to get work in the US(i doubt it, but still) the thing you have at the top with your drivers license status/nationality/etc is very strange to me(as a US citizen/interviewer)
<llaskin1> (i mean the personalia section)
<gestahlt> I dont get it
<Xeago> it is recommended for sweden
<Xeago> people often don't have it
<tobiasvl> yeah, keep it in
dsadsdasd has joined #ruby
<gestahlt> Okay i open a file File.open('filename.yaml', 'w') do | savefile | and then??
<tobiasvl> (advice as a fellow scandinavian)
dougireton has quit [Read error: Connection reset by peer]
dougireton1 has joined #ruby
<MrZYX> gestahlt: savefile.write YAML.dump(your_data)
<tobiasvl> Xeago: i'd maybe explain what the specific technologies you mention are. Tire.rb for example. just mention what kind of stuff they are, and have an own section with "Technology" maybe?
<tobiasvl> or list it under skills
Macaveli has quit [Quit: Leaving]
justsee has quit [Ping timeout: 264 seconds]
acrussell has joined #ruby
<Xeago> I'll just remove the Tire.rb part
<Xeago> it adds little to nothing
grzywacz has joined #ruby
<gestahlt> ah i got it
<Xeago> yea adding bullets now, in addition to my horizontal lines
<gestahlt> File.write('filename.yaml', hash.to_yaml)
<gestahlt> Done
uris has joined #ruby
<llaskin1> Xeago, did you see how I list my dates/companies/bullet points in my resume?
<gestahlt> Okay.. now comes the tricky part.. i want to add the yaml i just saved to a zip file.. yeah, its easy to create a file and then zip it.. BUT, i want to save it directly to the zip (actually 7zip)
<gestahlt> I can use the stdin to direct
Amnesthesia has quit [Ping timeout: 258 seconds]
<gestahlt> 7zip can compress files from stdin
<gestahlt> how do i get the yaml file to stdin?
<Xeago> yes, you put less emphasis on the time
<MrZYX> gestahlt: how do you call 7zip?
<Xeago> I am unsure if I should emphasize it or not
<Xeago> also, yours is way more dense
Floydzy has quit [Quit: Floydzy]
<llaskin1> more to say, and yet I still manage to do it in 2 pages I think....
<MrZYX> gestahlt: have a look at IO#popen
dsadsdasd has quit [Ping timeout: 256 seconds]
<gestahlt> 7zip -mx1 a archivename.7z -siFILENAMEFORSTDIN
<Xeago> how would I list that I am bilingual, I thought I already did that in my skilss section
<Xeago> should it be called skills or primary skills
<llaskin1> thats for you to decide
<llaskin1> both are fine IMO
<gestahlt> -si is the parameter for stdin.. when you do stuff like dd if=/dev/sda1 | 7ziü -mx1 a archivename.7z -siSDA1IMAGE.IMG
chandankumar has quit [Ping timeout: 255 seconds]
pduin has quit [Remote host closed the connection]
<MrZYX> gestahlt: as said, have a look at IO#popen. I thought you already had a way to call it from ruby, that was more what I was asking
<Xeago> does it bother you that the section about QNH is less than the section about the grocery store, even tho QNH is in a SE field?
<gestahlt> I will check on popen.. maybe i will just create a tmp file and add it to the zip and when finished delete it.. might be less of a hassle
<Xeago> I feel I should elaborate on it, but I fail to do so
dougireton1 has quit [Quit: Leaving.]
<gestahlt> anyway, gtg. Thanks guys
<Xeago> also, I think I am going to move the years to the right side,
<Xeago> it takes up too much whitespace on the left
gestahlt has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121129151842]]
m8 has quit [Ping timeout: 260 seconds]
<llaskin1> IMO i'd drop the grocery store to 1 line
freerobby has quit [Quit: Leaving.]
<llaskin1> you were a cashier/bagboy. Noone gives a shit other then that you seem to "llike having a job"
aytch has joined #ruby
momomomomo has joined #ruby
zigomir has quit [Quit: zigomir]
idkazuma has joined #ruby
BizarreCake has quit [Ping timeout: 260 seconds]
<Xeago> not a cashier bagboy
<Xeago> wear team leader
<Xeago> was*
randomautomator has joined #ruby
macabhaird has joined #ruby
<Xeago> before that I was a regular shelfstocker for year and a half
jurassic_ has joined #ruby
<Xeago> at competing store next door
x0F has quit [Read error: Operation timed out]
randomautomator has quit [Read error: Connection reset by peer]
indyrl has joined #ruby
<Xeago> had quite a bit of influence then
indyrl has left #ruby [#ruby]
mikecmpbll has quit [Quit: Computer has gone to sleep.]
spider-mario has joined #ruby
momomomomo has quit [Ping timeout: 255 seconds]
randomautomator has joined #ruby
codecop has joined #ruby
akashj87 has quit [Ping timeout: 260 seconds]
carloslopes has joined #ruby
wolcanus has quit [Remote host closed the connection]
jumpei has joined #ruby
geggam_wk has joined #ruby
newUser1234 has joined #ruby
threesome has quit [Ping timeout: 255 seconds]
maletor has joined #ruby
_theriffer_ has quit [Quit: _theriffer_]
mercwithamouth has quit [Ping timeout: 240 seconds]
nezumi has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
chandankumar has joined #ruby
angusiguess has joined #ruby
nomenkun has joined #ruby
momomomomo has joined #ruby
d2dchat has quit [Remote host closed the connection]
<breakingthings> Xeago: you know, you don't need to include all of your past jobs. The grocery job means nothing to people looking for software engineers and your other sources seem good enough.
monkegji_ has quit [Remote host closed the connection]
momomomomo_ has joined #ruby
monkegjinni has joined #ruby
brain_shim has joined #ruby
carloslopes has quit [Ping timeout: 240 seconds]
<breakingthings> Also, your skills section is smaller than your hobbies section.
<breakingthings> That's just silly.
timmow_ has joined #ruby
Neomex has joined #ruby
ShellFu is now known as ShellFu_brb
momomomomo has quit [Ping timeout: 252 seconds]
momomomomo_ is now known as momomomomo
<Xeago> I could do all the skills I mention in the text below tabularly, but that adds only clutter in my opinion
GhettoCode has joined #ruby
pedrocarrico has joined #ruby
<Xeago> I only mention stuff I actively work with in the tabular section
<llaskin1> Xeago: you're so dreammmmmy.
<llaskin1> do people in scandinavia all include headshots?
pedrocarrico has left #ruby [#ruby]
BizarreCake has joined #ruby
<Xeago> no, but I exclude age
<llaskin1> get rid of Secondary activities and hobbies
<Xeago> which is usually done here
ph^ has joined #ruby
<breakingthings> Xeago: Being straight with you here, tabular section is dumb. List it, flaunt it, tell them you ride git like a bucking bronco, and tenderly love ruby throughout the night.
monkegjinni has quit [Read error: Connection reset by peer]
<llaskin1> I mean seriously, get rid of it. All that stuff can and will come out in an interview process.
<breakingthings> ^
<llaskin1> Noone wants to know a 1-10 of how good you are at languages and such
<llaskin1> just that you know them
<breakingthings> Resume is basically "tell us you actually have some idea what you're saying so we can filter you out if you seem like a dumbass"
<llaskin1> prove how well you know them in an interview
timmow_ has quit [Ping timeout: 252 seconds]
<Xeago> makes sense
<llaskin1> Xeago: almost there
monkegjinni has joined #ruby
<llaskin1> now get it to 1 page.
<breakingthings> ^
<Xeago> ofcourse
akashj87 has joined #ruby
<llaskin1> there seems to be no rhyme/rason to the list of primary skills
<Xeago> so you recommend just removing values in the skils section?
<llaskin1> put them in an order that makes sense
<llaskin1> yes remove the values
<llaskin1> and make it a comma seperated list
cburyta has joined #ruby
<Xeago> order of love :P
GhettoCode has left #ruby [#ruby]
<llaskin1> check out my skills section
<llaskin1> if you edit your skills section, i see no reason why this can't be 1 page
ph^ has quit [Read error: No route to host]
monkegjinni has quit [Read error: Connection reset by peer]
dr_bob has quit [Quit: Leaving.]
ph^ has joined #ruby
doritostains has joined #ruby
monkegjinni has joined #ruby
aytch has quit [Remote host closed the connection]
<breakingthings> Xeago: llaskin1: I'd say throw languages (eg Dutch/English) as part of your bio at the top, and then just make your skills list an unordered list.
pydave6367 has quit [Remote host closed the connection]
sayan has quit [Read error: Connection reset by peer]
apeiros has quit [Remote host closed the connection]
<Xeago> left/right unordered?
veer has quit [Ping timeout: 258 seconds]
<Xeago> or single
<Xeago> gotta make dinner, so a bit less active
<breakingthings> - Ruby (Mid-Level)
<breakingthings> - Proficient in git
<breakingthings> - C
<breakingthings> - JavaScript
<breakingthings> etc
<breakingthings> just a straight down list.
adamjleonard has quit [Quit: Leaving...]
<breakingthings> Most of them don't need qualifiers
Guest3100 has quit [Changing host]
Guest3100 has joined #ruby
Guest3100 is now known as digifiv5e
<breakingthings> For certain ones you want to highlight, like if this is a ruby job, you can flare just a little like I did with (Mid-Level), or 'proficient' with git.
<breakingthings> Everything else just list the thing itself. Just 'cause you know Java don't mean they give a squat.
GhettoCode has joined #ruby
peterbutterworth has joined #ruby
tylersmith has joined #ruby
wereHams1er has joined #ruby
kaffepanna has joined #ruby
kaffepan1a has quit [Read error: Operation timed out]
wereHamster has quit [Read error: Operation timed out]
<Xeago> I hate java..
chandankumar has quit [Ping timeout: 264 seconds]
_theriffer_ has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
_theriffer_ has quit [Client Quit]
Neomex has quit [Quit: Neomex]
<breakingthings> It was just an example
<breakingthings> but I bet they do too
dqminh has joined #ruby
_theriffer_ has joined #ruby
Neomex has joined #ruby
<breakingthings> Don't include non-relevant info
jurassic_ has quit [Ping timeout: 264 seconds]
IrishGringo has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
mfridh_ has joined #ruby
monkegjinni has joined #ruby
maycon has quit [Read error: Connection reset by peer]
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
mfridh has quit [Ping timeout: 264 seconds]
mfridh_ is now known as mfridh
aytch has joined #ruby
bulters has quit [Ping timeout: 240 seconds]
TooTubular has quit [Quit: tootubular]
<shevy> say you have
<shevy> module Foo; USE_COLOURS = true; end
<shevy> now I wanna do something like
<shevy> Foo.disable_colours
maycon has joined #ruby
maycon has joined #ruby
maycon has quit [Changing host]
<shevy> I dont have to use a constant
m8 has joined #ruby
<injekt> constants are constants for a reason
<shevy> I just want any way, without a $global
<injekt> use a class instance variable
<injekt> or module in this case
<linduxed> is there some linter for ruby?
<MrZYX> yep, instance variable of the module object
_theriffer_ has quit [Quit: _theriffer_]
<injekt> module Foo; class << self; attr_accessor :use_colours; end; end; Foo.use_colours = true/false
_theriffer_ has joined #ruby
<bnagy> linduxed: ruby -wc is what sublime text uses, and it's good
carloslopes has joined #ruby
erry__ has joined #ruby
<injekt> linduxed: there's ruby-lint but it's fairly new
<injekt> yeah +1 for -wc it's massively helpful
erry__ is now known as erry
<shevy> injekt cool
bricker`1A has joined #ruby
<linduxed> bnagy: ok thx
doritostains has quit [Quit: Leaving...]
<linduxed> btw, is there no such thing as "someInt++"?
<injekt> linduxed: no
wolcanus has joined #ruby
<linduxed> ok
<injekt> linduxed: some_int += 1
mollitz has left #ruby [#ruby]
<shevy> injekt, would there be a difference to syntax choice: class << self ?
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<injekt> shevy: hm?
<injekt> shevy: you want an alternative syntax?
rdark has quit [Ping timeout: 240 seconds]
<shevy> hmm
<shevy> your way works
<injekt> duh :P
<shevy> the class << self part confuses me
<injekt> it opens the singleton class of Foo
<injekt> (self is Foo)
<bnagy> you can probably do def self.use_colours
<injekt> yup
<bnagy> but you'll need to define the getter / setter individually
<injekt> yeah, of course that's all attr_accessor does, so you can do that too, shevy
bricker`LA has quit [Ping timeout: 264 seconds]
<shevy> hmm... your line is much shorter though, it's just one line :(
pygmael has quit [Quit: pygmael]
<shevy> but yeah, I'll use attr*
rdark has joined #ruby
ShellFu_brb is now known as ShellFu
<injekt> well it's 3 because semi-colons suck
<shevy> hehe
dhruvasagar has joined #ruby
mikepack has joined #ruby
jbueza has joined #ruby
llaskin1 has left #ruby [#ruby]
mpfundstein has quit [Remote host closed the connection]
jcheng has quit [Ping timeout: 240 seconds]
Vainoharhainen has quit [Quit: Leaving...]
cantonic|away has quit [Quit: cantonic|away]
<Mattx> Hello
<Mattx> is there any permissive JSON parser?
<Mattx> I want to be able to parse things like "{foo: 123}" correctly
<Mattx> but JSON (the gem) throws an error: unexpected token
d2dchat has joined #ruby
<injekt> >> require 'json'; JSON.parse '{foo: 123}'
<eval-in> injekt => (http://eval.in/14622)
<injekt> >> require 'json'; p JSON.parse '{foo: 123}'
<eval-in> injekt => (http://eval.in/14623)
<injekt> srsly
<injekt> ah
freakazoid0223 has joined #ruby
filipe has quit [Ping timeout: 246 seconds]
<injekt> anyway
<injekt> that's because it's invalid, Mattx
Heero has quit [Ping timeout: 245 seconds]
<injekt> JSON.parse '{"foo": 123}'
<Mattx> I know it's """invalid"""
<injekt> you must quote json keys
<Mattx> but come on, there's no ambiguity, I want to parse it anyway
<Mattx> browsers do
wolcanus has quit [Ping timeout: 255 seconds]
wolcanus has joined #ruby
heliumsocket has quit [Quit: heliumsocket]
<injekt> why are you trying to parse invalid json though
<Mattx> because it's part of the input of the user
<injekt> eh
<Mattx> and I didn't want to force to user (or actually, to assume) that it'll be valid
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
jlast has joined #ruby
<Mattx> valid as in "according to the standard"
<Xeago> so to summarize, if I read my scrollback correctly, unordered list my skills, remove the values for them, fit to 1 page
<Xeago> and be happy?
<banister`sleep> also get rid of your pic, u look 13
<banister`sleep> ;)
<Xeago> bah
<injekt> Mattx: then dont you a json parser, because you're not parsing json
<Mattx> personally I never use quotes around the keys in Javascript.. why would I do in ruby? :)
<injekt> use*
cobragoat has joined #ruby
<injekt> Mattx: it's not ruby
<injekt> it's json
<Mattx> yep, I meant from ruby :P
<injekt> hash = eval(your_string)
<injekt> there you go
<Xeago> banister`sleep: that pic is almost 3 years old, but it still is my best picture
<Xeago> tho I now have a beard which I shaved before
<Xeago> kinda
eddiezane has joined #ruby
<injekt> Xeago: use some padding
<Xeago> light'ish beard
tspike has joined #ruby
<injekt> that entire file reads as one block of text
<Xeago> padding where?
eddiezane has left #ruby [#ruby]
<injekt> really?
dylan` has joined #ruby
<injekt> everywhere
<Xeago> I am not a designer..
dsadsdasd has joined #ruby
<injekt> neither am I, im a reader
<injekt> and i cant read it without having to parse it
apeiros has joined #ruby
<injekt> you dont need all the horizontal rules
maxmanders has quit [Quit: Computer has gone to sleep.]
Beoran_ has joined #ruby
<Hanmac1> Mattx:
Sidfarkus has quit [Quit: Copywight 2013 Elmer Fudd. All wights wesewved.]
<Hanmac1> >> "{foo: 123}".gsub(/"?([[:alpha:]]+)"?/,'"\1"')
<eval-in> Hanmac1 => "{\"foo\": 123}" (http://eval.in/14629)
<Mattx> haha, yeah
<Xeago> those were the separators first
<injekt> you might want to use ["']
<injekt> otherwise 'foo' would become '"foo"'
dsadsdasd has quit [Read error: Operation timed out]
dhruvasagar has quit [Ping timeout: 240 seconds]
eddiezane has joined #ruby
eddiezane has quit [Client Quit]
carloslopes has quit [Remote host closed the connection]
DrCode has quit [Remote host closed the connection]
maxmanders has joined #ruby
mephux has quit [Excess Flood]
threesome has joined #ruby
Beoran__ has quit [Ping timeout: 248 seconds]
moted has joined #ruby
filipe has joined #ruby
mephux has joined #ruby
blaxter has joined #ruby
bricker`LA has joined #ruby
DrCode has joined #ruby
carloslopes has joined #ruby
mercwithamouth has joined #ruby
<Mattx> >> "{foo: [{a1: \"123\", \"b2\": 456}], 'c3': 789}".gsub(/['"]?(\w+)['"]?:/,'"\1":')
<eval-in> Mattx => "{\"foo\": [{\"a1\": \"123\", \"b2\": 456}], \"c3\": 789}" (http://eval.in/14630)
<Mattx> this is somehow better ^
<injekt> Mattx: Hanmac1 used :alpha: over \w for a reason
<Mattx> what's the reason?
<Hanmac1> google it
<Xeago> injekt: does this look better? https://www.filepicker.io/api/file/i5Kg5PnZRiiVYFeLthNF
<Mattx> numbers are allowed
jdunck has joined #ruby
bricker`1A has quit [Ping timeout: 248 seconds]
casheew has quit [Read error: Connection reset by peer]
<Mattx> it says "Any UNICODE character except " or \ or control character"
<apeiros> why ['"] instead of just '?
<injekt> then use [:word:]
casheew has joined #ruby
* apeiros for some unexplicable reason dislikes the [::] char classes
<injekt> yeah no need to replace the "'s
<Mattx> >> "{foo: [{a1: \"123\", \"b2\": 456}], 'c3': 789}".gsub(/['"]?([^\s"\\]+)['"]?:/,'"\1":')
<eval-in> Mattx => "\"{foo\": \"[{a1\": \"123\", \"b2\": 456}], \"c3'\": 789}" (http://eval.in/14631)
<injekt> apeiros: they're horrible on the eyes
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
freerobby has joined #ruby
<apeiros> \p{word} >> [:word:]
<injekt> yeah
<injekt> that's worse imo
rippa has joined #ruby
<Hanmac1> Xeago i found an Dutch translator when my #OpenRubyRMK got finish :P
<injekt> Xeago: much better
jeffreybaird has joined #ruby
<apeiros> though if spec says "anything but", I'd just go with [^but]
jeffreybaird has quit [Client Quit]
<injekt> [^[:blank]] :D
<apeiros> Xeago: oh, looking for a job?
cantonic has joined #ruby
Czupa has joined #ruby
tomzx_mac has quit [Ping timeout: 252 seconds]
<Hanmac1> apeiros: i think he is more looking for money ... an job is only the more easy way to get it ;P
akashj87 has quit [Quit: leaving]
* apeiros thinks a job gives you more than just money
zeade has joined #ruby
eliasp_ has joined #ruby
Tricon has joined #ruby
eliasp has quit [Ping timeout: 252 seconds]
robscomputer_ has joined #ruby
cherrypeel has joined #ruby
cherrypeel has left #ruby [#ruby]
voodoofish430 has joined #ruby
pitzips has joined #ruby
<Xeago> Hanmac1: apeiros, need a job to get my permanent permit
<Xeago> I don't care about money
<Xeago> as long as I have sufficient to not worry about it
<Xeago> my parents live on a minimum budget
<apeiros> a permanent permit still needed in the EU?
<Hanmac1> in this point money is like air ... you do not care if you have enough :P
<Xeago> they worry if they need to replace a cooking-pan
chrishough has quit [Quit: chrishough]
<Xeago> apeiros: makes life easier
<apeiros> ok
<Xeago> with a perm. perm., I don't have to requeue every x years
<Xeago> and can vote country wide
<Xeago> and other things
<Xeago> in case bordercontrols get set up again
<Xeago> I am safe
<Xeago> etc etc
<apeiros> I see
<Xeago> currently got a permit that allows everything, expires august 2014
ryanjh has joined #ruby
ryanjh has quit [Max SendQ exceeded]
<Xeago> then I need to queue again for about a week
<Xeago> or well before that
robscomputer_ has quit [Read error: Connection reset by peer]
<Xeago> and that I can do 3 times
robscomp_ has joined #ruby
ryanjh has joined #ruby
<Xeago> (will get 4year permits from then on btw)
camilasan has quit []
<Xeago> and after those I have to either get specialty treatment, or a permanent permit
<Xeago> apeiros: Hanmac1, care to comment https://www.filepicker.io/api/file/kinXZEK3STCCMqedmqCQ ?
<apeiros> content and layout?
alanp_ has joined #ruby
<Xeago> everything besides the pagebreak
alanp has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
<apeiros> heh, that'd have been my first
tylersmith has quit [Quit: tylersmith]
<Xeago> I am redoing the skills section btw
alanp_ is now known as alanp
<Hanmac1> your ruby skills are only beginner? ;P
<Xeago> removing the values about it
ckrailo has joined #ruby
<Xeago> hardly beginner
<apeiros> I find it interesting that you consider yourself "beginner" (ruby skills)
Edder has joined #ruby
Edder has left #ruby [#ruby]
<Xeago> I know nothing about rubystd
<Xeago> or ruby core or whatever it even is called
davetherat has quit [Remote host closed the connection]
<apeiros> I had applicants who were certainly far below your level and considered themselves to be guru-skilled
davetherat has joined #ruby
<Hanmac1> yeah :D you know that you know nothing :P
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<Xeago> I am fluent in the language, as in syntax etc
timmow_ has joined #ruby
<Xeago> but I lack the knowledge about the accompanying framework
<apeiros> by framework you refer to core/stdlib?
<shevy> Xeago you speak swedish?
mafolz has quit [Ping timeout: 260 seconds]
<Xeago> not fluent
<Xeago> should mention it tho
<Hanmac1> Xeago i was in Netherlands too for a week ... the word i learned was Knoflock :P
<Xeago> knoflook*
angusiguess has quit [Ping timeout: 245 seconds]
<Xeago> apeiros: kinda
pi3r has quit [Quit: Leaving]
<Xeago> apeiros: more than kinda, yes
Edder has joined #ruby
<shevy> what is knoflook?
<Hanmac1> shevy: garlic
<shevy> hahahha
<shevy> knoblauch!
<shevy> the dutch speak some crazy german dialect
slainer68 has quit [Remote host closed the connection]
chrishough has joined #ruby
<Hanmac1> better than Bavarian :P
<MrZYX> ^
<shevy> hey Hanmac ... un so deel ick op as Störtebeker sine Likedeeler
<shevy> nah
<shevy> bavarian is fine
<shevy> rather close to the austrian dialect
TooTubular has joined #ruby
Edder has left #ruby [#ruby]
Edder has joined #ruby
<Hanmac1> Saxon is also an funny dialect
timmow_ has quit [Ping timeout: 252 seconds]
<shevy> og nu fortsætter vi med de danske sprog
lewix_ has quit [Remote host closed the connection]
lewix has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
keymone has quit [Quit: keymone]
eldariof has joined #ruby
lkba has quit [Ping timeout: 255 seconds]
dmiller has joined #ruby
marcdel has quit []
jgarvey has joined #ruby
vetsin has quit [Ping timeout: 256 seconds]
<JamieJ> eliptics: hey are you still here?
BBonifield has quit [Ping timeout: 256 seconds]
<JamieJ> elaptics: hey are you still here?
lewix has quit [Ping timeout: 264 seconds]
vetsin has joined #ruby
<apeiros> eluptics, are you there too? :)
mityaz has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
slakware has joined #ruby
_maes_ has joined #ruby
<elaptics> JamieJ: yep
<JamieJ> hey
akemrir has joined #ruby
sayan has joined #ruby
BBonifield has joined #ruby
<elaptics> apeiros: you forgot eloptics and eleptics :)
robscomp_ has quit [Remote host closed the connection]
<JamieJ> i have an error from running your code. was testing it to see if i can read from the item class
<apeiros> elaptics: and elyptics
<elaptics> JamieJ: gist what you've got?
bigoldrock has joined #ruby
<JamieJ> gimme a sec
himsin has joined #ruby
<elaptics> JamieJ: my code as is, runs without problems - I'm using ruby 1.9.3, can't remember if there's anything too specific in it though
<JamieJ> yeah
<JamieJ> i edited as you said to take values from users
nga4 has joined #ruby
nplusp has quit [Ping timeout: 260 seconds]
<elaptics> JamieJ: let's see what you've got
robscomputer_ has joined #ruby
zeroeth has quit [Ping timeout: 248 seconds]
sepp2k has quit [Remote host closed the connection]
<JamieJ> the problem is with the item = Item.new line
alex__c2022 has joined #ruby
Neomex has quit [Ping timeout: 252 seconds]
drale2k has joined #ruby
<Mattx> what was the syntax to use a method as a block? like in: class Foo \n def initialize bar(xux) end \n def bar yield end \n def xux puts "yay!" end \n end
jamie_ca_ has joined #ruby
<elaptics> JamieJ: yes, you're not passing the expected arguments to it - there's no need for that line at all, you're creating the object you need on line 82
alexwh has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
akashj87 has joined #ruby
hamakn has quit [Remote host closed the connection]
<Mattx> same example: http://paste.kde.org/715154/
<elaptics> JamieJ: why have you created a separate array? You can add what that does to the PrintReceipt class
eddiezane has joined #ruby
hamakn has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
eliasp_ has quit [Quit: No Ping reply in 180 seconds.]
peterbutterworth has quit [Remote host closed the connection]
<elaptics> JamieJ: also the puts on line 57 is going to cause problems - there's no reason to "puts" inside this class. The else clause needs to return a suitable value for the rate e.g. 0 so that it can be used in the calculation
stkowski has joined #ruby
eddiezane has left #ruby [#ruby]
hamakn has quit [Remote host closed the connection]
eliasp has joined #ruby
rupee has joined #ruby
<JamieJ> elaptics: that is actually for the error message
mercwithamouth has quit [Ping timeout: 245 seconds]
<JamieJ> for when the product they ask for isnt available
thone_ has quit [Ping timeout: 264 seconds]
bricker`1A has joined #ruby
Monie has quit [Quit: Leaving]
baba has joined #ruby
<Hanmac1> Mattx bar {xux}
<awc737> I wanna be, the very best. The best there ever was
<elaptics> JamieJ: well that's not going to work, and isn't the way to do it
<davidcelis> at rubby?
zeroeth has joined #ruby
<awc737> to web scale is my test. to cloud is my cause
<Mattx> Hanmac, yeah, there you're passing a block that calls xux... I think there was a way to directly use xux's reference
fire has quit [Ping timeout: 264 seconds]
x0F has joined #ruby
freerobby has quit [Quit: Leaving.]
<breakingthings> cloud hyper scale mongonode infrastructures
<Mattx> like with ".map :foo" (something similar)
monkegji_ has joined #ruby
<elaptics> JamieJ: keeping it simple the item object can check to see if the name is a valid one and only if it is, you can add it to the receipt
<JamieJ> ok
<awc737> can I put this on my resume? "experienced cloud hyper scale mongonode infrastructures"
<nezumi> not roflscale?
<JamieJ> elaptics: is there anything else?
<awc737> managers will probably eat it...
bricker`LA has quit [Ping timeout: 264 seconds]
mahmoudimus has joined #ruby
<awc737> not sure if roflscale could fly...
<nezumi> I'm supporting a hyposcale OpenStack project....
rdev is now known as rdev5
<Hanmac1> Mattx: &method(:xux)
mahmoudimus has quit [Client Quit]
kristofers has joined #ruby
<Mattx> there it is!
xardas has joined #ruby
<Mattx> why is the "&" required?
monkegjinni has quit [Ping timeout: 264 seconds]
<injekt> method(:xux).to_proc
<shevy> Mattx careful, Hanmac1 always picks the worst possible syntax
<elaptics> JamieJ: no, the rest is fine for now
<awc737> "hyperscale" the industry needed that word?
chrisja has joined #ruby
<Mattx> shevy, what's the best possible syntax then? :P
nari has quit [Ping timeout: 245 seconds]
<JamieJ> i cant wait to become a ruby master. the novie life is for the birds :(
wyhaines has joined #ruby
<injekt> Mattx: &method(:foo) is ugly as sin, map { |x| foo(x) } is much more readable
<shevy> Mattx .map(&:foo)
mahmoudimus has joined #ruby
<injekt> shevy: that wont work
<callmeivan> i get an error (sometimes) if i run my code without #5 (puts), any ideas? http://pastebin.com/my5gV2RD
<callmeivan> stock.rb:9:in `price': undefined method `[]' for nil:NilClass (NoMethodError)
<callmeivan> from stock.rb:58:in `<main>'
huoxito has quit [Ping timeout: 258 seconds]
<injekt> callmeivan: stock_price is nil
stuartrexking has joined #ruby
slakware has quit [Remote host closed the connection]
wallclockbuilder has joined #ruby
<injekt> also return stock_price = stock_price[1].to_f; return sock_price[1].to_f
<Mattx> in `bar': no receiver given, line 8
<injekt> Mattx: yes, i said that wouldn't work
<injekt> you need &method(:xux) but that's horrible
<Mattx> ok... {xux} then u.u
<injekt> soyes
<injekt> yes*
<injekt> :)
sayan has joined #ruby
<MrZYX> Mattx: maybe describe the actual problem you want to solve
<Mattx> still, I want to know why it wouldn't work in this case
<Mattx> any idea?
br4ndon has joined #ruby
<Mattx> the &:foo syntax
<callmeivan> ahhh - thanks injekt, i switched so much around :D
<Hanmac1> Mattx because the block is called without argument
twoism has joined #ruby
<injekt> Mattx: do this in a console: :foo.to_proc.call
mattbl has joined #ruby
<injekt> &:foo is the same as :foo.to_proc, you're trying to call this proc without a receiver
<injekt> >> :puts.to_proc.call(Kernel, "hello")
<eval-in> injekt => hello ... (http://eval.in/14636)
tvw has quit []
<injekt> exactly how Hanmac1 says, you pass in the receiver so it works
<Mattx> wtf? it's weird
tevio has quit [Remote host closed the connection]
chandankumar has joined #ruby
<injekt> like you can see in my example
<injekt> without Kernel, there's no receiver
<injekt> >> :puts.to_proc.call("hello")
<eval-in> injekt => /tmp/execpad-802e440d093a/source-802e440d093a:2:in `call': private method `puts' called for "hello":String (NoMethodError) ... (http://eval.in/14637)
<injekt> ^
<injekt> well that is a receiver, but you're passing in nothing it would be more like:
<injekt> >> :puts.to_proc.call
<eval-in> injekt => /tmp/execpad-dbf7a67ef3fd/source-dbf7a67ef3fd:2:in `call': no receiver given (ArgumentError) ... (http://eval.in/14638)
dsadsdasd has joined #ruby
apok has joined #ruby
filipe has quit [Remote host closed the connection]
dsadsdasd has quit [Read error: Operation timed out]
sayan has quit [Ping timeout: 240 seconds]
thone has joined #ruby
<injekt> callmeivan: also, you should use a html parser, not regexp
<banister`sleep> >> :display.to_proc.call("hello")
<eval-in> banister`sleep => hellonil (http://eval.in/14639)
<injekt> banister`sleep: :D
kpshek has quit []
bigkm has joined #ruby
<injekt> >> :gsub.to_proc.call("abc", "def")
<eval-in> injekt => #<Enumerator: "abc":gsub("def")> (http://eval.in/14640)
tdelam has left #ruby [#ruby]
mljsimone has quit [Ping timeout: 251 seconds]
callmeivan has quit [Ping timeout: 251 seconds]
<Mattx> ah, I think I got it
agarie has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby
kpshek has joined #ruby
<Mattx> so the first param of yield and call is the receiver and the rest are params for the block/method/whatever being called?
Al____ has quit [Quit: Al____]
veer has joined #ruby
agarie has joined #ruby
unflores has quit [Quit: unflores]
<injekt> no
<injekt> :P
<Mattx> well, that's how it seems it works here: http://paste.kde.org/715172/
<Mattx> T_T
i_s has joined #ruby
<injekt> and the yield self is just because you need to pass self to the proc
<injekt> Mattx: in this example, yes
lewix has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
alexyz has quit [Read error: Connection reset by peer]
lkba has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<injekt> Mattx: to_proc yields a special proc which takes the receiver and params, a normal proc and call wouldn't need this
sambao21 has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby
huoxito has joined #ruby
<Mattx> ahhhh, it makes sense now
<Hanmac1> Mattx: when you use method(:xux) the params are react different
callmeivan has joined #ruby
jtperreault has joined #ruby
<JamieJ> yes! progress!!1
<JamieJ> elaptics: the code looks good up until the second to last line
arietis has quit [Quit: Computer has gone to sleep.]
mockra has joined #ruby
malte_ has joined #ruby
Mattx has left #ruby ["Leaving"]
Mattx has joined #ruby
<Mattx> ok, thanks guys!
alup has quit [Quit: Leaving]
chandankumar has quit [Ping timeout: 255 seconds]
sambao21 has joined #ruby
cobragoat has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 258 seconds]
banjara has quit [Quit: Leaving.]
bricker`1A has quit [Ping timeout: 264 seconds]
<elaptics> JamieJ: which line in the gist is that?
<elaptics> JamieJ: if it's 89 it's because you have got the wrong method name
<JamieJ> yeah its 89
<elaptics> JamieJ: total_tax not tax_total
* waxjar is listening to Begin Oktober by Spinvis (1:15/3:18)
<injekt> oO
<waxjar> whoops, wrong chan
<injekt> there's a right chan for that?
<waxjar> yup
<elaptics> JamieJ: ok, I couldn't resist, now no cheating - get yours working first. Here's a slightly tidier version :) https://gist.github.com/andyh/aadf94e1db8fc58eb3b3
marcdel has joined #ruby
<waxjar> music chan :p
c0rn has joined #ruby
chussenot has quit [Quit: chussenot]
sambao21 has quit [Client Quit]
monkegji_ has quit [Remote host closed the connection]
lewix_ has joined #ruby
tootooroo has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
tootooroo has joined #ruby
<swarley> Anyone want to weigh in on what XML parsing library I should use if I'm looking for speed
<swarley> I was leaning towards REXML since it's in the stdlib but I know it tends to be slow
moeSeth_ has quit [Ping timeout: 264 seconds]
cobragoat has joined #ruby
aytch has quit [Remote host closed the connection]
Ontolog has joined #ruby
tspike has quit [Quit: leaving]
taqutor has quit [Ping timeout: 276 seconds]
<waxjar> either a C extension or something that's not Ruby, i think :P
drale2k has quit [Quit: Linkinus - http://linkinus.com]
<elaptics> swarley: nokogiri?
lewix has quit [Ping timeout: 256 seconds]
Ontolog has quit [Remote host closed the connection]
<swarley> Yeah, I was thinking Nokogiri. How is it's reputation as far as installation?
mljsimone has joined #ruby
Ontolog has joined #ruby
<elaptics> swarley: think it's ok now - haven't used it in a long time though
Ontolog has quit [Remote host closed the connection]
xll11 has joined #ruby
<xll11> Hey! Why use proc when you can just define a new method?
mercwithamouth has joined #ruby
Ontolog has joined #ruby
ferdev has quit [Quit: ferdev]
brianpWins has joined #ruby
<swarley> Procs are objects that are different from methods. Both have their own use cases
<elaptics> xll11: ?
sambao21 has joined #ruby
timmow has joined #ruby
mneorr has quit [Remote host closed the connection]
tylersmith has joined #ruby
veer has quit [Ping timeout: 245 seconds]
ebobby has joined #ruby
JamieJ has quit [Ping timeout: 245 seconds]
Assurbanipal has joined #ruby
sayan has joined #ruby
dqminh has quit [Remote host closed the connection]
internet_user has quit [Remote host closed the connection]
sambao21 has quit [Client Quit]
drale2k has joined #ruby
nomenkun has joined #ruby
banjara has joined #ruby
dqminh has joined #ruby
sayan has quit [Max SendQ exceeded]
alexyz has joined #ruby
veer has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
nathancahill has joined #ruby
sayan has joined #ruby
sethetter has joined #ruby
LennyLinux has quit [Remote host closed the connection]
freerobby has joined #ruby
nullx has quit [Remote host closed the connection]
mneorr has joined #ruby
tspike has joined #ruby
mneorr has quit [Remote host closed the connection]
sayan has quit [Max SendQ exceeded]
sepp2k has joined #ruby
happydude has joined #ruby
sayan has joined #ruby
sayan has quit [Excess Flood]
sambao21 has joined #ruby
toekutr has joined #ruby
toekutr has quit [Remote host closed the connection]
duosrx has quit [Remote host closed the connection]
JamieJ has joined #ruby
<JamieJ> ugh
tevio has joined #ruby
sambio has joined #ruby
sambio has quit [Changing host]
sambio has joined #ruby
ehaliewicz has joined #ruby
sayan has joined #ruby
wolcanus has quit [Remote host closed the connection]
hukl has joined #ruby
Hanmac1 has joined #ruby
bulters has joined #ruby
BadQuanta has joined #ruby
pitzips has quit [Quit: Leaving]
_altivec has joined #ruby
elaptics is now known as elaptics`away
chrishough has quit [Ping timeout: 240 seconds]
krawchyk_ has joined #ruby
tomsthumb has joined #ruby
rdark has quit [Ping timeout: 248 seconds]
krawchyk_ has quit [Remote host closed the connection]
JamieJ has quit [Ping timeout: 245 seconds]
sayan has quit [Ping timeout: 260 seconds]
chrishough has joined #ruby
bulters has quit [Ping timeout: 264 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
krawchyk has quit [Ping timeout: 240 seconds]
pcarrier_ has joined #ruby
indyrl has joined #ruby
lewix_ has quit [Ping timeout: 264 seconds]
kofno has quit [Remote host closed the connection]
arya has quit [Ping timeout: 245 seconds]
dylan` has quit [Read error: Connection reset by peer]
bean has joined #ruby
gianlucadv has quit [Ping timeout: 264 seconds]
tvw has joined #ruby
kofno has joined #ruby
gianlucadv has joined #ruby
evenix has joined #ruby
veer has quit [Ping timeout: 245 seconds]
etcetera has quit []
veer has joined #ruby
apod has quit []
sayan has joined #ruby
arya has joined #ruby
mengu has quit [Ping timeout: 264 seconds]
etcetera has joined #ruby
etcetera has quit [Client Quit]
<Dwarf> Evening. I have a rather strange problem. If I have a string like this "^this is a string"
jcheng has joined #ruby
hamakn has joined #ruby
<Dwarf> And I do string[1], I'd normally get the '^' sign, but I get the ascii number instead on another server. Why is that and how do I change it?
Zai00 has quit [Quit: Zai00]
dhruvasagar has quit [Ping timeout: 240 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
<MrZYX> you mean string[0]?
<Hanmac1> Dwarf: because the other server is outdated
<invisime> if you get an ascii number and you want the character, use .chr.
sayan has quit [Read error: Connection reset by peer]
<Dwarf> I feared as much
chandankumar has joined #ruby
<Dwarf> Yes MrZYX you're right
brennanMKE has joined #ruby
<Hanmac1> Dwarf the other server is 1.8 and this is outdated
<Dwarf> It seems it is
dhruvasagar has joined #ruby
<Dwarf> It's not my server, so could I just run 1.9 or 2.0 with RVM?
g0bl1n has joined #ruby
<apeiros> Dwarf: string[0,1] will work the same across 1.8 and 1.9
<Dwarf> Or would that conflict?
g0bl1n has quit [Changing host]
g0bl1n has joined #ruby
matayam has quit [Remote host closed the connection]
<MrZYX> no it likely wouldn't conflict
<apeiros> if it's not your server, you should probably discuss that with the server owner. generally rvm can have multiple rubies without conflict
havenwood has joined #ruby
hamakn has quit [Ping timeout: 256 seconds]
<g0bl1n> on string formatting, I'd like to get a "0000000abc" result but "%010s" % "abc" returns " abc"
<apeiros> but e.g. apache + passenger can currently only run a single ruby version (passenger 4 changes that, also using apache as reverse proxy to another server allows multiple rubies too)
mattbl has quit [Quit: This computer has gone to sleep]
<apeiros> g0bl1n: rjust/ljust
<Dwarf> The server owner doesn't use ruby, I'm the only person :)
dsadsdasd has joined #ruby
adam12 has quit [Ping timeout: 246 seconds]
arietis has joined #ruby
skattyadz has quit [Quit: skattyadz]
swingha has joined #ruby
<g0bl1n> apeiros, ty, yet, from the docs, I seem to understand that "%010s" % "abc" would subst spaces by zeros
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
luckyruby has quit [Remote host closed the connection]
<apeiros> g0bl1n: that's for numbers
<apeiros> >> "%010d" % 3
<eval-in> apeiros => "0000000003" (http://eval.in/14646)
erry has left #ruby [#ruby]
<g0bl1n> apeiros, yes, for numbers its ok. Maybe I misunderstood docs
<Dwarf> Is it possible to install a ruby using RVM without root?
troessner has quit [Quit: Leaving]
dsadsdasd has quit [Ping timeout: 256 seconds]
BSaboia has joined #ruby
<MrZYX> Dwarf: if all the dependencies are there, yeah (even recommended)
<g0bl1n> Dwarf, its recommended that way. On your home dir...
<g0bl1n> Dwarf, no sudo
<Dwarf> If I do rvm install 1.9.3 it asks for sudo
<Dwarf> Somehow
<g0bl1n> Dwarf, did you install rvm with sudo ?
<Dwarf> No
<Dwarf> I don't have sudo access
adam12 has joined #ruby
<MrZYX> how did you install RVM then?
<g0bl1n> Dwarf, other rubies install ok ?
c0rn has quit [Quit: Computer has gone to sleep.]
<apeiros> Dwarf: rvm autolibs disable
cnrk has joined #ruby
chandankumar has quit [Ping timeout: 240 seconds]
<apeiros> and make sure the deps are there
<apeiros> but last time I checked, rvm stated why it used sudo (autolibs is quite new)
etcetera has joined #ruby
wallclockbuilder has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 260 seconds]
<Dwarf> I did indeed install rvm with autolibs
internet_user has joined #ruby
<Dwarf> After running install again it looks like it's compiling without any problem
dqminh has quit [Remote host closed the connection]
<apeiros> o0
<MrZYX> will probably miss some stdlib stuff
<apeiros> autolibs is a setting you can turn on/off without reinstalling rvm :)
<Dwarf> Ruby 1.9.3 compiled successfully :)
<Dwarf> Thanks a bunch
tricon_ has joined #ruby
BizarreCake has quit [Ping timeout: 252 seconds]
c0rn has joined #ruby
Cicloid has joined #ruby
wolcanus has joined #ruby
<Dwarf> ohboy. Now it's whining about libyaml
<Dwarf> I'll have to prod the server owner about that I guess
closer has quit [Ping timeout: 276 seconds]
<MrZYX> yup get him to execute what rvm requirements lists
closer has joined #ruby
Tricon has quit [Ping timeout: 260 seconds]
drale2k has quit [Quit: Leaving...]
sayan has joined #ruby
mljsimone has quit [Ping timeout: 245 seconds]
momomomomo has quit [Ping timeout: 252 seconds]
interactionjaxsn has quit [Remote host closed the connection]
jonahR has joined #ruby
frem has joined #ruby
frem has quit [Max SendQ exceeded]
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
ferdev has joined #ruby
freezey has quit [Remote host closed the connection]
kraljev3 has joined #ruby
moos3 has joined #ruby
alexyz has quit [Read error: Connection reset by peer]
<kraljev3> Why doesn't this work?
<kraljev3> array.all?.with_index { |a, i| }
hiyakashi has quit [Quit: お前は知りすぎた]
<Xeago> I've never seen array.all?
<apeiros> Xeago: Enumerable#all?
<apeiros> kraljev3: define "doesn't work"
<Xeago> never seen it before
<MrZYX> kraljev3: because all? doesn't return a enumerator
<apeiros> .all? returns true/false, so it makes little sense actually
<apeiros> MrZYX beat me to it
<Xeago> does it return to if all elements satisfy a condition?
<kraljev3> yep
<Xeago> then it would make sense ye
<Hanmac1> you need .to_enum(:all?).with_index {|a,i| }
Morkel has joined #ruby
jumpei has quit [Remote host closed the connection]
timmow has joined #ruby
tevio has quit [Remote host closed the connection]
atmosx has joined #ruby
alexyz has joined #ruby
tspike has quit [Ping timeout: 255 seconds]
jonathanwallace has joined #ruby
markalanevans has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
ph^ has quit [Remote host closed the connection]
banister`sleep is now known as banisterfiend
<atmosx> hello
<Xeago> hello atmosx
dmiller has quit [Ping timeout: 248 seconds]
ryanjh has quit [Quit: Computer has gone to sleep.]
tricon_ has quit [Quit: Leaving...]
<atmosx> guys, can I load different styles into specific haml sinatra files by linking the CSS file when I have a layout.haml in views/ ?
<atmosx> it's a sinatra specific qst heh
<atmosx> Xeago: how's life?
<Xeago> awful, stupid resume is bugging me up
<kraljev3> what is the best way to get first element of the hash?
<Xeago> tho nearly done with it thanks to everyone here
<kraljev3> hash.values.first?
<Xeago> kraljev3: hashes aren't ordered as far as I know
<Xeago> but ye
<kraljev3> if you don't change them, they are
mengu has joined #ruby
<kraljev3> insertion order
<kraljev3> i mean if you don't delete
<Xeago> is that specified?
<Xeago> I think that is by matter of coincedence
<kraljev3> you might be right
tootooroo has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
chrisnicola has joined #ruby
interactionjaxsn has joined #ruby
chrisnicola_ has joined #ruby
<kraljev3> you aren't
chrisnicola_ has quit [Client Quit]
rezzack has joined #ruby
<Xeago> nifty
<atmosx> nighty
ebobby has left #ruby [#ruby]
<atmosx> lol
<Xeago> ah, it is since 1.9x
<Xeago> I never used it xD
<kraljev3> that was long ago :D
pygmael has joined #ruby
seme has quit [Quit: Leaving.]
heliumsocket has joined #ruby
tevio has joined #ruby
<kraljev3> anyone using bitcoin here?
<unstable> kraljev3: #bitcoin
<kraljev3> i know, just curious
<kraljev3> because I see rubyists as inteligent
<kraljev3> people
frem has joined #ruby
<kraljev3> in general
frem has quit [Max SendQ exceeded]
<banisterfiend> kraljev3: they're not really, most of them are ex-PHP programmers who only know how to program for the web, and can barely do that
ksinkar_ has quit [Quit: Konversation terminated!]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
mikepack_ has joined #ruby
<kraljev3> well, I have been 5 year PHP developer since I switched to ruby
slainer68 has joined #ruby
<kraljev3> but I have completely switched to ruby paradigm
Hanmac1 has quit [Ping timeout: 260 seconds]
tootooroo has joined #ruby
Hanmac1 has joined #ruby
ryanjh has joined #ruby
mneorr has joined #ruby
plains has quit [Ping timeout: 245 seconds]
hashbang_ has joined #ruby
xybre has quit [Ping timeout: 245 seconds]
jeebster has joined #ruby
mikepack has quit [Ping timeout: 245 seconds]
regedarek has quit [Ping timeout: 245 seconds]
sethetter has left #ruby [#ruby]
<kraljev3> do you see PHP developers as inferior?
<banisterfiend> kraljev3: mostly :))
regedarek has joined #ruby
<kraljev3> :D
workmad3 has joined #ruby
reset has joined #ruby
Neomex has joined #ruby
frem has joined #ruby
<kraljev3> Is anything wrong with that I don't use Rails. I see it as a slow bloatware...
heliumsocket has quit [Quit: heliumsocket]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
atno has quit [Read error: Connection reset by peer]
koalo has joined #ruby
berto- has joined #ruby
berto- has left #ruby [#ruby]
ryanf_ has joined #ruby
ryanf_ has quit [Client Quit]
atno has joined #ruby
unflores has joined #ruby
Neomex has quit [Client Quit]
Elhu has joined #ruby
chrishough has quit [Quit: chrishough]
Heero has joined #ruby
blaxter has quit [Ping timeout: 240 seconds]
unflores has quit [Client Quit]
<atmosx> kraljev3: depends on whath you're building
Elhu has quit [Client Quit]
echevemaster has quit [Ping timeout: 245 seconds]
<tylersmith> kraljev3: that's wonderful!
<tylersmith> i mean, it has it's place, but when I read things like "so I threw together a rails app to run some number simulations" I want to vomit
plains has joined #ruby
huoxito has quit [Ping timeout: 245 seconds]
plains has quit [Changing host]
plains has joined #ruby
etcetera has quit [Ping timeout: 245 seconds]
<apeiros> *its place
etcetera has joined #ruby
veer has quit [Ping timeout: 245 seconds]
sonda has quit [Remote host closed the connection]
MehLaptop has joined #ruby
xybre has joined #ruby
xybre has quit [Changing host]
xybre has joined #ruby
_altivec has quit [Quit: Textual IRC Client: www.textualapp.com]
<d3> .
<tylersmith> just wanted to make sure you guys noticed the s
tspike has joined #ruby
Morkel_ has joined #ruby
chrishough has joined #ruby
Morkel has quit [Ping timeout: 252 seconds]
Morkel_ is now known as Morkel
allaire has joined #ruby
veer has joined #ruby
rdark has joined #ruby
swingha has quit [Quit: WeeChat 0.4.0]
monkegjinni has joined #ruby
akam-it has quit [Remote host closed the connection]
chrisnicola has quit [Quit: This computer has gone to sleep]
workmad3 has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
_theriffer_ has quit [Quit: _theriffer_]
tspike has quit [Ping timeout: 264 seconds]
hashbang_ has quit [Ping timeout: 245 seconds]
<kraljev3> I wish TrueClass and FalseClass had #to_i
FLeiXiuS` has quit [Read error: Connection reset by peer]
cmarques has quit [Ping timeout: 264 seconds]
FLeiXiuS` has joined #ruby
chrisnicola has joined #ruby
JamieJ has joined #ruby
<JamieJ> ok
<JamieJ> this program is getting on my nerves now
jdolitsky has joined #ruby
<JamieJ> and im anout to turn in what i have
BSaboia__ has joined #ruby
BSaboia__ has quit [Read error: Connection reset by peer]
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
<banisterfiend> kraljev3: it wouldn't make sense really
dsadsdasd has joined #ruby
<banisterfiend> kraljev3: cos 0 and 1 are both true
maxmanders has joined #ruby
krainbol_ has joined #ruby
jarin has joined #ruby
maxmanders has quit [Max SendQ exceeded]
cmarques has joined #ruby
momomomomo has joined #ruby
ferdev has quit [Quit: ferdev]
tomzx_mac has joined #ruby
<JamieJ> ielaptics: still around or no?
maxmanders has joined #ruby
awestroke_ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
awestroke has quit [Ping timeout: 245 seconds]
<apeiros> kraljev3: class TrueClass; def to_i; 42; end; end # easy :-)
pioz has quit [Quit: This computer has gone to sleep]
etcetera has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby
<apeiros> I wonder though, what's your use-case for that, kraljev3?
huoxito has joined #ruby
BSaboia has quit [Ping timeout: 245 seconds]
<banisterfiend> apeiros: do you watch survival programmes on tv
jarin has quit [Client Quit]
<apeiros> banisterfiend: I don't watch tv
jarin has joined #ruby
<epochwolf> I'm looking to do some parsing/tokenizing/whatever. https://gist.github.com/epochwolf/6ec502b2f45e78ebfc07
Heero has quit [Ping timeout: 240 seconds]
<kraljev3> String#to_i makes sense, despite '01'.to_s and '001'.to_s return 1
<kraljev3> if i generalize your argument
<epochwolf> I'm just looking for someone to take a look at the unit test and tell me if there's a better way to go about this?
<apeiros> epochwolf: you are aware that ^$ is start end of line, not string, right?
<epochwolf> apeiros: thanks, I know.
<epochwolf> apeiros: this isn't my code.
<epochwolf> Rather the first file isn't mine
<apeiros> kraljev3: that doesn't really tangent banisterfiend's argument
<epochwolf> apeiros: I'm just wondering if "1" => [:integer, 1] is a good output.
nkr has quit [Quit: Linkinus - http://linkinus.com]
etcetera has joined #ruby
<epochwolf> apeiros: or if I should make a bunch of supporting classes
<apeiros> epochwolf: depends on how you use it. I'd probably have a token class with .type and .value or somesuch.
<banisterfiend> my argument wasn't really much, i guess it's arguable that false.to_i #=> 0 but i dont see any use for it
sdavis_ has joined #ruby
<JamieJ> well anyone that is willing to help i would greatly appreciate it. i dont know what i am getting no values whatsoever https://gist.github.com/SkoobySparksMIA/1a2acecaaad5b232b222
workmad3 has quit [Ping timeout: 245 seconds]
<JamieJ> someone please help me this...i want to turn in this program today
jumpei has joined #ruby
BSaboia has joined #ruby
<apeiros> banisterfiend: talking with other systems. but IMO that'd be abuse of to_i. Conversion from/to specific systems should be handled by specific classes.
r0bby has joined #ruby
_nitti has quit [Remote host closed the connection]
tevio has quit [Remote host closed the connection]
drale2k has joined #ruby
_nitti has joined #ruby
_nitti has quit [Remote host closed the connection]
<apeiros> JamieJ: BigDecimal.new(0.00, 2) # creating a bigdecimal from a float somewhat defeats the purpose of bigdecimal
<MrZYX> JamieJ: you never store item
Hanmac1 has quit [Ping timeout: 252 seconds]
<JamieJ> apeiros: which line is that?
sdavis has quit [Ping timeout: 252 seconds]
sdavis_ is now known as sdavis
<JamieJ> MrZYX: store what?
<MrZYX> item
<MrZYX> you assign it but never use it
tevio has joined #ruby
r0bby_ has joined #ruby
<apeiros> JamieJ: just search for `BigDecimal.new`. most of your uses are like that.
answer_42 has joined #ruby
<kraljev3> Something bugs me. If i do:
<kraljev3> var = 10 if false
<kraljev3> p var
<kraljev3> Why is there no warning for undefined variable
<apeiros> because it is defined
<kraljev3> but it is not executed
<apeiros> the parser seeing the variable suffices.
<kraljev3> ok, thanks :)
<havenwood> var
<JamieJ> MrZYX item is used several times in the code
<apeiros> actually, the parser seeing an *assignment* to the variable suffices
robbyoconnor has quit [Ping timeout: 245 seconds]
_nitti has joined #ruby
<JamieJ> apeiros: i will look that up
froy has quit [Ping timeout: 245 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
<JamieJ> item is assigned and is used in several methods in the code
<MrZYX> JamieJ: Item is, local variable item in some methods in PrintReceipt is, but local variable item in the main context isn't
r0bby has quit [Ping timeout: 245 seconds]
faen has joined #ruby
<havenwood> JamieJ: You assign `receipt = PrintReceipt.new` but never then tell `receipt` about the purchases.
<JamieJ> yes i am
<MrZYX> no
<MrZYX> not in the gist you posted
freerobby has quit [Quit: Leaving.]
jumpei has quit [Remote host closed the connection]
freerobby has joined #ruby
mneorr has quit [Remote host closed the connection]
strax_ has quit [Ping timeout: 246 seconds]
spanx_ has quit [Ping timeout: 246 seconds]
patricksroberts_ has quit [Ping timeout: 245 seconds]
LennyLinux has joined #ruby
joshwines_ has quit [Ping timeout: 256 seconds]
karnowski has quit [Ping timeout: 246 seconds]
mtlatif has quit [Ping timeout: 240 seconds]
cam` has quit [Ping timeout: 276 seconds]
im0b has quit [Ping timeout: 264 seconds]
phasma has quit [Ping timeout: 246 seconds]
[Neurotic] has quit [Ping timeout: 246 seconds]
tspike has joined #ruby
nadirvardar has joined #ruby
dqminh has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
ToApolytoXaos has joined #ruby
jumpei has joined #ruby
Hanmac1 has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
faen has quit [Quit: faen]
Es0teric has joined #ruby
timmow has joined #ruby
cburyta has quit [Remote host closed the connection]
<callmeivan> just tried to install ruby2 on my debian box, got an error, this is the corresponding line
<callmeivan> if Gem::Specification.unresolved_deps.empty? then
<callmeivan> return gem_original_require(path)
<callmeivan> end
<callmeivan> Processing triggers for man-db ...
<callmeivan> from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
<tomsthumb> so if i think found a bug in an old version of knife would opscode still take a pull request or tickekt?
<callmeivan> but it appears to be working
faen has joined #ruby
dqminh has quit [Ping timeout: 245 seconds]
eldariof has quit []
cmyers has joined #ruby
<JamieJ> havenwood: receipt = PrintReceipt.new is assigned and a function is called at thee nd of the program
hmarr has quit [Ping timeout: 255 seconds]
mercwithamouth has joined #ruby
<JamieJ> take another look
<cmyers> has anyone gotten the http client gem patron to work with a custom SSL cert without using insecure mode (i.e. completely disabling security)?
<havenwood> JamieJ: Like I said, you don't tell `reciept` anything about the purchases. You never call `receipt.add`.
codecop has quit [Ping timeout: 240 seconds]
_nitti_ has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
phasma has joined #ruby
robbyoconnor has joined #ruby
joshwines_ has joined #ruby
ferdev has joined #ruby
spanx_ has joined #ruby
mephux has quit [Excess Flood]
r0bby_ has quit [Ping timeout: 245 seconds]
moeSeth_ has joined #ruby
patricksroberts_ has joined #ruby
angusiguess has joined #ruby
karnowski has joined #ruby
nkts has joined #ruby
taqutor has joined #ruby
im0b has joined #ruby
zodiak has joined #ruby
_nitti has quit [Ping timeout: 256 seconds]
<JamieJ> havenwood: ok i saw where my mistake was at least with that
martinklepsch has quit [Ping timeout: 248 seconds]
[Neurotic] has joined #ruby
mtlatif has joined #ruby
mephux has joined #ruby
grzywacz has quit [Ping timeout: 255 seconds]
cam` has joined #ruby
jarjar_prime has joined #ruby
jumpei has quit [Remote host closed the connection]
strax_ has joined #ruby
razibog has quit [Ping timeout: 246 seconds]
veer has quit [Ping timeout: 245 seconds]
veer has joined #ruby
jumpei has joined #ruby
jumpei has quit [Remote host closed the connection]
ferdev has quit [Quit: ferdev]
X-Jester has quit [Ping timeout: 260 seconds]
ph^ has joined #ruby
X-Jester has joined #ruby
bulters has joined #ruby
mark_locklear has quit [Ping timeout: 258 seconds]
nga4 has quit []
gaahrdner has quit [Remote host closed the connection]
codecop has joined #ruby
jeebster has quit [Quit: Leaving.]
jumpei has joined #ruby
mityaz has quit [Quit: See ya!]
gaahrdner has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
_nitti has joined #ruby
sambao21 has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
bulters has quit [Ping timeout: 252 seconds]
Nimsical has joined #ruby
workmad3 has joined #ruby
sambao21 has quit [Client Quit]
_nitti_ has quit [Ping timeout: 264 seconds]
veer has quit [Ping timeout: 245 seconds]
rburton- has joined #ruby
kraljev3 has left #ruby [#ruby]
gaahrdner has quit [Ping timeout: 255 seconds]
sailias has quit [Ping timeout: 276 seconds]
etcetera has quit []
monkegjinni has quit [Remote host closed the connection]
jumpei has quit [Remote host closed the connection]
veer has joined #ruby
tomsthumb has quit [Quit: Leaving.]
maxmanders has joined #ruby
mikeg has joined #ruby
jumpei has joined #ruby
etcetera has joined #ruby
sambao21 has joined #ruby
monkegjinni has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
sayan has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
Elhu has joined #ruby
heliumsocket has joined #ruby
wedgeV has quit [Remote host closed the connection]
<Xeago> apeiros: what do you think of operating systems being mentioned in the skills section
chrisnicola has joined #ruby
mneorr has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
codecop has quit [Ping timeout: 252 seconds]
akemrir has quit [Quit: WeeChat 0.4.0]
Czupa has quit [Remote host closed the connection]
<apeiros> probably necessary to get through HR
ph^ has joined #ruby
<apeiros> it did not matter to us since we declared that dev machines would be macs
<Xeago> hmm, that is a view from a whole different angle
<Xeago> when I see OS' at a skills section
<Xeago> for a software engineer I would see that as them having experience interfacing with the OS
<Xeago> or kernel
<Hanmac1> is it allowed to develop something on a mac or do you need to jailbreak it? :P
<Xeago> Hanmac1: ruby comes on a mac: echo "puts 'yolo'" > nah.twice; ruby nah.twice
acrussell has quit [Quit: Leaving.]
divout has quit [Remote host closed the connection]
zeade has left #ruby [#ruby]
<apeiros> Xeago: if so, then I'd specifically write it as such
zeade has joined #ruby
<apeiros> just plain "Skills: Windows, OSX, *nix" I'd just consider as "knows how to use"
<apeiros> wrt HR, I'd also put on Office, no matter whether you've actually used it.
casheew has quit [Read error: Connection reset by peer]
jumpei_ has joined #ruby
jumpei has quit [Ping timeout: 252 seconds]
brand0n_ has joined #ruby
<apeiros> (or not have an "applications" section at all)
casheew has joined #ruby
skattyadz has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
jonahR has quit [Quit: jonahR]
<Xeago> Ill rename it to Systems
jlast has quit [Read error: Operation timed out]
<Xeago> then office falls out of scope anyways
apod has joined #ruby
<brand0n_> hey guys got a question.. i am trying to multi thread pinging a whole subnet.. I believe i am having an issue with main exiting before all my threads are finished.. here is the logic http://pastebin.com/TFfzddTJ Can someone take a look at that and tell me what i am doing wrong?
chrisnicola has quit [Quit: This computer has gone to sleep]
huoxito has quit [Quit: Leaving]
<Xeago> why not use nmap?
peter2 has quit [Quit: WeeChat 0.3.7]
<Xeago> http://www.youtube.com/watch?v=Hk-21p2m8YY for a cool introduction
<brand0n_> well it does more than ping, but for the sake of argument
maxmanders has quit [Quit: Computer has gone to sleep.]
kzrl has quit [Ping timeout: 258 seconds]
havenwood has quit [Remote host closed the connection]
tootooroo has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
codecop has joined #ruby
pkrnj has joined #ruby
araujo has quit [Ping timeout: 248 seconds]
i_s has quit [Quit: i_s]
arietis has quit [Quit: Computer has gone to sleep.]
havenn_ has joined #ruby
danslo has quit [Quit: danslo]
kzrl has joined #ruby
<brand0n_> nobody knows what i am doing wrong?
Nimsical has quit [Ping timeout: 245 seconds]
swex has joined #ruby
chrisnicola has joined #ruby
rcosta has joined #ruby
krainbol_ is now known as krainboltgreene
jeebster has joined #ruby
<Xeago> surprises me that code does run
mercwithamouth has quit [Ping timeout: 245 seconds]
maligree has joined #ruby
mockra has quit [Remote host closed the connection]
bean has quit [Quit: Computer has gone to sleep.]
<brand0n_> ok so do you have a solution...
alvaro_o has quit [Quit: Ex-Chat]
Elhu has quit [Quit: Computer has gone to sleep.]
swex_ has quit [Ping timeout: 258 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
kzrl has quit [Ping timeout: 264 seconds]
callmeivan has quit [Read error: No route to host]
slainer68 has quit [Remote host closed the connection]
<Xeago> the while loop looks odd to me
<kofno> one thing: threadArr = {} <-- i think you meant for this to be an Array
callmeivan has joined #ruby
moos3 has joined #ruby
gaahrdner has joined #ruby
<brand0n_> kofno correct
Al_ has joined #ruby
<brand0n_> should I of done Array.new?
qazxsw has joined #ruby
<Xeago> [] is fine
jeebster has quit [Ping timeout: 252 seconds]
cantonic_ has joined #ruby
<brand0n_> ah, sorry i'm use to C :/
<Xeago> the way you loop is also tricky to me
<Xeago> but it looks fine
ishe has joined #ruby
<TTilus> loops not fine
ishe has quit [Client Quit]
<TTilus> when you loop over hash you get key-value-pairs
cantonic has quit [Ping timeout: 246 seconds]
cantonic_ is now known as cantonic
veer has quit [Ping timeout: 264 seconds]
rcosta has quit [Remote host closed the connection]
<Xeago> I meant the initial loop
zeroeth has quit [Ping timeout: 255 seconds]
lodestone has joined #ruby
<Xeago> for the second one do this: threads.each { |thread| thread.join }
kzrl has joined #ruby
<TTilus> threads is [1, #<Thread:0x ...>]
qazxsw has quit [Remote host closed the connection]
lodestone is now known as Guest16463
<Xeago> threads=[];256.times {|i| threads << Thread.new{pingIP("#{ip_base}.#{i}")} }; threads.each {|thread| thread.join }
<brand0n_> basically i am having issues with main terminating before the threads are finished
mvangala_ has joined #ruby
yosafbridge has quit [Read error: Operation timed out]
veer has joined #ruby
russfrank has quit [Write error: Broken pipe]
verma has quit [Write error: Broken pipe]
DarkFoxDK has quit [Read error: Operation timed out]
root has quit [Read error: Operation timed out]
<brand0n_> so threads is an array of started threads?
<Xeago> yes
etcetera has quit []
<brand0n_> ah nice
<Xeago> well, threads, you don't know their state
eddiezane has joined #ruby
<nezumi> wait until number of threads equals 1
moshee has quit [Read error: Operation timed out]
DarkFoxDK has joined #ruby
moshee has joined #ruby
<TTilus> brand0n_: you were calling Array#join which does not quite do what you expected
moos3 has quit [Quit: Computer has gone to sleep.]
<TTilus> brand0n_: (0..256).map { |i| Thread.new { pingIP(...) }.map &:join
mvangala has quit [Ping timeout: 258 seconds]
verma has joined #ruby
root has joined #ruby
root has quit [Changing host]
root has joined #ruby
wolcanus has quit [Ping timeout: 245 seconds]
russfrank has joined #ruby
<TTilus> oh, well (1..255) maybe
danslo has joined #ruby
timmow has joined #ruby
<brand0n_> ok thanks a lot guys
Tricon has joined #ruby
yosafbridge has joined #ruby
codecop has quit [Ping timeout: 255 seconds]
Guest16463 has quit [Quit: Textual IRC Client: www.textualapp.com]
angusiguess has quit [Ping timeout: 255 seconds]
spider-mario has quit [Remote host closed the connection]
<Xeago> 0.255
<Xeago> 0 is routable
MehLaptop has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
timmow has quit [Ping timeout: 252 seconds]
alexwh has quit [Quit: Quitting]
Cicloid has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 240 seconds]
dmiller has joined #ruby
freerobby has quit [Quit: Leaving.]
<apeiros> Xeago: threads = Array.new(256) { Thread.new { … } }
<apeiros> can use the same |i| argument too
brhelwig has joined #ruby
tootooroo has joined #ruby
eddiezane has quit [Quit: leaving]
maxmanders has joined #ruby
Skofo has joined #ruby
Kemist has joined #ruby
grzywacz has joined #ruby
<JamieJ> YES!!!
<JamieJ> my code works now
<Kemist> I'm looking for some idiomatic examples of patterns implemented in Ruby. Something similar to https://github.com/faif/python-patterns
<JamieJ> any advice though on how to get two digits after the decimal when handling currency in ruby?
<banisterfiend> kemist: buy "design patterns in ruby"
<Kemist> Wow that's exactly what I wanted :)
<havenn_> JamieJ: What changes did you make?
jeebster has joined #ruby
havenn_ is now known as havenwood
cburyta has joined #ruby
<JamieJ> i made the one you suggested with at item class
tomsthumb has joined #ruby
<epochwolf> What tools does ruby have to do something like this? https://gist.github.com/epochwolf/6e3d20f54aaa7e48114a
<epochwolf> To do what Ping::Lexer.tokens_for would need to do.
<Hanmac1> kemist: uí would google the stuff before buying a book
dmerrick_ has joined #ruby
rdev5 is now known as rdev5|work
<epochwolf> oh, nevermind, string scanner
dmerrick has joined #ruby
<havenwood> JamieJ: I'd use a gem, like money: https://github.com/RubyMoney/money
<Kemist> The book looks great but I'm looking for more of a curated collection of examples
jdolitsky has quit [Quit: Leaving]
codecop has joined #ruby
answer_42 has quit [Ping timeout: 246 seconds]
<Kemist> Never mind, Google is your friend of course… https://github.com/nslocum/design-patterns-in-ruby
carraroj has quit [Quit: Konversation terminated!]
c0rn has joined #ruby
cburyta has quit [Ping timeout: 256 seconds]
<Hanmac1> normaly i do not care about design patterns because i can write code better than the patterns :P
<banisterfiend> Hanmac1: you're a PHP programmer, your ruby code looks like php
<banisterfiend> :D
<havenwood> JamieJ: Money.assume_from_symbol = true; Money.parse "$4.20"
carloslopes has quit [Remote host closed the connection]
tvw has quit []
tenmilestereo has joined #ruby
<Hanmac1> banisterfiend: that is 1) mean and 2) wrong
razibog has joined #ruby
aytch has joined #ruby
Es0teric has quit [Read error: Connection reset by peer]
<JamieJ> thanks havenwood:
i_s has joined #ruby
Elhu has joined #ruby
<banisterfiend> Hanmac1: 3) satisfying to troll u :)
<xll11> Hanmac
<xll11> Your opinions on Head First Rails?
mockra has joined #ruby
Tectonic has joined #ruby
<Hanmac1> xll11: i said nothing about rails, or what do you mean? ... i would recomend to learn ruby before rails if you mean this
slainer68 has joined #ruby
Es0teric has joined #ruby
zeroeth has joined #ruby
ryanjh has quit [Quit: Computer has gone to sleep.]
<xll11> erm, its a book ^^
brand0n_ has quit [Quit: Lost terminal]
<Hanmac1> i never buyed or read a ruby book ...
<xll11> I've been learning ruby from CodeAcademy for a while, its pretty good
<Kemist> Never?
_nitti has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 245 seconds]
<Kemist> I love learning from a good book, the right author make wall the difference in the world.
moos3 has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
<epochwolf> How would I match "string with a \" quote in it" for StringScanner?
_nitti_ has joined #ruby
Tricon has quit [Read error: Connection reset by peer]
* Hanmac1 learned ruby from reading docs and studing the RMXP, RMVX and RMVXAce code
chrisnicola has joined #ruby
geekbri has quit [Remote host closed the connection]
ToApolytoXaos has quit [Quit: Leaving]
<apeiros> epochwolf: /"(?:\\.|[^\\])*"/
<Kemist> You can definitely use those tools too
<epochwolf> apeiros: thanks
happydude has quit [Quit: Leaving]
<epochwolf> apeiros: that's really cool... I didn't think about doing it that way
mrbear has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
x0F has quit [Ping timeout: 252 seconds]
neku has joined #ruby
Tricon has joined #ruby
slainer68 has quit [Ping timeout: 264 seconds]
geggam_wk has quit [Remote host closed the connection]
Elhu has joined #ruby
<Xeago> could I have a final set of eyes on https://www.filepicker.io/api/file/nMK32BCSaeG754gk60Eq ?
freerobby has joined #ruby
jon_w has quit [Quit: Robert Garcia uses The 7 Deadly Sins. Shouldn't you?   [www.t7ds.com.br]]
apod has quit []
ferdev has joined #ruby
codecop has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Remote host closed the connection]
angusiguess has joined #ruby
Ontolog_ has joined #ruby
robscomp_ has joined #ruby
robscomputer_ has quit [Read error: Connection reset by peer]
v0n has quit [Ping timeout: 252 seconds]
timonv has quit [Remote host closed the connection]
failshell has quit [Ping timeout: 258 seconds]
ravster1 has quit [Quit: Leaving.]
bigoldrock has quit [Ping timeout: 240 seconds]
ofcan has joined #ruby
gaahrdner has quit [Remote host closed the connection]
Bry8Star has quit [Ping timeout: 276 seconds]
Ontolog has quit [Ping timeout: 240 seconds]
robscomputer_ has joined #ruby
robscomp_ has quit [Read error: Connection reset by peer]
<ofcan> What does this line do > return unless File.exists?(base) ? it is within this context > https://gist.github.com/ofcan/5305276
evenix has quit [Remote host closed the connection]
dustint has quit [Quit: Leaving]
bigoldrock has joined #ruby
evenix has joined #ruby
g0bl1n has quit [Ping timeout: 252 seconds]
chrishough has quit [Quit: chrishough]
failshell has joined #ruby
amesha has joined #ruby
andredieb has joined #ruby
snearch has joined #ruby
<andredieb> I'm getting "undefined method `named_captures'" when trying to regexp.match(my_string).named_captures, just like the doc says. Any idea?
Bry8Star has joined #ruby
<andredieb> but the .names and .captures methods do work
huoxito has joined #ruby
<injekt> andredieb: what ruby version?
<havenwood> Xeago: Usually there is a space in "OS X". Scrum shouldn't be ALLCAPS (not an acronym).
<andredieb> ruby 1.9.3p327
<injekt> andredieb: what's the exact exception?
chrisnicola has quit [Quit: This computer has gone to sleep]
<injekt> >> /(?<foo>.)(?<bar>.)/.named_captures
<eval-in> injekt => {"foo"=>[1], "bar"=>[2]} (http://eval.in/14654)
<andredieb> NoMethodError: undefined method `named_captures' for #<MatchData:0x007fd6cd109cc0>
evenix has quit [Ping timeout: 264 seconds]
chimkan_ has joined #ruby
mpfundstein has joined #ruby
momomomomo has quit [Quit: momomomomo]
<andredieb> >> /(?<foo>.)<?<bar>.)/.match('ab').named_captures
<eval-in> andredieb => /tmp/execpad-25dc63b30a1c/source-25dc63b30a1c:2: unmatched close parenthesis: /(?<foo>.)<?<bar>.)/ (http://eval.in/14655)
<andredieb> >> /(?<foo>.)(<?<bar>.)/.match('ab').named_captures
<eval-in> andredieb => /tmp/execpad-06d0bad3c083/source-06d0bad3c083:2:in `<main>': undefined method `named_captures' for nil:NilClass (NoMethodError) (http://eval.in/14656)
<andredieb> ops
<andredieb> >> /(?<foo>.)(?<bar>.)/.match('ab').named_captures
<eval-in> andredieb => /tmp/execpad-7091d7bf1217/source-7091d7bf1217:2:in `<main>': undefined method `named_captures' for #<MatchData "ab" foo:"a" bar:"b"> (NoMethodError) (http://eval.in/14657)
<andredieb> injekt: ^^
failshel_ has joined #ruby
failshell has quit [Ping timeout: 264 seconds]
<injekt> andredieb: named_captures isn't a method on MatchData
<injekt> it's a method on Regexp
Elhu has quit [Quit: Computer has gone to sleep.]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<injekt> (see my code)
pygmael has joined #ruby
fission6 has joined #ruby
jumpei_ has quit [Remote host closed the connection]
<fission6> how is best to upgrade ruby for my maces 1.8 to latest
<andredieb> I see. I don't see how named_captures on Regexp is useful :(
TheFuzzball has joined #ruby
<injekt> andredieb: I dont see how it's useful on MatchData
<andredieb> injekt: I want a hash with the named captures
<andredieb> {foo: 'a', bar: 'b'}
alexyz has quit [Read error: Connection reset by peer]
smigg has quit [Remote host closed the connection]
fixl has joined #ruby
seme has joined #ruby
moshef has joined #ruby
<injekt> andredieb: ah, just zip them together
<MrZYX> ofcan: it aborts the method and returns nil unless the file in base exists
banister_ has joined #ruby
jgrevich has joined #ruby
haxrbyte has joined #ruby
jlast has joined #ruby
<injekt> >> m = /(?<foo>.)(?<bar>.)/.match('ab'); Hash[m.names.zip(m.captures)]
<eval-in> injekt => {"foo"=>"a", "bar"=>"b"} (http://eval.in/14658)
polfilm has joined #ruby
chrishough has joined #ruby
froy has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
polfilm has quit [Read error: Connection reset by peer]
maligree has quit [Ping timeout: 252 seconds]
chrisnicola has joined #ruby
pioz has joined #ruby
sidusnare has joined #ruby
<ofcan> MrZYX: thank you! is this the standard way to abort methods unless something?
<MrZYX> I'd say so, yeah
reset has quit [Quit: Leaving...]
<moshef> I'm setting in my module the following variable
<moshef> $settings ||= YAML.load(File.open("config/settings.yml"))[$env]
<moshef> its going to be called just once, right?
<ofcan> MrZYX: thx. also 1 more Q > if I wish to add a method that is applicable to all Enumerable objects, I just add it within 'module Enumerable'?
<sidusnare> Im using Net::SSH, and setting :key_data but not :keys and I cant make it not try to open a keyfile
ilyam has joined #ruby
haxrbyte_ has quit [Ping timeout: 264 seconds]
<sidusnare> I keep getting `load_data_private_key': undefined method `match' for #<OpenSSL::PKey::RSA:0x00000001488d88> (NoMethodError), any ideas?
jlast has quit [Ping timeout: 252 seconds]
nathancahill has quit [Quit: nathancahill]
<MrZYX> ofcan: you could do that yeah, but most of the time you want to solve that differently
doritostains has joined #ruby
araujo has joined #ruby
dmiller has quit [Ping timeout: 255 seconds]
<Xeago> thanks havenwood, any other remarks?
<havenwood> Xeago: nope, looks good
<MrZYX> ofcan: well, you're quickly tempted doing that to solve one particular problem you only have once in your project, adding generic methods is okay IMO
banisterfiend has joined #ruby
jarred has left #ruby [#ruby]
<Xeago> thanks!
tjg has joined #ruby
banister_ has quit [Read error: Connection reset by peer]
<MrZYX> ofcan: just keep in mind that if you're writing a lib used by others they might get confused by it or even overwrite it
tjg has left #ruby [#ruby]
<ofcan> MrZYX: so rule of thumb > if I have a method that is applicable on multiple Enumerable objects, add it within that module; if not write it within that object?
JamieJ has quit [Quit: Page closed]
mercwithamouth has joined #ruby
<MrZYX> roughly, yeah
mhf has joined #ruby
moshef has quit [Quit: moshef]
mockra has joined #ruby
timmow has joined #ruby
<ofcan> MrZYX: thx man :)
kpshek has quit []
rdark has quit [Quit: leaving]
elux has quit [Quit: Leaving...]
<ofcan> MrZYX: ahhh, ok, I promise this is the last one :) > what is the difference if I add the method applicable to all Enumerable objects in module enumerable vs class enumerable? Reason for my confusion is this file here > https://github.com/mojombo/jekyll/blob/master/lib/jekyll/core_ext.rb
alexyz has joined #ruby
huoxito has quit [Ping timeout: 245 seconds]
Hanmac1 has quit [Ping timeout: 252 seconds]
<MrZYX> Enumerable is a module, not a class
<MrZYX> you can't define a module and a class with the same name
<MrZYX> since Enumerable really is a constant holding a module object, Hash is a constant holding a class object
timmow has quit [Ping timeout: 252 seconds]
_nitti_ has quit [Ping timeout: 264 seconds]
koalo has quit [Remote host closed the connection]
reset has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<sidusnare> heh, guess I was using an object and not a string, yay type casting
withnale has quit [Quit: ZNC - http://znc.in]
phantasm66 has quit [Quit: *sleeeep….]
_whitelogger has joined #ruby
amesha has quit [Read error: Connection timed out]
amesha has joined #ruby
amesha has quit [Read error: Connection reset by peer]
Boohbah has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 245 seconds]
s0ber has quit [Read error: Connection reset by peer]
malte_ has quit [Quit: malte_]
dEPY has quit []
mneorr has quit [Remote host closed the connection]
rudisimo has quit [Quit: Leaving.]
pygmael has quit [Quit: pygmael]
s0ber has joined #ruby
tenmilestereo has quit [Quit: Leaving]
spooner_ has joined #ruby
gyre007 has quit [Remote host closed the connection]
bulters has joined #ruby
jumpei has joined #ruby
jumpei has quit [Remote host closed the connection]
Ontolog has joined #ruby
jumpei has joined #ruby
Panfy has joined #ruby
callmeivan has quit [Ping timeout: 252 seconds]
<Panfy> hy
<Panfy> !list
Panfy has left #ruby [#ruby]
GhettoCode has quit [Ping timeout: 252 seconds]
Hanmac1 has joined #ruby
bulters has quit [Ping timeout: 240 seconds]
SuperrMann has joined #ruby
jumpei has quit [Remote host closed the connection]
Ontolog_ has quit [Ping timeout: 255 seconds]
postmodern has joined #ruby
elaptics`away is now known as elaptics
eliasp_ has joined #ruby
eliasp has quit [Ping timeout: 245 seconds]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
havenwood has quit [Remote host closed the connection]
invisime has quit [Quit: Leaving.]
slainer68 has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
nkts has quit [Ping timeout: 240 seconds]
gaahrdner has joined #ruby
tspike has quit [Quit: leaving]
mneorr has joined #ruby
robscomputer_ has quit [Read error: Connection reset by peer]
robscomputer_ has joined #ruby
Edder has quit [Quit: Leaving.]
haxrbyte has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 240 seconds]
brianpWins has quit [Quit: brianpWins]
justsee has quit [Read error: Connection reset by peer]
kirun has quit [Quit: Client exiting]
failshel_ has quit [Remote host closed the connection]
Davey has joined #ruby
arya has quit [Ping timeout: 264 seconds]
headius has joined #ruby
jellosea_ has joined #ruby
<jellosea_> hey whats the nicest way to rename a key in a hash in ruby?
chimkan_ has quit [Quit: chimkan_]
mneorr has quit [Remote host closed the connection]
<ofcan> Can someone please explain what this line is doing
chrisnicola has joined #ruby
brianpWins has joined #ruby
<ofcan> Can someone please explain what this line is doing > ['.', '_', '#'].include?(e[0..0] < I have found it here on line 361 > https://github.com/mojombo/jekyll/blob/master/lib/jekyll/site.rb
jerius has quit [Ping timeout: 252 seconds]
<ofcan> What does this [0..0] mean?
chrisnicola has quit [Read error: Connection reset by peer]
emergion has joined #ruby
wedgeV has joined #ruby
arya has joined #ruby
<ofcan> ah! it specifies the 0th indexed letter?
<ofcan> Why the range though?
dmerrick_ has quit [Quit: dmerrick_]
tootubular has quit [Quit: tootubular]
chrisnicola has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
<MrZYX> in 1.8 String#[] with a single number gave back the ascii value, not the character
alanp_ has joined #ruby
alanp has quit [Read error: Connection reset by peer]
<MrZYX> so just a hack for backwards compatibility
breakingthings has quit []
sambao21 has quit [Quit: Computer has gone to sleep.]
zeroeth has quit [Ping timeout: 256 seconds]
alanp_ is now known as alanp
Assurbanipal has quit [Read error: Connection reset by peer]
Vert has quit [Read error: Connection reset by peer]
malte_ has joined #ruby
<ofcan> MrZYX: once again, thx! :D
wmoxam has quit [Ping timeout: 252 seconds]
interactionjaxsn has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
hukl has quit [Quit: Leaving...]
wsterling has joined #ruby
interactionjaxsn has joined #ruby
brianpWins has quit [Quit: brianpWins]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
Kzim has quit [Quit: Leaving]
arya has quit [Ping timeout: 255 seconds]
eliasp_ has quit [Read error: Connection reset by peer]
moshef has joined #ruby
eliasp has joined #ruby
evenix has joined #ruby
interactionjaxsn has quit [Ping timeout: 264 seconds]
kevinfagan_ has quit [Ping timeout: 258 seconds]
emergion has quit [Ping timeout: 264 seconds]
ph^ has quit [Remote host closed the connection]
krainboltgreene has quit []
arya has joined #ruby
ariedler has quit [Remote host closed the connection]
EPIK has joined #ruby
kevinfagan has joined #ruby
Johbe has quit [Read error: Connection reset by peer]
jromine__ has joined #ruby
Vert has joined #ruby
Johbe has joined #ruby
blacktulip has quit [Remote host closed the connection]
momomomomo has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
pkrnj has quit [Quit: Computer has gone to sleep.]
Al_ has quit [Quit: Al_]
zeroeth has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
sailias has joined #ruby
sambao21 has joined #ruby
RORgasm has quit [Remote host closed the connection]
pkrnj has joined #ruby
chessguy has joined #ruby
snearch has quit [Read error: Connection reset by peer]
<ofcan> What is the .safe method for? I found it here on line 364 > https://github.com/mojombo/jekyll/blob/master/lib/jekyll/site.rb
reset has quit [Quit: Leaving...]
justsee has quit [Ping timeout: 245 seconds]
eliasp_ has joined #ruby
eliasp has quit [Ping timeout: 246 seconds]
Tricon has quit [Quit: Leaving...]
momomomomo has quit [Ping timeout: 252 seconds]
dmerrick has quit [Remote host closed the connection]
<ofcan> MrZYX: Dude. If you come to Croatia anytime soon, you have a free beer :)
gaahrdner has quit [Remote host closed the connection]
momomomomo has joined #ruby
<MrZYX> well, not that complicated to find, self is the instance of the class, so I did a ctrl+f
senayar has quit [Quit: Quitte]
jeebster1 has joined #ruby
monkegjinni has quit [Remote host closed the connection]
xardas has quit [Ping timeout: 240 seconds]
<banisterfiend> MrZYX: what's your native language? (just curious:))
callmeivan has joined #ruby
<MrZYX> german
jeebster has quit [Ping timeout: 240 seconds]
Al_ has joined #ruby
netto has joined #ruby
<netto> hey guys
timmow has joined #ruby
<netto> I'm set up an app in my webserver running freebsd, can someone help me fixing a error during the thin start?
alexwh has joined #ruby
doritostains has quit [Quit: Leaving...]
<epochwolf> apeiros: Thanks a lot for your help. I've got my code somewhat working now. :) First time building a lexer/parser. It's a lot easier than I imagined.
anderse has quit [Quit: anderse]
gabrielrotbart has joined #ruby
freerobby has quit [Quit: Leaving.]
ehaliewicz has quit [Remote host closed the connection]
<netto> can someone help me?
razibog has quit [Ping timeout: 264 seconds]
Tricon has joined #ruby
<epochwolf> netto: what's the error?
<netto> I think it's rmagick (which I saw a lot of discussion about it)..
<netto> wait
timmow has quit [Ping timeout: 252 seconds]
fission6 has quit [Quit: fission6]
<netto> [cimm1@staging-bsd ~/cimm-rails-2/script]$ thin --prefix /portal start
d2dchat has quit [Remote host closed the connection]
<netto> No adapter found for /usr/home/cimm1/cimm-rails-2/script
<netto> [cimm1@staging-bsd ~/cimm-rails-2/script]$ cd ..
<netto> [cimm1@staging-bsd ~/cimm-rails-2]$ thin --prefix /portal start
<netto> >> Using rails adapter
<eval-in> netto => /tmp/execpad-badae327f87d/source-badae327f87d:2:in `<main>': undefined local variable or method `adapter' for main:Object (NameError) (http://eval.in/14660)
<netto> config.gem: Unpacked gem letter_opener in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
<netto> config.gem: Unpacked gem letter_opener in vendor/gems not in a versioned directory. Giving up.
gaahrdner has joined #ruby
Al_ has quit [Quit: Al_]
<netto> ?
akashj87__ has joined #ruby
<netto> i can't past the whole log here
osvico has quit [Ping timeout: 276 seconds]
<epochwolf> netto: use gist
Matt has joined #ruby
<netto> I' only starting the app
Matt is now known as Guest33369
<netto> locally I run "thin --prefix /portal start'
ilyam has quit [Quit: ilyam]
<netto> but on my webserver, I'm getting this:
<netto> >> Using rails adapter
<eval-in> netto => /tmp/execpad-1695842b56cd/source-1695842b56cd:2:in `<main>': undefined local variable or method `adapter' for main:Object (NameError) (http://eval.in/14661)
<netto> config.gem: Unpacked gem letter_opener in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
<netto> config.gem: Unpacked gem letter_opener in vendor/gems not in a versioned directory. Giving up.
Denommus has joined #ruby
Denommus has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
fission6 has joined #ruby
emmanuelux has joined #ruby
akashj87 has quit [Ping timeout: 245 seconds]
rdev5|work is now known as rdev5|semiafk
xjunior has joined #ruby
osvico has joined #ruby
Proshot has quit [Quit: Leaving]
Zai00 has quit [Quit: Zai00]
<xjunior> is there a way to start IRB and make it run a command?
jcheng has quit [Quit: Computer has gone to sleep.]
Neomex has joined #ruby
<xjunior> I want to establish a database connection to the database
kofno has quit [Remote host closed the connection]
<netto> I'm using ruby 1.8.7
<netto> 'irb' in terminal works with ruby 1.8.7
<netto> ?
keyword has joined #ruby
SCommette has quit [Quit: SCommette]
<xjunior> netto: yes
solidoodlesuppor has quit [Remote host closed the connection]
piotr_ has quit [Ping timeout: 264 seconds]
<netto> i'll try
tyfighter has joined #ruby
gaahrdner has quit [Remote host closed the connection]
Neomex has quit [Client Quit]
<keyword> hi there I have a question I'm trying to do a proxy checker in ruby, it is working fine but the timeout is not working I want that if the proxy no response in 10 seconds return false but it sometime take longer like 20 seg this is the code http://pastie.org/private/2bzv0nmp1h6vyjna6dcabq
<keyword> anyone knows why or knows some other library for test proxies ?
Davey has quit [Quit: Computer has gone to sleep.]
frem has quit [Ping timeout: 246 seconds]
tootubular has joined #ruby
marcdel has quit [Ping timeout: 245 seconds]
blaxter has joined #ruby
<keyword> anyone can helpme
sailias has quit [Quit: Leaving.]
hukl has joined #ruby
hukl has quit [Client Quit]
breakingthings has joined #ruby
chrisja has quit [Quit: leaving]
doritostains has joined #ruby
tyfighter has quit [Quit: tyfighter]
rdev5|semiafk is now known as rdev5|away
moshef has quit [Quit: moshef]
newUser1234 has quit [Remote host closed the connection]
tevio has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
atno is now known as atno|AFK
apeiros has quit [Remote host closed the connection]
arya has quit [Ping timeout: 246 seconds]
tootubular has quit [Quit: tootubular]
rdev5|away has quit [Quit: Linkinus - http://linkinus.com]
Davey has joined #ruby
fission6 has quit [Quit: fission6]
<shevy> Xeago perhaps make a newline before a new paragraph? otherwise looks fine
moshef has joined #ruby
<Xeago> shevy: where
arya has joined #ruby
<Xeago> at hobbies / 2ndary act.?
<shevy> Xeago yeah at hobbies
<moshef> hi. another question. I have my gem in github and I'm using bundler to install it. I'm now trying to require it but I'm getting cannot load such file.
<moshef> like its trying to find the file within my root folder..
spooner_ has quit [Quit: Page closed]
jekotia has joined #ruby
<Xeago> shevy: lines or no lines?
<Xeago> or different amount of lines
freerobby has joined #ruby
<moshef> sorry, asked earlier on ror room..
internet_user has quit [Remote host closed the connection]
pioz has quit [Quit: This computer has gone to sleep]
<keyword> hi there I have a question I'm trying to do a proxy checker in ruby, it is working fine but the timeout is not working I want that if the proxy no response in 10 seconds return false but it sometime take longer like 20 seg  this is the code http://pastie.org/private/2bzv0nmp1h6vyjna6dcabq
<keyword> 19:40
<keyword> anyone knows why or knows some other library for test proxies ?
TorpedoSkyline has joined #ruby
<netto> can someone help me with this error: https://gist.github.com/osnysantos/5306239
cnrk has quit [Quit: cnrk]
IceDragon has joined #ruby
jeebster1 has quit [Quit: Leaving.]
matled has quit [Remote host closed the connection]
<shevy> Xeago dunno, seems ok. I myself, if I would read applications, would rather read as little as possible, but that what I have to read, as efficient and information-rich as possible
matled has joined #ruby
Xeago_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy> Xeago if it is through an oral interview, I would actually prefer to ask about hobbies myself face to face, than read about them. is more fun to talk
<Xeago_> true that
<Xeago_> it is commonly included in resumes here locally tho
jeebster has joined #ruby
<netto> tylersmith: but I dont know other possibility… this app is ready, I'm cloning with Git
<Xeago_> also it gives more character, and what I do besides 'owrk'
<Xeago_> netto: do you need to run bundler?
<netto> yes
<Xeago_> do you need to run it with bundler?
[Neurotic] has quit [Ping timeout: 240 seconds]
<netto> bundle install
twoism has quit [Ping timeout: 240 seconds]
cobragoa_ has joined #ruby
headius has quit [Quit: headius]
idkazuma has quit [Remote host closed the connection]
patricksroberts_ has quit [Ping timeout: 240 seconds]
Xeago is now known as Guest17787
Guest17787 has quit [Killed (hitchcock.freenode.net (Nickname regained by services))]
Xeago_ is now known as Xeago
blaxter has quit [Ping timeout: 260 seconds]
strax_ has quit [Ping timeout: 240 seconds]
nomadic has quit [Ping timeout: 240 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
rawler has joined #ruby
Layke has quit [Ping timeout: 255 seconds]
fasta has quit [Read error: Connection reset by peer]
fasta has joined #ruby
phasma has quit [Ping timeout: 240 seconds]
cobragoat has quit [Ping timeout: 240 seconds]
anonymuse has quit [Quit: Leaving...]
rawler_ has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
<netto> tylersmith: In my Gemfile, I have this: gem "letter_opener", :path => "vendor/gems/letter_opener"
[Neurotic] has joined #ruby
<netto> tylersmith: Can I remove path?
pac1 has joined #ruby
<Xeago> shevy: lines/no-lines I dc'd
nomadic has joined #ruby
<tylersmith> netto: yeah try that, but you'll want to ensure to use the correct version so first figure out what that is (look in vendor/gems/letter_opener), then you'll want to specify that version in your Gemfile
reset has joined #ruby
alanp has quit [Read error: Connection reset by peer]
nezumi has quit [Ping timeout: 245 seconds]
alanp has joined #ruby
jgarvey has quit [Quit: Leaving]
redrufus has joined #ruby
<netto> tylersmith: I already removed, but I'm still getting this message: config.gem: Unpacked gem letter_opener in vendor/gems is not in a versioned directory(should be letter_opener-1.1.0).
<netto> I have to remove this directory from webserver too?
chimkan_ has joined #ruby
DonRichie has quit [Quit: Verlassend]
DonRichie has joined #ruby
cburyta has joined #ruby
drale2k has quit [Quit: Leaving...]
freerobby has quit [Ping timeout: 256 seconds]
<tylersmith> netto: may as well try it (never much used vendored gems before they fell out of fashion)
cmarques has quit [Ping timeout: 264 seconds]
timmow has joined #ruby
sepp2k has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
drale2k has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
daniel_- has quit [Ping timeout: 248 seconds]
mmitchell has quit [Remote host closed the connection]
danneu has joined #ruby
<netto> tylersmith: no!
chrisnicola has quit [Quit: This computer has gone to sleep]
allaire has quit []
<netto> tylersmith: can we talk in private?
<tylersmith> netto: sure
justsee has joined #ruby
justsee has joined #ruby
redrufus has quit [Quit: Leaving]
predator217 has joined #ruby
fission6 has joined #ruby
stopbit has quit [Quit: leaving]
stopbit has joined #ruby
atmosx has quit [Quit: And so the story goes…]
guest321 has joined #ruby
<guest321> hello
<guest321> clear
robscomp_ has joined #ruby
<guest321> I'm new to Ruby - I've gone through the tutorial at http://www.techotopia.com/index.php/Ruby_Essentials
<guest321> I'm trying to find a project that's good for someone new to the language.
predator117 has quit [Ping timeout: 264 seconds]
<guest321> Does anyone have a suggestion - I've tried cruising around github, but most of them seem over my head.
ryanh has joined #ruby
ph^ has joined #ruby
robscomputer_ has quit [Ping timeout: 245 seconds]
LennyLinux has quit [Remote host closed the connection]
BSaboia has quit [Read error: Connection reset by peer]
pskosinski has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
Guedes0 has joined #ruby
brain_shim_ has joined #ruby
nightfalcon has joined #ruby
freerobby has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
guest321 has left #ruby [#ruby]
bitZero__ has quit [Read error: Connection reset by peer]
lancepantz is now known as lancepantz_
<Xeago> Guest16877: there are some test apps to make
<Xeago> like a todo list
<Xeago> introduces you to a basic webstack including data storage
wsterling has quit [Remote host closed the connection]
newUser1234 has joined #ruby
Ohga has joined #ruby
<banisterfiend> Guedes: write a game: http://libgosu.org
fission6 has quit [Quit: fission6]
newUser1234 has quit [Remote host closed the connection]
mikepack_ has quit [Remote host closed the connection]
autumn has quit [Ping timeout: 260 seconds]
waxjar has quit [Ping timeout: 258 seconds]
huttan has quit [Ping timeout: 245 seconds]
sivoais has quit [Ping timeout: 246 seconds]
twoism has joined #ruby
fission6 has joined #ruby
bitZero__ has joined #ruby
darkc0met has joined #ruby
mrsolo has quit [Quit: Leaving]
<Ohga> hello. Could I assistance with this problem: https://gist.github.com/rogernorling/5297336 . This is minitest spec and the lambdas at line 11-12 should use an @events that is initialized to an empty array, yet it doesn't.. what am I missing?
<Ohga> *I have assistance
sivoais has joined #ruby
<epochwolf> oh, this is evil... I'm making , an operator that starts an array if it hasn't been started and then as you hit commas, it concats the previous value to the array.
<epochwolf> forgive me
huttan has joined #ruby
<epochwolf> Ohga: no ideas from the peanut gallery
majikbytes has joined #ruby
waxjar has joined #ruby
autumn has joined #ruby
pcarrier_ has quit [Quit: Computer has gone to sleep.]
ffranz has quit [Quit: Leaving]
kofno has joined #ruby
TorpedoSkyline has quit [Quit: Don't follow me if you don't want hilarity and QUITing to ensue. Also, freelancing and iOS. @TorpedoSkyline]
seme has quit [Ping timeout: 245 seconds]
statarb3 has joined #ruby
awestroke_ has quit [Remote host closed the connection]
statarb3 is now known as Proshot
bulters has joined #ruby
d2dchat has joined #ruby
fission6 has quit [Quit: fission6]
timmow has quit [Remote host closed the connection]
moshef has quit [Quit: moshef]
ofcan has quit [Quit: leaving]
allaire has joined #ruby
reactormonk has joined #ruby
<linduxed> using 2.0.0 in irb, when i do "require ./ex25" i get the following:
<linduxed> ArgumentError: wrong number of arguments (0 for 1)
davetherat has quit [Remote host closed the connection]
hmarr has joined #ruby
davetherat has joined #ruby
<gf3> require './ex25'
kofno has quit [Remote host closed the connection]
<gf3> OR
<gf3> require_relative 'ex25'
bulters has quit [Ping timeout: 240 seconds]
tylersmith has quit [Quit: tylersmith]
nomadicoder has joined #ruby
pcarrier_ has joined #ruby
elaptics is now known as elaptics`away
jtharris has quit [Quit: WeeChat 0.4.0]
bigoldrock has quit [Read error: Connection reset by peer]
<linduxed> gf3: will try that!
havenwood has joined #ruby
<linduxed> thx, it worked
jamie_ca_ has quit [Quit: Computer has gone to sleep.]
<gf3> NP
bigoldrock has joined #ruby
gaahrdner has joined #ruby
freerobby has quit [Quit: Leaving.]
UberCanuck has joined #ruby
freerobby has joined #ruby
Domon has joined #ruby
<netto> can someone help me with this issue? https://gist.github.com/osnysantos/5306547
_nitti has joined #ruby
gaahrdner has quit [Ping timeout: 245 seconds]
freerobby has quit [Client Quit]
nari has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
drale2k has quit [Quit: Leaving...]
Domon has quit [Ping timeout: 245 seconds]
rburton- has quit [Quit: Leaving...]
mrbear has quit [Ping timeout: 245 seconds]
wyhaines has quit [Remote host closed the connection]