apeiros_ changed the topic of #ruby to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
Xiti has quit [Quit: Leaving]
stantona has quit [Ping timeout: 264 seconds]
stantona_ has quit [Ping timeout: 252 seconds]
m1lt0n has joined #ruby
m1lt0n has quit [Client Quit]
xiq has joined #ruby
m1lt0n has joined #ruby
m1lt0n has quit [Client Quit]
<mostlybadfly> hey guys, was working on this and am new to sql, I was wondering if this looks ok https://gist.github.com/mostlybadfly/067db23cbdff193fcdf6
frobrob has joined #ruby
m1lt0n has joined #ruby
<mostlybadfly> it works, but i'm not sure if i'm supposed to include @db in the initialize method or why that would work
rm__ has quit [Remote host closed the connection]
m1lt0n has quit [Client Quit]
klaut has quit [Remote host closed the connection]
rm__ has joined #ruby
<ari-_-e> mostlybadfly: congratulations, you have correctly performed a parameterized query
<ari-_-e> that puts you ahead of most beginners
m1lt0n has joined #ruby
m1lt0n has quit [Client Quit]
ddv has quit [Ping timeout: 245 seconds]
<ari-_-e> I'm not sure what you mean about @db - you'd need that there in order to access it in the other methods
<benzrf> @db
jack_rabbit has joined #ruby
<mostlybadfly> ari-_-e thank you
rm__ has quit [Ping timeout: 240 seconds]
maroloccio has quit [Quit: WeeChat 0.4.3]
<mostlybadfly> I couldn't find any actual examples so I was unsure if that is best practice, i mean it works and it stores just fine so probably ok
GriffinHeart has joined #ruby
m1lt0n has joined #ruby
m1lt0n has quit [Client Quit]
ddv has joined #ruby
<ari-_-e> parameterized queries protect you from SQL injection attacks, so they're definitely a good idea
marr has quit [Ping timeout: 240 seconds]
GriffinHeart has quit [Ping timeout: 260 seconds]
atmosx has quit [Quit: Lost in trance]
yubrew has joined #ruby
atraylen has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
Rahul_Roy has quit [Quit: Connection closed for inactivity]
aneong has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
bonhoeffer has joined #ruby
moritzs has joined #ruby
KanKava has quit [Quit: leaving]
<kireevco> ari-_-e: can't find a way how can I find_all on soup twice. Any advice please?
frobrob has quit [Ping timeout: 245 seconds]
<ari-_-e> kireevco: wrong channel :)
<kireevco> oh, man...right
<shevy> anyone of you understands how projects get added to ruby toolbox?
amundj has joined #ruby
b1205 has joined #ruby
caveat- has quit [Ping timeout: 264 seconds]
caveat- has joined #ruby
xiq has quit [Ping timeout: 245 seconds]
Xeago has quit [Ping timeout: 252 seconds]
Shidash has quit [Ping timeout: 252 seconds]
Shidash has joined #ruby
maximski has joined #ruby
mijicd has quit [Remote host closed the connection]
combusean has quit [Ping timeout: 265 seconds]
maximski has quit [Max SendQ exceeded]
maximski has joined #ruby
bonhoeffer has quit [Ping timeout: 240 seconds]
tyfighter has quit [Quit: tyfighter]
nfk has quit [Quit: yawn]
tessi has quit [Ping timeout: 265 seconds]
maximski has quit []
<shevy> damn
<shevy> it is first of june
mikecmpbll has quit [Quit: i've nodded off.]
lethe has joined #ruby
osvico has joined #ruby
noob101 has joined #ruby
SCommette has quit [Quit: SCommette]
tectonic has quit []
Zesty has joined #ruby
Rollabunna has joined #ruby
ta has joined #ruby
timgauthier has joined #ruby
tyfighter has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
sepp2k has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
Rollabunna has quit [Ping timeout: 260 seconds]
<benzrf> sweg
aneong has left #ruby [#ruby]
b1205 has quit [Ping timeout: 240 seconds]
rm_ has joined #ruby
r0ok has quit [Ping timeout: 252 seconds]
yubrew has joined #ruby
toastynerd has quit [Remote host closed the connection]
<rkazak_> shevy: thanks for reminding me of my hard 7th June deadline!
dawkirst has quit [Remote host closed the connection]
rm_ has quit [Ping timeout: 252 seconds]
jamto11 has joined #ruby
<shevy> what happens on 7th
<rkazak_> have to submit a first pass of a paper…
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
mercwithamouth has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
lethjakman has quit [Quit: WeeChat 0.4.3]
feature_creep has quit [Quit: feature_creep]
jamto11 has quit [Ping timeout: 240 seconds]
robustus has quit [Ping timeout: 264 seconds]
hgl has joined #ruby
dvabr has quit [Read error: Connection reset by peer]
robustus has joined #ruby
dvabr has joined #ruby
Zesty has quit [Quit: Leaving...]
chrisseaton has joined #ruby
nszceta has joined #ruby
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phoo1234567 has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sambao21 has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hgl has quit [Ping timeout: 252 seconds]
gorpon has quit [Ping timeout: 255 seconds]
feature_creep has joined #ruby
Burgestrand has quit [Quit: Burgestrand]
hgl has joined #ruby
<noob101> I got this error - <filename>:<linenumber>:in '<main>': undefined method '+' for nil"NilClass (NoMethodError)
<noob101> Why do I have that error?
dseitz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
KLVTZ has joined #ruby
<popl> noob101: you're trying to add something (which evaluates to nil:Nilclass) to another something
<popl> noob101: I can't say for sure unless you show some code. You can paste it to the paste site at the URL in the topic.
centrx has joined #ruby
<noob101> popl, okey dokey oka chokey
OffTheRails has quit [Ping timeout: 276 seconds]
centrx has quit [Client Quit]
dawkirst has joined #ruby
<shevy> noob101 for a primitive way to handle this, you can use .to_s on that object, or put it into "#{foo}" quotes
<shevy> or even better, make sure you can never have a nil object in areas where your code might fail otherwise
hgl has quit [Read error: Connection reset by peer]
hgl has joined #ruby
dontwork has joined #ruby
<dontwork> Hiya
<dontwork> if a method starts with "return arr if arr.length <=1" will it repeat the code that follows it until that statement returns true?
<popl> dontwork: that statement returns arr if the length of arr is less than or equal to 1. it doesn't do anything else.
<dontwork> right ok
dawkirst has quit [Ping timeout: 252 seconds]
<dontwork> so are the comments on this method correct https://gist.github.com/dontwork/7cf9b9149ba0c1b3c13e#file-method-rb ?
<dontwork> trying to wrap my head around the recursion
Hanmac has joined #ruby
<windowlicker> ve the same name of test_method. The difference is that the class
<windowlicker> method is denoted with selve the same name of test_method. The difference is that the class
windowlicker has quit [Quit: Lost terminal]
Zesty has joined #ruby
<noob101> popl, shevy, look at this stupid error ruby keeps annoying me about >:( ERROR -> http://tinypic.com/view.php?pic=2uigkgj&s=8#.U4qIXfldWtE
<popl> why a screenshot?
<popl> why not just paste the text to the pastebin URL in the topic?
Hanmac1 has quit [Ping timeout: 240 seconds]
<popl> I'm not enabling JS for that site just to look at it, sorry.
lyuzashi has quit [Ping timeout: 245 seconds]
<dontwork> the error says + is an undefined method lol
<popl> Probably because noob101 is just throwing spaghetti at the wall and seeing what sticks instead of actually writing Ruby.
subbyyy has quit [Ping timeout: 255 seconds]
diegoviola has joined #ruby
Zesty has quit [Client Quit]
<dontwork> popl in the method i posted does the return statement act as an end to the recursion loop?
<popl> it's a decent enough base case, sure
<dontwork> i dont know what you mean by that sorry
GriffinHeart has joined #ruby
<popl> Then I suppose you'd better look it up.
<popl> :)
dseitz has joined #ruby
afast has quit [Ping timeout: 240 seconds]
diegoviola has quit [Changing host]
diegoviola has joined #ruby
<dontwork> ah right, gotcha - didn't know 'base case' was a thing
<dontwork> great thats helpful, cheers! i get it
<noob101> Would someone please check out my error, please. :( ERROR -> http://tinypic.com/view.php?pic=2uigkgj&s=8#.U4qIXfldWtE
combusean has joined #ruby
<noob101> What is the other ruby channel?
GriffinHeart has quit [Ping timeout: 240 seconds]
<dontwork> yeah noob it looks like you are using trying to add to things that cant be added
<noob101> dontwork, oh ok.
<popl> That's what I said.
<popl> :P
<noob101> dontwork: What do you suggest me to do.
<dontwork> i am also noob101 though
<noob101> dontwork: Wait really?
subbyyy has joined #ruby
jailbot has joined #ruby
<noob101> dontwork: Oh ok.
yubrew has joined #ruby
<dontwork> popl you said he was adding incompatible objects?
braincra- has joined #ruby
<popl> 18:42 < popl> noob101: you're trying to add something (which evaluates to nil:Nilclass) to another something
<noob101> popl: ok so what should I do?
<dontwork> noob101 on line 454 you are using .to_i, but are not on any of the previous similar looking lines
<popl> noob101: Learn Ruby.
<shevy> noob101 please no image screenshots. and if you really must, then get the URL via right click like so: http://oi59.tinypic.com/2uigkgj.jpg
<noob101> popl: Your help isn't needed anymore, thank you for helping me. Thank you.
<shevy> noob101 now first look at your case when menu
<shevy> I think it is a bad way to hardcode Array entries like that
sambao21 has quit [Quit: Computer has gone to sleep.]
braincrash has quit [Ping timeout: 255 seconds]
<noob101> shevy: look at my case when menu?
<shevy> yes
radic has quit [Ping timeout: 240 seconds]
moritzs has quit [Ping timeout: 252 seconds]
<shevy> "case"
<shevy> on that screenshot
<noob101> That's the terminology for the case when list right?
<noob101> case when menu shevy?
<shevy> also look that you do this:
<shevy> if card_two[1]
<popl> wee
<shevy> and then
<shevy> case card_two
<shevy> you can unify both noob101
<shevy> yes noob101 case/when menu
<dontwork> why is it bad practice to hardcode array entries like that?
<shevy> you use case
<shevy> you use when
<shevy> case/when
<noob101> shevy oh ok
<shevy> dontwork when at some later point you wish to change it, you must find all hardcoded entries
alxgnon has joined #ruby
<dontwork> ah so jack should just be a variable for instance
yubrew has quit [Ping timeout: 264 seconds]
rm_ has joined #ruby
<shevy> yes, or he might switch the whole entries towards method queries
bthesorc_ has quit [Remote host closed the connection]
<shevy> so that rather than doing:
dexter_ has joined #ruby
<shevy> when ["Diamonds","Jack",10]
radic has joined #ruby
<noob101> right im listening shevy
<shevy> he could do some query like @my_card.is? 'Jack'
<shevy> or some other name of the method, I am not sure
<shevy> noob101 the whole point of OOP is to abstract away stuff
<noob101> `OOP` = ?
<shevy> so you would have a generic class Card; and something like class Hand, that holds the cards
<shevy> god noob101
<shevy> you write ruby code
<shevy> how can you not know OOP
<noob101> shevy, that's my name, noob101, noob of noobs.
<shevy> nah that is no excuse
<shevy> you heard it before
<noob101> I don't know `OOP`
<popl> you wear your ignorance like a badge
<noob101> Hmmm
bthesorceror has joined #ruby
<popl> then look it up
<popl> :P
<shevy> I remember it
toastynerd has joined #ruby
<noob101> forget it continue on, sorry
<shevy> noob101 do you remember global variables
<popl> oh jeez
<noob101> shevy yes
popl has left #ruby [#ruby]
<shevy> well that's at least something
<shevy> I thought you have forgotten already
<noob101> A global variable can be accessed anywhere in the program and you shouldn't use em.
<shevy> yes
<shevy> well
<shevy> if you are 100% sure you want to use it
<shevy> then perhaps it may be ok
<noob101> I don't want too.
<shevy> but if you can avoid having to use them
<shevy> that is better
<shevy> ruby by default already uses some global variables
<shevy> like $stdin
<noob101> I am also avoiding classes, my program is something called a "script" not sure what it is but many people said that my program was a script.
<shevy> classes are useful
<noob101> I don't know what `$stdin` is but ok.
<shevy> well it has a $
<shevy> so what might this be noob101?
<noob101> A global variable.
<dontwork> what are the prefernce over global variables, classes?
<shevy> yes
<shevy> btw noob101 I think you already used $stdin
<noob101> It's a ruby Global Variable right?
<shevy> noob101, did you use "gets" ?
<noob101> Oh yes
<shevy> yeah noob101
<noob101> I used gets.chomp
<shevy> ok then:
<shevy> $stdin.gets.chomp
<shevy> same thing
<noob101> Oh cool.
<shevy> but you can omit the $stdin
<shevy> it gets standard input from the keyboard
<noob101> So shevy
<noob101> for the when in my case/when menu.
<shevy> ah well
<shevy> too many small changes
<shevy> just keep on hardcoding for now :P
rm_ has quit [Ping timeout: 265 seconds]
<noob101> instead of an array with elements in it
<shevy> nono
<shevy> just continue like that
<noob101> What do you prefer? You said a class or a glob var but I refuse. :(
<shevy> switching the whole thing to class centric design is too much work right now
<noob101> It is.
<noob101> I know.
<shevy> no, I never said global variables
<noob101> But I don't know how to fix the bug in my code. http://oi59.tinypic.com/2uigkgj.jpg
<noob101> It's Nil error or whatever it is.
<shevy> well remember
chrisseaton has quit []
<shevy> I once told you to use pp
<shevy> so on the line before that error
<noob101> You said OOP right?
<noob101> Something like that.
<noob101> pp
<shevy> I said pp days ago
<noob101> What's pp?
toastynerd has quit [Ping timeout: 245 seconds]
<shevy> today I said OOP but OOP is not important for your error
<shevy> pp stands for pretty print
<shevy> at the top of your file do require 'pp'
<shevy> and then, on the line before your error
<shevy> do:
<noob101> What does it do?
<shevy> pp user_cards
<shevy> pp card_one
<shevy> it pretty prints your stuff
<shevy> then you know what is going on
<shevy> and why card_one[1] is failing for you
<noob101> >:( I am confused.
<shevy> I am sure you have a bug in the way how you fill up card_one, so you should also look at that area
<shevy> confused about what
<shevy> add:
<noob101> So what is it going to show in my terminal
<shevy> require 'pp'
<shevy> on top of your file.
<shevy> is that so hard
<shevy> it shows your data structures
subbyyy has quit [Ping timeout: 252 seconds]
<noob101> Ahhh :o
<noob101> Ok, I required it. Is that all I need to do?
<shevy> of course not
<shevy> <shevy> pp user_cards
<shevy> <shevy> pp card_one
<noob101> Or do I have to change my code after I did `require 'pp'`
<shevy> <shevy> and then, on the line before your error
<shevy> yes change your code
<shevy> until you have debugged where your error is
<shevy> afterwards you can remove the pp lines again
<shevy> but keep the require 'pp' anyway
havenwood has joined #ruby
cgcardona has quit [Quit: cgcardona]
<noob101> oh so where ever I suspect an error, I use pp then whatever I need to put it.
<noob101> BTW, case, when, puts are all functions? What is the terminology?
<noob101> Are they ruby methods?
<shevy> well
<shevy> puts is a method, you can see it here http://www.ruby-doc.org/core-2.1.2/Kernel.html#method-i-puts
dingus_khan has joined #ruby
<shevy> which is apparently $stdout.puts
eka has joined #ruby
<shevy> case when are not methods
Takle has quit [Read error: Connection reset by peer]
<shevy> they are language constructs, keywords I suppose
Takle has joined #ruby
sski has joined #ruby
<noob101> so puts is a keyword?
<shevy> noob101, here are the list of keywords in ruby: study them, memorize them, it's just like 20 words to keep in mind http://ruby-doc.org/docs/keywords/1.9/
<noob101> or is puts a language contruct
<shevy> <shevy> puts is a method, you can see it here http://www.ruby-doc.org/core-2.1.2/Kernel.html#method-i-puts
<noob101> Ok.
<shevy> do you not read what I type man!
<noob101> wow ok, shevy this is a lot ( o ) _ ( o )
<shevy> it is a method that resides in module Kernel
<shevy> which is by default a core part of ruby
<shevy> that is not a lot
<shevy> how many words can you memorize
<shevy> the english language has many thousand words
<shevy> and you dont need all of these either
<shevy> but you can see 'when' and 'case' there
<shevy> so yes, remember these!
eka has quit [Client Quit]
SilverKey has quit [Quit: Halted.]
Zenigor has joined #ruby
<noob101> __END__ ends the program, interesting
<noob101> I used abort,
tyfighter has quit [Quit: tyfighter]
<noob101> wait I don't think it does.
tylersmith has quit [Remote host closed the connection]
<benzrf> noob101: it ends it syntactically
<benzrf> noob101: not semantically
gorpon has joined #ruby
<noob101> benzrf: right
dingus_khan has quit [Remote host closed the connection]
tesuji has joined #ruby
tkuchiki has joined #ruby
amargherio has quit [Remote host closed the connection]
<noob101> shevy I am safe to do the pp like this -> pp when
<noob101> ?
<noob101> pp when (condition(
<noob101> pp when (condition)*
<shevy> noob101 if you want to end your program, use: exit
<shevy> no noob101
<shevy> use pp on your variable
<shevy> noob101, scroll up what I wrote
<shevy> <shevy> <shevy> pp user_cards
<shevy> <shevy> <shevy> pp card_one
charliesome has joined #ruby
freerobby has quit [Quit: Leaving.]
bga_ has left #ruby [#ruby]
NukePuppy has joined #ruby
alexju has joined #ruby
<noob101> shevy thank you for being so nice. I will do that.
<noob101> shevy: What is difference between abort and exit?
Rollabunna has joined #ruby
obs has quit [Remote host closed the connection]
danshultz has joined #ruby
pwh has joined #ruby
<shevy> no idea
<shevy> use exit
<shevy> forget abort
<shevy> and you can read up all that man
<shevy> it is all available
<shevy> you need to learn how to use docu
<shevy> and make local notes so you don't forget
<shevy> "Terminate execution immediately, effectively by calling Kernel.exit(false)."
<shevy> see
<shevy> abort is just an alias
<shevy> to exit, with default argument being false
Fire-Dragon-DoL has quit [Quit: Leaving.]
rkazak_ has quit [Quit: rkazak_]
kaspergr_ has joined #ruby
zkay11 has joined #ruby
momomomomo has quit [Quit: momomomomo]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
toastynerd has joined #ruby
kaspergrubbe has quit [Ping timeout: 276 seconds]
mehlah has quit [Quit: Leaving...]
stantona has joined #ruby
danshultz has quit [Ping timeout: 264 seconds]
diegoviola has quit [Remote host closed the connection]
alxgnon has quit [Remote host closed the connection]
toastynerd has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
gorpon has quit [Ping timeout: 240 seconds]
gorpon has joined #ruby
stantona has quit [Ping timeout: 240 seconds]
tacos1de has joined #ruby
learner has joined #ruby
osvico has quit []
<learner> hey guys how can have a hash character in a string, say i want to set user: "abel#doob_booga"
cgcardona has joined #ruby
braincra- has quit [Quit: bye bye]
cgcardona has quit [Client Quit]
<pontiki> just like that...
Zenigor has quit [Remote host closed the connection]
yubrew has quit [Ping timeout: 264 seconds]
Zenigor has joined #ruby
<learner> won't it try to evaluate #doob_booga instead
<pontiki> no
<learner> like won't it try to interpret it as some ruby code
TorpedoSkyline has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<pontiki> if you're thinking of interpolation, it's #{..}
<pontiki> have you tried it?
robbo__ has joined #ruby
NukePuppy has quit [Ping timeout: 255 seconds]
<learner> not yet, i'm trying it now
<shevy> learner # is only enough if there is also a $
<shevy> otherwise you must use {}
braincrash has joined #ruby
<shevy> >> $yo = 'heya'; puts "oki dokie #$yo"
<eval-in_> shevy => oki dokie heya ... (https://eval.in/157489)
Zenigor has quit [Ping timeout: 260 seconds]
<pontiki> or @ or @@
peret has quit []
n_blownapart has joined #ruby
<learner> k ty
rm_ has joined #ruby
KLVTZ has quit [Ping timeout: 264 seconds]
dingus_khan has joined #ruby
<n_blownapart> http://pastie.org/9245495 hi I'm looking at a math problem in ruby and have questions re: the reference naming here and generally.
Beoran_ has quit [Ping timeout: 276 seconds]
Martxel has quit [Ping timeout: 252 seconds]
<n_blownapart> dingus_khan: nice moniker! from one world ruler to another...
jamto11 has joined #ruby
rm_ has quit [Read error: No route to host]
<dingus_khan> n_blownapart: i take it you caught the reference?
dexter_ has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
<n_blownapart> well, it seems like a pleasantly self-mocking ref: to Genghas dingus_khan
rm_ has joined #ruby
<noob101> shevy. Sigggh....I need your...help again.
jamto11 has quit [Ping timeout: 260 seconds]
<noob101> shevy Please don't get angry at me for not doing this correct. I really tried to do as you said but it's not working.
<noob101> shevy, would you please help me or if you don't want to then you can tell me no.
<noob101> Can anyone please help me? This is my error, check out the last error in the terminal and that's the error. http://oi59.tinypic.com/2uigkgj.jpg
dingus_khan has quit [Remote host closed the connection]
<n_blownapart> noob101: I think #to_i is your problem.
Beoran_ has joined #ruby
rankine has joined #ruby
combusean has quit [Ping timeout: 240 seconds]
<pontiki> please use an actual code paster. i can't even read that
<noob101> Ok.
rankine has quit [Client Quit]
<pontiki> not all of us are young
qwyeth has quit [Ping timeout: 255 seconds]
<n_blownapart> noob101: is that a pipe there on line 454 ?
<pontiki> oh gods <3 <3 <3 david gilmore
<pontiki> oops
<pontiki> ww
gorpon has quit [Ping timeout: 240 seconds]
<noob101> n_blownapart: give me a second please sir
<n_blownapart> pontiki: what is your reference to david gilmore? love him..
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
<n_blownapart> noob101: I'm a noob too, but that is either a pipe or your editor marks the line where the error occurred .
pwh has quit []
<shevy> noob101 you did not do anything I told you to do
rm_ has quit [Remote host closed the connection]
<noob101> Back
<noob101> n_blownapart: There are no pipes
rm_ has joined #ruby
dontwork has quit [Remote host closed the connection]
<noob101> shevy: I did
<noob101> shevy: I swear
<n_blownapart> noob101: shevy is a hard taskMaster
<shevy> noob101 you uploaded an image
<noob101> shevy: but where the error is, the line is an expression.
<shevy> noob101 in that image I see no occurance of pp
<noob101> No shevy
<noob101> That was the old pic
<noob101> Can you show me an example on how to use pp please. :(
<noob101> I did pp user_cards
<RubyPanther> Images are only allowed if you're teaching something, it is hand drawn, and decorated. Otherwise you need text.
<noob101> nothing
<shevy> >> require 'pp'; array = [1,2,3]; pp array
<eval-in_> shevy => [1, 2, 3] ... (https://eval.in/157491)
<shevy> noob101 impossible that "nothing" is printed
<shevy> at worst it would be nil
<shevy> and this then gives you useful information
<shevy> noob101 can we teach you to switch to another pastie
<pontiki> n_blownapart: i meant david gilmour, btw.
<noob101> fine.
<pontiki> i am listening to Live in Gdansk
<shevy> pontiki gdanks? isn't that in poland?
<noob101> shevy: just asking. Is there a program where I can stream live and people can see my screen?
<shevy> noob101 dunno, I think partially... show ioterm or something
<shevy> but who wants to see your screen really :P
<shevy> just isolate the error
<pontiki> i think ioterm is just playback
<n_blownapart> pontiki: sweet. I saw the wall at Nassau coliseum in 1980.
<shevy> noob101 you should try to go through your code slowly and ask yourself when it could be nil
<shevy> wtf 1980
<shevy> benzrf's dad wasn't even born then
<noob101> shevy: Ok.
<benzrf> shevy: say that 2 his face
<n_blownapart> shevy: there you have it. You think learning ruby at this age is easy?
<pontiki> c'mon
rm_ has quit [Ping timeout: 252 seconds]
<pontiki> i love learning knew languages
<ponga> what age
<pontiki> except still haven't learnt python...
<shevy> n_blownapart well benzrf knows like 100 languages already
<ponga> pontiki: looks like your English class has failed tho lol
<ponga> knew language!
* noob101 whispers to n_blownapart "Thank you"
<shevy> pontiki is allowed to reinvent english
<pontiki> how so?
<ponga> oh
<pontiki> "learnt" ?
<pontiki> look it up
<noob101> where's centrx
<shevy> WISDOM
<ponga> so how old is n_blownapart
<shevy> n_blownapart must have already lived in 1980
qwyeth has joined #ruby
<pontiki> that seems likely necessary to attend a concert...
<shevy> hehe
<n_blownapart> shevy: comment? (the French)
<shevy> the french?
<shevy> what do we need them for again
<shevy> except for Mon_Ouie
<n_blownapart> yes shevy in French comment means like "what?"
<shevy> he writes cool code
<shevy> aha
<pontiki> squdgey little cars like the Citroen
<shevy> le pommes frittes
<shevy> didn't the koreans buy the citroen
julian-delphiki has joined #ruby
<ponga> did they?
<ponga> im korean and never knew
<shevy> nah probably not
<pontiki> i'll weep if that's so
<shevy> but perhaps some german company
<n_blownapart> Fiat owns Chrysler.
<ponga> pontiki i, as korean would weep for your soul if that happens
<ponga> for your french soul
<shevy> ponga gangnam style!
bean_ has quit [Ping timeout: 240 seconds]
<pontiki> the Citroen is so essentially French
<shevy> pontiki and the Renault!
<pontiki> mais oui!
jailbot has quit [Quit: keep cool, stay in school]
<n_blownapart> mon dieu
<pontiki> tho the Renault is more european
<shevy> as young kids we were transported to school by mum in a Renault Espace
<ponga> come on, Citroen took 8 years to sell 381 cars in korea, why would korean company want them anyway
<ponga> its very infamous here
<ponga> no worries
<shevy> lol
<shevy> 381
pgmcgee has quit [Ping timeout: 252 seconds]
<noob101> shevy: I did it 9245632
<noob101> whoops sorry
<ponga> oh fyi
<shevy> what does that even mean
<ponga> shevy: pontiki C8 was never imported to Korea
<n_blownapart> here's my code in french if anyone cares to look : http://pastie.org/9245495
<ponga> cos if you pronounce C8 in korean it means " *uck you"
<shevy> I wouldn't know!
<shevy> but I was in Seoul... that place is awfully cold
<ponga> no bdy wants that
pgmcgee has joined #ruby
<ponga> the place is awfully humid and hot in summer
<shevy> noob101 I don't like your code
<pontiki> this is often why cars get different badges in different markets
<shevy> deck[25] << 1 << 11
<shevy> noob101 but at least it is all text now
<shevy> and not an image
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<noob101> shevy: >:( I spent a week and hours past my curfew doing that code.
<noob101> shevy: gotta give me some credit
moted has joined #ruby
<shevy> I am only used to the german card names hahaha
<shevy> so I see the four categories are ... Hearts Clubs Spades and Diamonds
<shevy> how many cards are per category again? 11?
<noob101> Um.
<noob101> Let me think shevy
<noob101> I think 14.
<shevy> are you sure
djbkd has quit [Remote host closed the connection]
<shevy> I mean, the more sure you are, the easier your program will be
<ponga> are you sure
<noob101> You got, 2,3,4,5,6,7,8,9,10,Jack,Queen,King,Ace
<shevy> uhm
<ponga> where is 1
<ponga> jokes
<shevy> lol
<noob101> Ace = 1 or 11?
<noob101> right?
<pontiki> WHERE IS ZERO
<shevy> well I count 13 in your list noob101
<noob101> pontiki: stop playing lol
<pontiki> :((
<shevy> so 13 * 4 is 52 cards
<ponga> pontiki: no wonder humanity took long time to understand 0
tylersmith has joined #ruby
<shevy> noob101 now the thing is
<shevy> noob101 can you tell me how the entries should be in your main array?
<RubyPanther> At times belief in zero has been punishable by death.
<pontiki> YOU AREN'T THE BOSS OF ME
GriffinHeart has joined #ruby
<pontiki> the ever mysterious i took even longer
<shevy> noob101 this is your main array -> deck
<shevy> noob101 do: pp deck; exit
<shevy> and watch carefully
<noob101> Yes it is shevy
<shevy> I am very sure your array is wrong
<noob101> Ok I hope this works
<shevy> ok noob101 tell me of an example entry then
<shevy> just any
<noob101> I don't know what an entry is.
<noob101> You speak complex
<shevy> well, your array has entries
<noob101> You mean elements?
<shevy> good
<noob101> Or is it different
<ponga> stuffs in array?
<shevy> elements
<noob101> Oh ok
<noob101> :)
<shevy> so show me one element
<shevy> as example
<shevy> ok this takes too long
<shevy> ["Spades", "King", 10],
<shevy> noob101 is that one element
<shevy> of your array
<shevy> you also have this:
<shevy> ["Spades", "9"],
<noob101> Yes.
<shevy> and this is what I am having a huge problem with
<noob101> Those are my elements
<RubyPanther> it is a lot easier with objects than strings
gorpon has joined #ruby
<shevy> what is the point of having differently spaced elements noob101
sambao21 has quit [Ping timeout: 255 seconds]
<shevy> noob101 I mean honestly, drop the "King" part there, just store as points
<noob101> well a deck has different cards
<shevy> sure but every card has only one value
<noob101> I tried to make an actual deck
<shevy> there is no need to store the name there
<shevy> you can use a hash to convert from value to long name
<noob101> the reason why I put a number and a name cause well, when that element is used it gets deleted from the deck
<noob101> No no no, you need to remember I am not on your level.
GriffinHeart has quit [Ping timeout: 240 seconds]
<shevy> nono
<noob101> I use what I know for now.
<shevy> you are on a higher level
<noob101> No I am not
<shevy> you make things more complicated
<noob101> You are over me.
<shevy> no, I would store less
<shevy> the less you have to write
<shevy> the less you store
<shevy> the easier everything will be
yubrew has joined #ruby
<noob101> shevy I know but I am not on your level
<shevy> you are on a higher level
<noob101> I really tried making things less complicated
<shevy> you store more information
sambao21 has joined #ruby
<noob101> shevy well I am analytical. I don't know.
<shevy> noob101 look at your code
<shevy> and btw do: pp deck
<shevy> and rerun the program
<noob101> I will do pp deck now
<noob101> put that in beginning of program shevy?
<shevy> you need to think logically
<shevy> if you put it at the top
<shevy> ruby parser will wonder what deck is
toastynerd has joined #ruby
<shevy> so logically you can use it only after you assigned the deck variable
<shevy> so like after line 43, but you must look with your own eyes for the number
moted has quit [Remote host closed the connection]
<shevy> now in your code you do this:
<shevy> if card_one[1] == "Ace"
Atrumx has quit [Remote host closed the connection]
r0ok has joined #ruby
<shevy> you use a range by the way
<shevy> if user_input != "1" && user_input != "11"
yubrew has quit [Ping timeout: 260 seconds]
n_blownapart has quit [Remote host closed the connection]
<shevy> noob101, in ruby you can do this better:
<shevy> >> ("1".."11").include? '2'
<eval-in_> shevy => true (https://eval.in/157492)
<noob101> Whoa
davedev24_ has quit [Remote host closed the connection]
vee has quit [Ping timeout: 240 seconds]
<pontiki> >> ('1'..'11').to_a
<eval-in_> pontiki => ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"] (https://eval.in/157493)
<pontiki> holy crap
davedev24_ has joined #ruby
<pontiki> >> ("a" .. "aa").to_a
b1205 has joined #ruby
toastynerd has quit [Ping timeout: 260 seconds]
yacks has quit [Quit: Leaving]
<pontiki> suck on that, eval-in_
rm_ has joined #ruby
<noob101> shevy
<noob101> shevy: I appreciate all the side advice but I came here to solve this nil error. Now if I solve it and my program runs properly then I will be willing to add the extra stuff
brunops has quit [Quit: leaving]
yacks has joined #ruby
hgl has quit [Ping timeout: 265 seconds]
<noob101> shevy: However for now, I would definitely like to fix the problem. So continuing, I did add pp deck and it printed out the deck.
<noob101> shevy: How is that suppose to help me with the nil error
<noob101> shevy: Just asking
near77 has quit [Quit: Page closed]
dexter_ has joined #ruby
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
<shevy> on the line where nil shows up
<shevy> simply add .to_s
<shevy> to the object that is nil
<noob101> Really?
<shevy> yeah
<noob101> Ok, I will, thanks.
brunops has joined #ruby
<shevy> but the program has more problems
<noob101> I don't know what object is nil but yeah I will. Let me check my terminal again.
<shevy> the line error will tell you
<shevy> there can only be a finite number of possibilities on that line
<benzrf> noob101: i think u mean, which VARIABLE is nil
<noob101> But remember it says undefined method '+'
davedev24_ has quit [Ping timeout: 240 seconds]
<benzrf> only 1 object is nil
<shevy> noob101 nah
<noob101> for nil:NilClass
<shevy> noob101 one of the two objects between + is nil; simply add .to_s
<noob101> Ok np
dontwork has joined #ruby
<noob101> Add .to_s to both variables?
<shevy> sure
<noob101> or onlu one shevy
<noob101> oh ok great
<shevy> but only if you need strings
<shevy> you store weird stuff
<shevy> ["Diamonds", "Ace", 1, 11]
<ponga> shevy: "you store weird stuff" sound very suspicious
<shevy> that one has even 4 entries
<shevy> ponga yeah ... his main array can have... two entries.. three... or four ...
<ponga> or five...
<shevy> this inconsistency would kill me mentally
<ponga> suspicious..
nszceta has quit []
<shevy> ["Clubs", "King", 10],
<shevy> ["Spades", "Jack", 10],
<shevy> noob101 can this be correct
alxgnon has joined #ruby
<shevy> I thought king and jack have different values
decoponio has joined #ruby
<pontiki> depends on the game
<pontiki> they still have different ranks, tho
<shevy> strip poker
<pontiki> cool
<noob101> shevy: Yes sir
<pontiki> then ranks are what you use
<noob101> shevy: I am getting upset, more freaking errors.
<pontiki> poker doesn't have values
<noob101> I put .to_s more errors
<shevy> noob101 can a king be equal to jack
rm_ has quit [Ping timeout: 265 seconds]
<noob101> shevy: numerically yes. Jack and Kings are worth 10.
<shevy> noob101 see, make everything right as soon as possible, and lateron you won't have errors
<shevy> huh
<noob101> shevy I have error
<noob101> UUUUUUGH! >:(((
<shevy> what error
<shevy> mouse-in-pants error?
<pontiki> stop answering
<shevy> building on fire?
<pontiki> they'll never figure out how to debug something if you keep giving all the answers
dontwork has quit [Ping timeout: 252 seconds]
decoponyo has quit [Ping timeout: 252 seconds]
KLVTZ has joined #ruby
<shevy> he is on a good way
<shevy> soon enough he will be so angry that he will start from scratch
davedev24_ has joined #ruby
decoponyo has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<noob101> Error after adding .to_s -> <filename>:460:in '<main>': undefined method 'to_s=' for nil:NilClass (NoMethodError)
decoponyo has quit [Remote host closed the connection]
<noob101> no I don't want to start from scratch, I will kill myself if I have to.
<shevy> what can you see in that error noob101
<noob101> shevy, I have no idea I tried and tried.
<shevy> yeah but you can read it
<shevy> what does it tell you
sputnik13 has joined #ruby
<noob101> It says nil, nil means nothing. How is there nothing when card_one is a freaking rand element from the deck array
<noob101> I am confused
<shevy> no that is not what that error says
<shevy> can you read the error for us
hgl has joined #ruby
<noob101> Ok I will
decoponio has quit [Ping timeout: 240 seconds]
<noob101> undefined method
<shevy> good
<noob101> undefined method means....
<shevy> and what is the name
kireevco has quit [Ping timeout: 265 seconds]
<noob101> the name of the method?
<shevy> yes
<noob101> '.to_s='
<shevy> yes
b1205 has quit [Ping timeout: 255 seconds]
<shevy> so you tried to invoke a method with that name on a nil object
<noob101> a nil object means its an object with a value of nothing right?
<shevy> which won't work
<shevy> a nil object is not useful for much at all, except for when you wish to query whether an object is nil or not
<shevy> in your case you must have a line that is like:
<shevy> x.to_s = y
<shevy> so remove the .to_s anyway; then figure out why x is nil
<shevy> well
<noob101> so the object that I am trying to add to user_cards has a value of nothing correct?
<shevy> if it was an assignment then the object on the right hand side must have been nil
<shevy> yeah
<shevy> you try to add something to a nil
<shevy> and nil hates that
<shevy> >> nil.class
<eval-in_> shevy => NilClass (https://eval.in/157494)
<shevy> >> nil + 5
<eval-in_> shevy => undefined method `+' for nil:NilClass (NoMethodError) ... (https://eval.in/157495)
<shevy> see
<shevy> >> nil.to_s + 5.to_s
<eval-in_> shevy => "5" (https://eval.in/157496)
KLVTZ has quit [Ping timeout: 252 seconds]
davedev24_ has quit [Remote host closed the connection]
sethn has joined #ruby
<shevy> I have to be afk now
sethn has quit [Remote host closed the connection]
davedev24_ has joined #ruby
<noob101> shevy no please.
<noob101> You're the only one helping me.
<noob101> Who will help me now, you have the most patience with me shevy.
<noob101> Sigh, he's gone.
<noob101> Now I am fucked.
decoponio has joined #ruby
timgauthier has joined #ruby
sethn has joined #ruby
sethn has quit [Client Quit]
lxsameer has joined #ruby
davedev24_ has quit [Ping timeout: 256 seconds]
Xeago has quit [Ping timeout: 260 seconds]
sunya7a has joined #ruby
zkay11 has quit [Remote host closed the connection]
robbo__ has quit [Ping timeout: 240 seconds]
timgauthier has quit [Quit: Textual IRC Client: www.textualapp.com]
brunops has quit [Quit: leaving]
jackjackdrpr has joined #ruby
jackjackdrpr has quit [Client Quit]
synfin has quit [Ping timeout: 240 seconds]
hgl has quit [Ping timeout: 240 seconds]
synfin_ has joined #ruby
tesuji_ has joined #ruby
yeticry_ has joined #ruby
AlHafoudh has quit [Excess Flood]
Sthebig has quit [Excess Flood]
AlHafoudh_ has joined #ruby
Sthebig has joined #ruby
Royixc has quit [Excess Flood]
ping-pong has quit [Excess Flood]
AlHafoudh_ is now known as AlHafoudh
tesuji has quit [Read error: Connection reset by peer]
yeticry has quit [Write error: Broken pipe]
ping-pong has joined #ruby
ponga has quit [Ping timeout: 332 seconds]
Royixc has joined #ruby
sunya7a has quit [Ping timeout: 240 seconds]
sheperson has joined #ruby
robbo__ has joined #ruby
jailbot has joined #ruby
lolmaus has quit [Excess Flood]
froy has quit [Excess Flood]
lolmaus has joined #ruby
diegoviola has joined #ruby
sski has quit [Remote host closed the connection]
froy has joined #ruby
sski has joined #ruby
zorak_ has joined #ruby
zorak has quit [Excess Flood]
toastynerd has joined #ruby
jailbot1 has joined #ruby
jailbot has quit [Ping timeout: 260 seconds]
<jailbot1> hello?
<benzrf> h
<jailbot1> so I've got an array
<jailbot1> dice = [5,5,5,5,3]
<jailbot1> and I want to delete 3 of the fives
aspires has joined #ruby
<jailbot1> but dice.delete(5) deletes all of the 5s
sski has quit [Ping timeout: 252 seconds]
<jailbot1> how would I remove three of the fives?
jailbot1 is now known as jailbot
<jailbot> anyone there? does this work?
robbo__ has quit [Ping timeout: 245 seconds]
toastynerd has quit [Remote host closed the connection]
<jailbot> >
b1205 has joined #ruby
<jailbot> ?
chipotle has joined #ruby
jailbot_ has joined #ruby
yubrew has joined #ruby
<jailbot> ?
<jailbot_> hello?
gorpon has quit [Ping timeout: 260 seconds]
Wolland has joined #ruby
freezey has joined #ruby
<jailbot_> is it posible to get help here?
dexter_ has quit [Ping timeout: 255 seconds]
_sambao21 has joined #ruby
<Wolland> maybe
<jailbot> thank you
<jailbot> did you read my question?
<Wolland> no sorry just joined
<jailbot> ok
<jailbot> i've got an array
<jailbot> dice = [5,5,5,5,3]
<jailbot> and I want to delete 3 elements of 5
yubrew has quit [Ping timeout: 240 seconds]
<Wolland> which 3
<jailbot> but dice.delete(5) removes all 4
<jailbot> doesnt matter
narendraj has joined #ruby
jailbot_ has quit [Quit: keep cool, stay in school]
closer has quit [Ping timeout: 245 seconds]
<Wolland> well, you can do dice[1..2]
<Wolland> or whatever range you want to keep
<jailbot> not really sure about the range
sambao21 has quit [Ping timeout: 240 seconds]
<Wolland> it depends on what you want to keep
<jailbot> well [5,3] in the example
<jailbot> im really just trying to delete though
hooe has joined #ruby
<jailbot> why doesnt ruby have a method for that
<Wolland> you can pop items out of array
<Wolland> or shift
dawkirst has joined #ruby
closer has joined #ruby
<jailbot> you think there would be a .delete and a .delete_all
<Wolland> you can delete_at or delete_iff
<Wolland> if
<Wolland> there is
<Wolland> delete_at
alexju has quit [Remote host closed the connection]
Shidash has quit [Ping timeout: 240 seconds]
<jailbot> but I dont want to delete by index I want to delete by value
jimbauds has joined #ruby
<Wolland> then you can use reject_if
<Wolland> or keep_if for opposite logic
<jailbot> but there are 4 of the same value
<jailbot> I want to delete 3 of them
<Wolland> are you trying to remove all duplicates?
<jailbot> no
<jailbot> just 3
<jailbot> its a game
<jailbot> a dice game
<jailbot> where three of the same are considered to be a "score"
<Wolland> so what if your array is [2,2,3,4]
<Wolland> you need to remove just one 2?
<jailbot> so I want to remove those three from the original dice
<Wolland> ah
dexter_ has joined #ruby
<jailbot> but I still want to count whats left
<Wolland> 3 of the same number in sequence?
<jailbot> no that roll scores zero
<jailbot> well I used .sort somewhere
<Wolland> what if it's [5,5,4,5,3]
Royalb15 has joined #ruby
<Wolland> I see
dawkirst has quit [Ping timeout: 240 seconds]
<jailbot> then .delete is fine because there are only 3
<jailbot> but when there are 4 it deletes a dice roll that should be scored
<Wolland> sure
<Wolland> how many total rolls will there be?
<Wolland> same number or vary?
wallerdev has joined #ruby
<jailbot> technicly there should be 5
<jailbot> but some only have 1
<Wolland> what if you have [1,3,3,3,2]
<Wolland> you need to remove all 3 3s?
<jailbot> yeah
rm_ has joined #ruby
Trynemjoel has joined #ruby
<Wolland> thinking ...
<jailbot> this is way harder than it should be
tectonic has joined #ruby
<jailbot> I really wish there was .delete and .delete_all
<Wolland> how would you use delete?
<Wolland> or delete_all
dontwork has joined #ruby
gorpon has joined #ruby
<jailbot> .delete(5) would delete one five
<jailbot> .delete_all(5) would delete all the fives
<Wolland> ok you can do that in array
absolutezeroff has joined #ruby
<Wolland> dice.delete_at(dice.find_index(5))
Tentra has joined #ruby
<Wolland> that will delete first 5
<jailbot> thats a trip
<Wolland> to delete all 5s you can use delete_if
<jailbot> wtf
<jailbot> I litterally typed that three times
rm_ has quit [Ping timeout: 252 seconds]
<jailbot> it works now
<jailbot> really gross code
<jailbot> but at least it works
<jailbot> thank you so much
<Wolland> np
dontwork has quit [Ping timeout: 276 seconds]
toastynerd has joined #ruby
toastynerd has quit [Remote host closed the connection]
vikfroberg has joined #ruby
tesuji_ has quit [Ping timeout: 252 seconds]
jailbot has quit [Quit: WeeChat 0.4.3]
tesuji has joined #ruby
Shidash has joined #ruby
b1205 has quit [Ping timeout: 264 seconds]
KLVTZ has joined #ruby
jamto11 has joined #ruby
Rollabunna has quit [Remote host closed the connection]
Royixc has quit [Read error: Connection reset by peer]
_JokerDoom has quit [Read error: Connection reset by peer]
alxgnon has quit []
jamto11 has quit [Ping timeout: 240 seconds]
Wolland has quit []
Tentra has quit [Remote host closed the connection]
sunya7a has joined #ruby
Tentra has joined #ruby
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alexju has joined #ruby
JokerDoom has joined #ruby
SCommette has joined #ruby
learner1 has joined #ruby
sski has joined #ruby
kilk_ has joined #ruby
b1205 has joined #ruby
feature_creep has quit [Quit: feature_creep]
sunya7a has quit [Ping timeout: 240 seconds]
learner has quit [Ping timeout: 255 seconds]
tesuji has quit [Ping timeout: 260 seconds]
Royalb15 has quit [Quit: Leaving]
sski has quit [Ping timeout: 252 seconds]
_sambao21 has quit [Quit: Computer has gone to sleep.]
SCommette has quit [Quit: SCommette]
sheperson has joined #ruby
sambao21 has joined #ruby
GriffinHeart has joined #ruby
hooe has quit [Remote host closed the connection]
mary5030 has joined #ruby
bthesorceror has quit [Remote host closed the connection]
yubrew has joined #ruby
GriffinHeart has quit [Ping timeout: 240 seconds]
aneong has joined #ruby
Lutece has joined #ruby
b1205 has quit [Ping timeout: 255 seconds]
fieldfirst has joined #ruby
fieldfirst has quit [Client Quit]
absolutezeroff has quit [Read error: No route to host]
yubrew has quit [Ping timeout: 255 seconds]
Lucky__ has joined #ruby
toastynerd has joined #ruby
aneong has quit [Remote host closed the connection]
zorak_ has quit [Ping timeout: 240 seconds]
Azure has quit [Ping timeout: 245 seconds]
gorpon has quit [Ping timeout: 240 seconds]
ringarin has joined #ruby
rm_ has joined #ruby
dangerousdave has joined #ruby
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
dawkirst has joined #ruby
zorak_ has joined #ruby
rm__ has joined #ruby
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krz has joined #ruby
rm_ has quit [Ping timeout: 240 seconds]
dawkirst has quit [Ping timeout: 252 seconds]
krz has quit [Read error: Connection reset by peer]
dontwork has joined #ruby
krz has joined #ruby
tectonic has quit []
rm__ has quit [Remote host closed the connection]
rm_ has joined #ruby
zorak_ has quit [Ping timeout: 240 seconds]
zorak_ has joined #ruby
dexter_ has quit [Ping timeout: 260 seconds]
lyanchih_ has joined #ruby
tectonic has joined #ruby
dontwork has quit [Ping timeout: 276 seconds]
<pontiki> if you want to remove all but one 5 in that array, why not use .uniq ?
claymore has joined #ruby
rm_ has quit [Ping timeout: 245 seconds]
Rollabunna has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
Wolland has joined #ruby
IceDragon has quit [Quit: Space~~~]
subbyyy has joined #ruby
Kricir has joined #ruby
_dotblank has joined #ruby
gruz0[russia] has joined #ruby
dexter_ has joined #ruby
aspires has quit []
vikfroberg has quit [Ping timeout: 265 seconds]
parus has quit [Read error: Connection reset by peer]
yubrew has joined #ruby
freezey has quit [Remote host closed the connection]
dexter_ has quit [Ping timeout: 240 seconds]
Eyess has quit [Ping timeout: 276 seconds]
mary5030 has quit [Remote host closed the connection]
yubrew has quit [Ping timeout: 240 seconds]
Eyes has joined #ruby
Eyes is now known as Eyess
Wolland has quit []
jimbauds has quit [Ping timeout: 245 seconds]
<Lemur> Victory is mine!
<Lemur> Introducing Pry Macros: https://github.com/baweaver/pry-macro
relix has joined #ruby
zorak_ has quit [Ping timeout: 276 seconds]
toastynerd has quit []
benzrf is now known as benzrf|offline
<pontiki> is that yours?
dexter_ has joined #ruby
<Lemur> hm?
<Lemur> Lemur == baweaver
<pontiki> yes, then ;)
<pontiki> well done
teddyp1cker has joined #ruby
<Lemur> That took longer than I thought it would
<Lemur> hence the 2am right now bit
<Lemur> thank ya
<Lemur> Working on committing to the core project fairly soon too
zorak_ has joined #ruby
learner1 is now known as learner
tessi has joined #ruby
tessi has quit [Changing host]
tessi has joined #ruby
sunya7a has joined #ruby
Rahul_Roy has joined #ruby
Azure has joined #ruby
dontwork has joined #ruby
dangerou_ has joined #ruby
brunops has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dangerousdave has quit [Ping timeout: 240 seconds]
dontwork has quit [Ping timeout: 240 seconds]
phansch has joined #ruby
learner1 has joined #ruby
sunya7a_ has joined #ruby
dexter_ has quit [Ping timeout: 264 seconds]
learner has quit [Ping timeout: 264 seconds]
jamto11 has joined #ruby
sunya7a has quit [Ping timeout: 265 seconds]
wallerdev has quit [Quit: wallerdev]
learner1 has quit [Ping timeout: 240 seconds]
ziyadb has joined #ruby
jamto11 has quit [Ping timeout: 264 seconds]
chipotle has quit [Quit: cya]
mercwithamouth has quit [Ping timeout: 240 seconds]
GriffinHeart has joined #ruby
akemrir has joined #ruby
michael_lee has joined #ruby
mercwithamouth has joined #ruby
klaut has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
narendraj has quit [Quit: Connection closed for inactivity]
yubrew has joined #ruby
GriffinHeart has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
mr_snowf1ake has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 240 seconds]
subbyyy has quit [Ping timeout: 240 seconds]
djbkd has quit [Ping timeout: 252 seconds]
krz has quit [Quit: WeeChat 0.4.3]
rm_ has joined #ruby
banjara has joined #ruby
sunya7a has joined #ruby
jack_rabbit has quit [Ping timeout: 255 seconds]
sunya7a_ has quit [Ping timeout: 240 seconds]
goGently has joined #ruby
goGently has left #ruby [#ruby]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
gruz0[russia] has quit [Quit: This computer has gone to sleep]
gruz0[russia] has joined #ruby
lyanchih has joined #ruby
rm_ has quit [Ping timeout: 264 seconds]
mijicd has joined #ruby
doev has joined #ruby
mijicd has quit [Client Quit]
rippa has joined #ruby
mijicd has joined #ruby
learner has joined #ruby
JoeGaudet has quit [Quit: Computer has gone to sleep.]
sunya7a has quit [Remote host closed the connection]
_dotblank has left #ruby [#ruby]
Tentra has quit [Ping timeout: 252 seconds]
Guest12930 has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
alexju has quit [Remote host closed the connection]
mijicd has quit [Ping timeout: 252 seconds]
dawkirst has joined #ruby
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby
dontwork has joined #ruby
mijicd has joined #ruby
dawkirst has quit [Ping timeout: 276 seconds]
tylersmith has quit [Ping timeout: 240 seconds]
dontwork has quit [Ping timeout: 265 seconds]
larsam has joined #ruby
anaeem1_ has joined #ruby
banjara has quit [Quit: Leaving.]
tectonic has quit []
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
gruz0[russia] has quit [Quit: This computer has gone to sleep]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
KLVTZ has quit [Quit: leaving]
gruz0[russia] has joined #ruby
ponga has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
Atttwww has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
klaut has quit [Remote host closed the connection]
anaeem1_ has quit [Remote host closed the connection]
anaeem1 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
djbkd has joined #ruby
mijicd has quit [Remote host closed the connection]
Ishiro has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
gruz0[russia] has quit [Quit: Leaving]
sheperson has quit [Read error: No route to host]
djbkd has quit [Ping timeout: 252 seconds]
spider-mario has joined #ruby
Kricir has quit [Remote host closed the connection]
narendraj has joined #ruby
kaleido has quit [Ping timeout: 240 seconds]
rm_ has joined #ruby
atmosx has joined #ruby
Loaft has joined #ruby
dangerou_ has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
Shidash has quit [Ping timeout: 264 seconds]
fantasticsid has joined #ruby
doev has quit [Remote host closed the connection]
rm_ has quit [Ping timeout: 240 seconds]
doev has joined #ruby
doev has quit [Remote host closed the connection]
klaut has joined #ruby
tvw has joined #ruby
mijicd has joined #ruby
doev has joined #ruby
donpepp has joined #ruby
jongilbraith has joined #ruby
andrewlio has joined #ruby
claymore has quit [Ping timeout: 252 seconds]
teddyp1cker has joined #ruby
jongilbraith has quit [Client Quit]
claymore has joined #ruby
Vivekananda has quit [Read error: Connection reset by peer]
yeticry_ has quit [Read error: Connection reset by peer]
jezen has joined #ruby
yeticry has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dontwork has joined #ruby
dangerousdave has joined #ruby
steveeJ has joined #ruby
dontwork has quit [Ping timeout: 260 seconds]
donpepp has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
jamto11 has joined #ruby
<steveeJ> hello there, i'm trying to deploy omnigollum (https://github.com/arr2036/omnigollum) with unicorn and nginx within a user's rvm environment. i'm not familar with ruby applications n'or do i speak ruby. i'm having a hard time understanding the basic structure my setup is supposed to have. my biggest confusion are the config.r{u,b} files. do i need both still?
frosgy has joined #ruby
yubrew has joined #ruby
donpepp has joined #ruby
GriffinHeart has quit [Ping timeout: 240 seconds]
Hobogrammer has quit [Ping timeout: 240 seconds]
frogssgy has quit [Ping timeout: 240 seconds]
Martxel has joined #ruby
jamto11 has quit [Ping timeout: 252 seconds]
nfk has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
doev has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
obs has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
Wessie_442 has joined #ruby
Martxel has quit [Ping timeout: 252 seconds]
brunops has quit [Ping timeout: 240 seconds]
ziyadb has quit [Quit: Connection closed for inactivity]
Wessie_442 has quit [Quit: Bye]
donpepp has quit [Remote host closed the connection]
claymore has quit [Ping timeout: 276 seconds]
lkba has quit [Ping timeout: 276 seconds]
lyanchih has quit [Quit: lyanchih]
jhass|off is now known as jhass
VTLob has joined #ruby
rampert has joined #ruby
Solnse has quit [Ping timeout: 252 seconds]
daixtr has joined #ruby
<daixtr> what's ruby's equivalent to perl's CPAN ?
akemrir has quit [Quit: WeeChat 0.4.3]
maroloccio has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
rm_ has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
daixtr has quit [Quit: leaving]
xcv has joined #ruby
<apeiros> hurray for goldfish attentionspan…
claymore has joined #ruby
rm_ has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
steveeJ has quit [Ping timeout: 252 seconds]
ponga has quit []
teddyp1cker has joined #ruby
einarj has joined #ruby
parus has joined #ruby
Solnse has joined #ruby
cgj has joined #ruby
<cgj> join nodejs
sheperson has joined #ruby
_srid has joined #ruby
JPascal has joined #ruby
brunops has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
mikecmpbll has joined #ruby
Trynemjoel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_srid has quit [Remote host closed the connection]
steveeJ has joined #ruby
brunops has quit [Ping timeout: 245 seconds]
Hanmac1 has quit [Ping timeout: 245 seconds]
klaut has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dontwork has joined #ruby
dangerousdave has joined #ruby
Eyess has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
Eyes has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
SHyx0rmZ has joined #ruby
Eyes is now known as Eyess
yubrew has joined #ruby
xcv has quit [Ping timeout: 240 seconds]
Solnse has quit [Ping timeout: 276 seconds]
dontwork has quit [Ping timeout: 255 seconds]
SHyx0rmZ has quit [Ping timeout: 265 seconds]
moritzs has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
xcv has joined #ruby
agjacome has quit [Quit: leaving]
Xeago has joined #ruby
klaut has quit [Remote host closed the connection]
LnL has joined #ruby
LnL is now known as Guest31929
kirun has joined #ruby
rahul1111111 has joined #ruby
Solnse has joined #ruby
davedev24_ has joined #ruby
rahul1111111 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
apollo_cmd has joined #ruby
<kilk_> hi, what orm for ruby u can recomend?
djbkd has joined #ruby
fgo has joined #ruby
<apollo_cmd> Rub Juice
Ishiro has quit [Quit: Computer has gone to sleep.]
Ishiro has joined #ruby
djbkd has quit [Ping timeout: 264 seconds]
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
rm_ has joined #ruby
sheperson has quit [Ping timeout: 260 seconds]
yonahw has quit [Remote host closed the connection]
sheperson has joined #ruby
timonv has joined #ruby
maximski has joined #ruby
rm_ has quit [Ping timeout: 276 seconds]
apollo_cmd has quit [Remote host closed the connection]
<atmosx> kilk_: if you're not in rails, sequel.
<atmosx> s/in/on
sheperson has quit [Ping timeout: 252 seconds]
dontwork has joined #ruby
sheperson has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
Trynemjoel has joined #ruby
AlexRussia has quit [Read error: Connection reset by peer]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brunops has joined #ruby
timonv has quit [Ping timeout: 245 seconds]
Photism has joined #ruby
dontwork has quit []
Ishiro has quit [Quit: Lingo - http://lingoirc.com]
teddyp1c_ has joined #ruby
GriffinHeart has joined #ruby
teddyp1cker has quit [Ping timeout: 264 seconds]
<steveeJ> still very confused about ruby application deployment. i have omnigollum setup which i can run using "gollum --config config.rb" inside the omnigollum directory. however, i can't get unicorn to load that application
yubrew has joined #ruby
xcv has quit [Remote host closed the connection]
GriffinHeart has quit [Ping timeout: 255 seconds]
dawkirst has joined #ruby
tvw has quit []
yubrew has quit [Ping timeout: 240 seconds]
<atmosx> what is omnigolum?!
<steveeJ> it's a gollum fork, allowing authentication through omniauth plugins
DaniG2k has joined #ruby
<steveeJ> i seemed to miss a require in my config.ru, that is not needed in the config.rb
<steveeJ> that was 'gollum/app'
Xeago has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 240 seconds]
ixti has joined #ruby
jamto11 has joined #ruby
narendraj has quit [Quit: Connection closed for inactivity]
jamto11 has quit [Ping timeout: 264 seconds]
AlexRussia has joined #ruby
beneggett has quit [Ping timeout: 245 seconds]
beneggett has joined #ruby
phoo1234567 has joined #ruby
fgo has quit [Remote host closed the connection]
fgo has joined #ruby
djbkd has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
klaut has joined #ruby
dangerousdave has joined #ruby
chrisseaton has joined #ruby
d0lph1n98 has joined #ruby
<d0lph1n98> hello
djbkd has quit [Ping timeout: 276 seconds]
skaflem has joined #ruby
klaut has quit [Ping timeout: 260 seconds]
rm_ has joined #ruby
krz has joined #ruby
anaeem1 has joined #ruby
<atmosx> helo
einarj has quit [Remote host closed the connection]
rm_ has quit [Ping timeout: 245 seconds]
Takle has quit [Remote host closed the connection]
gizmore has quit [Ping timeout: 240 seconds]
jezen has quit [Remote host closed the connection]
jezen has joined #ruby
eka has joined #ruby
Takle has joined #ruby
fgo has quit [Remote host closed the connection]
xcv has joined #ruby
timfoo has quit [Ping timeout: 260 seconds]
fantasticsid has quit [Remote host closed the connection]
yubrew has joined #ruby
sepp2k has joined #ruby
xcv has quit [Ping timeout: 260 seconds]
<mostlybadfly> good morning
xcv has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
<apeiros> mostlybadfly: means there's no game.rb in any of the directories listed in $LOAD_PATH (and neither in any installed gem)
timfoo has joined #ruby
<apeiros> note that . is not in $LOAD_PATH.
Takle has quit [Remote host closed the connection]
<mostlybadfly> hmm ok
havenwood has quit [Remote host closed the connection]
Loaft has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
jezen has quit [Remote host closed the connection]
hermanmu_ has quit [Remote host closed the connection]
hermanmunster has joined #ruby
hermanmunster has quit [Read error: Connection reset by peer]
Takle has joined #ruby
hermanmunster has joined #ruby
<mostlybadfly> apeiros: would it be best to add it there?
<mostlybadfly> i see if i add the exact path from my home directory that it works
Loaft has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
dawkirst has joined #ruby
lkba has joined #ruby
ixti has quit [Ping timeout: 255 seconds]
einarj has joined #ruby
dawkirst has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
einarj has quit [Ping timeout: 252 seconds]
banister has joined #ruby
blacksails has joined #ruby
phansch has quit [Quit: WeeChat 0.4.3]
havenwood has joined #ruby
DaniG2k has quit [Ping timeout: 265 seconds]
jezen has joined #ruby
d0lph1n98 has left #ruby [#ruby]
Trynemjoel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
chrisseaton has quit []
fgo has joined #ruby
thomasxie has joined #ruby
obs has quit [Remote host closed the connection]
klaut has joined #ruby
mehlah has joined #ruby
SilverKey has joined #ruby
anaeem1 has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
<jhass> mostlybadfly: you could also start your game with ruby -Ilib main.rb or even ruby -I. main.rb if you have no folder structure
anaeem1_ has quit [Remote host closed the connection]
yfeldblu_ has quit [Remote host closed the connection]
tessi has quit [Ping timeout: 265 seconds]
rm_ has joined #ruby
timonv has joined #ruby
jezen has quit []
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
eldina_ has joined #ruby
lxsameer has quit [Quit: Leaving]
rm_ has quit [Ping timeout: 260 seconds]
Guest12930 has quit [Quit: Guest12930]
einarj has joined #ruby
yacks has quit [Ping timeout: 276 seconds]
GriffinHeart has joined #ruby
RaptorJesus has quit [Ping timeout: 272 seconds]
tessi has joined #ruby
yubrew has joined #ruby
Baked has joined #ruby
Lo^08 has joined #ruby
einarj has quit [Ping timeout: 252 seconds]
Loaft has quit [Read error: Connection reset by peer]
Lo^08 is now known as Loaft
Baked has quit [Read error: Connection reset by peer]
sheperson has quit [Ping timeout: 252 seconds]
GriffinHeart has quit [Ping timeout: 240 seconds]
DaniG2k has joined #ruby
sheperson has joined #ruby
fgo has quit [Remote host closed the connection]
<mostlybadfly> ah ok thanks jhass
rOOb has quit [Ping timeout: 252 seconds]
jackneill has joined #ruby
yubrew has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
DaniG2k has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
ponga has joined #ruby
linuxnewb2 has quit [Quit: Leaving]
timonv has quit [Ping timeout: 264 seconds]
SilverKey has quit [Quit: Halted.]
sheperson has quit [Ping timeout: 255 seconds]
sheperson has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
Soda has joined #ruby
freerobby has joined #ruby
alem0lars has joined #ruby
sheperson has quit [Client Quit]
AlterDim has joined #ruby
yfeldblum has joined #ruby
xcv_ has joined #ruby
jamto11 has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
Takle has quit [Remote host closed the connection]
xcv has quit [Ping timeout: 240 seconds]
jamto11 has quit [Ping timeout: 252 seconds]
ringarin has quit [Quit: Leaving]
claymore has joined #ruby
ra4king1 has joined #ruby
virtualsue has joined #ruby
NukePuppy has joined #ruby
ra4king has quit [Ping timeout: 255 seconds]
klaut has quit [Remote host closed the connection]
Rahul_Roy has quit [Quit: Connection closed for inactivity]
gorpon has joined #ruby
doodlehaus has joined #ruby
Doppp has quit [Ping timeout: 264 seconds]
thomasxie has quit [Quit: Leaving.]
pavelz has quit [Quit: leaving]
bmurt has joined #ruby
mary5030 has joined #ruby
bmurt has quit [Client Quit]
_808chris has joined #ruby
fayimora has quit [Quit: Connection closed for inactivity]
<_808chris> Mornin, I'm running minitest via rake and I can get the tests to run but at the end Rake is producing some errors. I've copied the errors to a paste here http://pastebin.com/vb1Jm2eb
bmurt has joined #ruby
fgo has joined #ruby
rm_ has joined #ruby
thomasxie has joined #ruby
<_808chris> I'm just not sure what the problem is
fgo has quit [Client Quit]
<_808chris> My rake task has this inside files = File.expand_path(File.dirname(__FILE__) + '/spec/**/*_spec.rb'); test.test_files = FileList[files]
yubrew has joined #ruby
rm_ has quit [Ping timeout: 240 seconds]
Deele has quit [Quit: User excited]
yacks has joined #ruby
t0rc has joined #ruby
NukePuppy has quit [Ping timeout: 252 seconds]
naw has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
bahar has joined #ruby
bahar has quit [Changing host]
bahar has joined #ruby
frem_ has joined #ruby
Rickmasta has quit [Ping timeout: 276 seconds]
mary5030 has quit [Remote host closed the connection]
<_808chris> ok nvm, looks like this is what is supposed to happen when test fail
absolutezeroff has joined #ruby
r0ok has quit [Ping timeout: 276 seconds]
JoeGaudet has joined #ruby
frem_ has quit [Ping timeout: 260 seconds]
doodlehaus has quit [Remote host closed the connection]
doodlehaus has joined #ruby
doodlehaus has quit [Read error: Connection reset by peer]
doodlehaus has joined #ruby
doodlehaus has quit [Remote host closed the connection]
sambao21 has joined #ruby
SCommette has joined #ruby
doodlehaus has joined #ruby
SCommette has quit [Client Quit]
obs has joined #ruby
wm3|away has joined #ruby
lyanchih_ has joined #ruby
yfeldblum has joined #ruby
Rickmasta has joined #ruby
bthesorceror has joined #ruby
bthesorceror has quit [Remote host closed the connection]
chris123456789 has joined #ruby
bthesorceror has joined #ruby
doodlehaus has quit [Ping timeout: 240 seconds]
anaeem1_ has joined #ruby
eldina_ has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 260 seconds]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
thomasxie has quit [Quit: Leaving.]
momomomomo has joined #ruby
pontiki has joined #ruby
thomasxie has joined #ruby
thomasxie has quit [Remote host closed the connection]
mikesplain has joined #ruby
ari-_-e has quit [Ping timeout: 252 seconds]
<pontiki> hi
ari-_-e has joined #ruby
Takle has joined #ruby
<shevy> hey pontiki
mikesplain has quit [Ping timeout: 245 seconds]
maximski has quit []
Hanmac1 has joined #ruby
timonv has joined #ruby
JoeGaudet has quit [Quit: Computer has gone to sleep.]
Hanmac has quit [Ping timeout: 252 seconds]
bmurt has quit []
djbkd has joined #ruby
<pontiki> hello
carraroj has joined #ruby
kaleido has joined #ruby
kaleido has quit [Changing host]
kaleido has joined #ruby
Hanmac has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
t0rc has left #ruby ["WeeChat 0.4.3"]
<momomomomo> hello
GriffinHeart has joined #ruby
anaeem1_ has quit [Read error: Connection reset by peer]
kilk_ has quit [Ping timeout: 265 seconds]
djbkd has quit [Ping timeout: 240 seconds]
Hanmac1 has quit [Ping timeout: 260 seconds]
shevy has quit [Ping timeout: 276 seconds]
yubrew has joined #ruby
kilk_ has joined #ruby
chrisseaton has joined #ruby
anaeem1_ has joined #ruby
dangerou_ has joined #ruby
rm_ has joined #ruby
GriffinHeart has quit [Ping timeout: 252 seconds]
iamayam has quit [Ping timeout: 252 seconds]
yubrew has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
rm_ has quit [Ping timeout: 240 seconds]
Hawk554 has joined #ruby
kaspergrubbe has joined #ruby
nszceta has joined #ruby
einarj has joined #ruby
Soda has quit [Remote host closed the connection]
kaspergr_ has quit [Ping timeout: 252 seconds]
Hawk554 has left #ruby [#ruby]
sski has joined #ruby
klaut has joined #ruby
chris123456789 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
qwyeth has quit [Ping timeout: 252 seconds]
rm_ has joined #ruby
yakko_ has quit [Ping timeout: 252 seconds]
einarj has quit [Ping timeout: 240 seconds]
tensor has joined #ruby
obs has quit [Remote host closed the connection]
vo_id has joined #ruby
Eyess has quit [Quit: Leaving]
Solnse has quit [Remote host closed the connection]
Eyes has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
Hanmac1 has joined #ruby
yfeldblum has joined #ruby
wm3|away has quit [Ping timeout: 265 seconds]
Hanmac has quit [Ping timeout: 252 seconds]
lethe has quit [Remote host closed the connection]
amargherio has joined #ruby
tensor has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
DaniG2k has joined #ruby
Hanmac has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
Hanmac1 has quit [Ping timeout: 264 seconds]
<Hanmac> ping havenwood
<havenwood> Hanmac: pong
rm_ has quit [Remote host closed the connection]
_808chris has quit [Ping timeout: 240 seconds]
<Hanmac> havenwood: DoctorWho?
Guest31929 has quit [Quit: ZNC - http://znc.in]
rm_ has joined #ruby
<Morrolan> Nono, you're doing it wrong. You're supposed to start with *knock knock*
<havenwood> Hanmac: 3/4 way through EoT Part 1
<havenwood> 3/4r
<Hanmac> yey!
LnL has joined #ruby
LnL is now known as Guest7303
Guest7303 has quit [Read error: Connection reset by peer]
mijicd has quit [Remote host closed the connection]
<Hanmac> havenwood: what do you think about the Masters new skills?
rm_ has quit [Ping timeout: 245 seconds]
jamto11 has joined #ruby
IceDragon has joined #ruby
mikecmpbll has joined #ruby
atmosx has quit [Quit: Lost in trance]
byteoverfl0w has joined #ruby
Mon_Ouie has quit [Ping timeout: 265 seconds]
jamto11 has quit [Ping timeout: 255 seconds]
IceDragon has quit [Ping timeout: 255 seconds]
IceDragon has joined #ruby
iamayam has joined #ruby
chrisseaton has quit []
nh_99 has joined #ruby
sski has quit [Remote host closed the connection]
<nh_99> Does anybody have time to answer a quick Ruby question for me?
<jhass> nh_99: you won't find out without asking it
sski has joined #ruby
chrisseaton has joined #ruby
<nh_99> jhass: A very god point :)
<nh_99> I was wondering if it is possible to put a # character into a string
Hanmac1 has joined #ruby
<nh_99> Currently it just comments the rest of that line out
<pontiki> then you aren't putting that # inside the quotes
<jhass> no it doesn't, that might just be your syntax highlighting
<pontiki> >> "hi#there"
<eval-in_> pontiki => "hi#there" (https://eval.in/157551)
<Morrolan> >> s = "This # is a test"; puts s
<eval-in_> Morrolan => This # is a test ... (https://eval.in/157552)
<jhass> oO
<jhass> eval-in_ has another silly day?
<jhass> nvm
<Morrolan> Hmm? Seems to work the way it should?
<jhass> why you have the same color in my client... m(
<pontiki> must something in the air; similar question was asked last night
<Morrolan> jhass: Oh, hehe.
<nh_99> Oh, alright :)
<nh_99> Thanks
<Morrolan> nh_99: Out of curiosity - what editor are you using? :)
<pontiki> i planned it that way, jhass
__main__ has quit [Read error: Connection reset by peer]
_main_ has joined #ruby
<nh_99> Morrolan: I am using nano
<jhass> pontiki: cooking with wine, I think I know what might be in the air...
<pontiki> hee
<pontiki> you and julia in the kitchen
<Morrolan> Ah. (:
timonv has joined #ruby
Hanmac has quit [Ping timeout: 255 seconds]
josemota has joined #ruby
Loaft has quit [Ping timeout: 265 seconds]
timonv has quit [Remote host closed the connection]
nh_99 has left #ruby ["Leaving"]
<josemota> hey everyone, quick question: what library is best to start learning about ncurses?
<havenwood> Hanmac1: "These people are so... flat."
sski has quit [Ping timeout: 264 seconds]
timonv has joined #ruby
LnL has joined #ruby
Hanmac1 is now known as Hanmac
_main_ is now known as __main__
LnL is now known as Guest10518
<Lemur> https://github.com/baweaver/pry-macro - Just released Pry Macro
crazymykl has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
Loaft has joined #ruby
shevy has joined #ruby
mikemac has quit [Read error: Connection reset by peer]
yubrew has joined #ruby
arrubin has joined #ruby
<shevy> I think my computer is dying
djbkd has joined #ruby
vlad_starkov has joined #ruby
Baked has joined #ruby
<tobiasvl> RIP
yubrew has quit [Ping timeout: 255 seconds]
<shevy> :(
<havenwood> shevy: uh oh
Shidash has joined #ruby
Loaft has quit [Ping timeout: 245 seconds]
<shevy> at first I thought it was a faulty HDD but even after replacing the HDD several times, it can't all be failing at the same time, something must be weird with the machine itself
<pontiki> power supply?
djbkd has quit [Ping timeout: 252 seconds]
<pontiki> if several things fail at once, and discs fail repetedly, i'd look into replacing the power supply
<shevy> hmm
krz has quit [Quit: WeeChat 0.4.3]
<pontiki> is this a desktop machine?
Kricir has joined #ruby
byteoverfl0w has quit [Remote host closed the connection]
<shevy> yeah
<shevy> my main machine here
<shevy> I have a laptop but it's small and crappy
aneong has joined #ruby
josemota has left #ruby [#ruby]
Hanmac has quit [Ping timeout: 265 seconds]
klaut has quit [Remote host closed the connection]
dseitz has joined #ruby
<shevy> cool
<shevy> I am digging through old stuff right now
anaeem1_ has quit [Remote host closed the connection]
Hanmac has joined #ruby
<shevy> apparently I started my main .sh file about 10 years ago
<Hanmac> havenwood: "These people are so... flat." .... for some reason i didnt get the reference
<shevy> flatworld!
<havenwood> Hanmac: the green spiky skinned girl said to green spiky skinned guy as they morphed
jimbauds has joined #ruby
<Hanmac> ahh ok ;P you said "green spiky" because "cacti" would be rassist, ne? ;P
DaniG2k has quit [Ping timeout: 252 seconds]
__class__ has quit [Read error: Connection reset by peer]
james_d_h has joined #ruby
sski has joined #ruby
yfeldblum has joined #ruby
AlterDim has quit [Quit: leaving]
lkba has quit [Ping timeout: 240 seconds]
rm_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
apollo_cmd has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
dangerou_ has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
wallerdev has joined #ruby
__class__ has joined #ruby
lyanchih has joined #ruby
lyanchih_ has quit [Ping timeout: 252 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
sambao21 has joined #ruby
atmosx has joined #ruby
RaptorJesus has joined #ruby
kireevco has joined #ruby
aneong has left #ruby [#ruby]
IcyDragon has joined #ruby
IceDragon has quit [Ping timeout: 264 seconds]
sski has quit [Ping timeout: 240 seconds]
xcesariox has joined #ruby
Hanmac1 has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
xcv_ has quit [Remote host closed the connection]
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
Hanmac has quit [Ping timeout: 276 seconds]
rm_ has quit [Read error: Connection reset by peer]
rm_ has joined #ruby
Royalb15 has joined #ruby
angusiguess has joined #ruby
ascarter has joined #ruby
chipotle has joined #ruby
apollo_cmd has quit [Remote host closed the connection]
chrisramon has joined #ruby
agjacome has joined #ruby
IceDragon_ has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
havenn has joined #ruby
ponga has quit []
IcyDragon has quit [Ping timeout: 255 seconds]
GeorgesLeYeti has joined #ruby
GeorgesLeYeti has quit [Quit: Quitte]
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti> Hi
Baked has quit [Ping timeout: 260 seconds]
<jhass> hi
Kricir has quit [Remote host closed the connection]
<GeorgesLeYeti> I want to replace into a string every double space by a single space. If i make gsub(' ', ' ') it works but if i have triple space i'll still having a double
<GeorgesLeYeti> (sry for my english)
<jhass> do you have activesupport in your project?
<DouweM> right. so what you actually want is to replace any number of consecutive spaces by a single space? notice the difference between "any number" and "two" ;)
<havenn> >> "single double triple end".squeeze(' ')
<eval-in_> havenn => "single double triple end" (https://eval.in/157554)
<GeorgesLeYeti> jhass: yes
<jhass> Have a look at String#squish then
<GeorgesLeYeti> DouweM: yes
<jhass> oh, we have squeeze now, right
<jhass> GeorgesLeYeti: Have a look at String#squeeze
<GeorgesLeYeti> jhass: no ty i'll take a look
Kricir has joined #ruby
GriffinHeart has joined #ruby
<GeorgesLeYeti> havenn: ty too
Grundell has joined #ruby
<Grundell> Hello
x1337807x has joined #ruby
<Grundell> So im planing to create a subscription site and since this is going to be my first real rails project i was wondering if there is a foundation to start from ?
brunops has quit [Changing host]
brunops has joined #ruby
IceDragon_ has quit [Ping timeout: 276 seconds]
<jhass> Grundell: for rails support please join #rubyonrails
<Grundell> OK thanks
Royixc has joined #ruby
Royixc has quit [Max SendQ exceeded]
GriffinHeart has quit [Ping timeout: 252 seconds]
<Grundell> jhass: Get error 477 that i cant join channle since im not identified with the services.
<Grundell> How to o get identified with the services
<Grundell> ?
<jhass> you need to be registered, as the message says, check /msg NickServ help
synfin_ has quit [Quit: leaving]
lethe has joined #ruby
<shevy> Grundell you can register; for instance /msg nickserv identify YOUR_PASSWORD_WILL_THEN_GO_HERE
Lutece has quit [Ping timeout: 272 seconds]
<shevy> I mean, identify after register
rkazak has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_808chris has joined #ruby
blacksails has quit [Quit: Lingo - http://lingoirc.com]
blacksails has joined #ruby
lethe has quit [Ping timeout: 252 seconds]
thecodethinker has joined #ruby
Xeago has joined #ruby
<thecodethinker> Hey, I'm trying to write a little extension with rice but I can't figure out how to use have_library to check if a function exists within a class.
frem has joined #ruby
<thecodethinker> Does anyone here know how to do that?
virtualsue has quit [Ping timeout: 252 seconds]
IceDragon_ has joined #ruby
Atttwww has joined #ruby
freerobby has quit [Quit: Leaving.]
amargherio has quit [Read error: Connection reset by peer]
drizz_ has quit [Quit: Reconnecting]
drizz has joined #ruby
_808chris has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
Lucky__ has joined #ruby
luckyruby has joined #ruby
yfeldblum has joined #ruby
Lucky__ has quit [Client Quit]
ra4king1 is now known as ra4king
thecodethinker has quit [Ping timeout: 255 seconds]
Doppp has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
freerobby has joined #ruby
tacos1de has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
tacos1de has joined #ruby
EatMulti has joined #ruby
EatMulti has quit [Client Quit]
yfeldblum has quit [Ping timeout: 240 seconds]
dayepa has quit [Ping timeout: 276 seconds]
<shevy> have_library('foo') # -lfoo
<shevy> if have_library("ole32") and have_library("oleaut32")
<jhass> (he's gone)
<shevy> awwwww
ziyadb has joined #ruby
<atmosx> How can I display the arguments of a hash that are not nil? Is there any quick way?
<atmosx> I wonder how update works in Rails hm
Lucky__ has joined #ruby
<toertore> you mean values?
bmurt has quit []
<jhass> .values.compact.size ?
<atmosx> yes
<toertore> various enumerable methods should help with that
<atmosx> I know, I could iterate and check, but I wonder if there was any faster/other way
<jhass> .values.compact.size
<atmosx> jhass: talking to me?!
<jhass> sure
<atmosx> ah k
<atmosx> :D
Kricir has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 276 seconds]
sleepee has joined #ruby
coderhs has joined #ruby
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
Vivekananda has joined #ruby
jemendja has joined #ruby
mr_snowf1ake has joined #ruby
rm_ has quit [Ping timeout: 264 seconds]
jemendja has quit [Quit: leaving]
sigurding has joined #ruby
m8 has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
jamto11 has joined #ruby
<atmosx> I'm trying to update a hash here https://gist.github.com/atmosx/3ae5a40d15cb35b5e388 ... wanna update only the values that match (and have changed, although I don't do that check yet).
<atmosx> doesn't work though
timonv has joined #ruby
bmurt has joined #ruby
<Morrolan> Hash[] wants an array of arrays, each sub-array should contain the key, and the value.
<Morrolan> Not sure about your assignment `value = h2[...]`, either. Modifying a local variable?
<atmosx> yeah, works with hash.update...
<atmosx> but not with Hash[], I'm still not familiar with these techniques hm :-/ ty
jamto11 has quit [Ping timeout: 255 seconds]
Morrolan has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
Morrolan has joined #ruby
Morrolan has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
Morrolan has joined #ruby
dawkirst has joined #ruby
yubrew has joined #ruby
<Morrolan> ****, that's what you get for using a console-based client one time, and a GUI-based one the next...
timonv has quit [Ping timeout: 260 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
<mostlybadfly> so i have a big case statement within a main_menu method, is this normal or would it be best to just make define each task as a method?
<Morrolan> >> ary = [['a', 1],['b', 2],['c', 3]]; p Hash[ary]
<eval-in_> Morrolan => {"a"=>1, "b"=>2, "c"=>3} ... (https://eval.in/157559)
dangerou_ has joined #ruby
<Morrolan> atmosx: That's how you'd use Hash[] ^
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<atmosx> yeah
chrisramon has quit [Quit: chrisramon]
<Morrolan> For your use case I'd just go with Hash#merge
<atmosx> Morrolan: I didn' even knew a method calledmerge existed might be exactly what I need
<Morrolan> :)
<shevy> mostlybadfly if you have to check against several input then sure, big case menu is likely a way to go about it
<Morrolan> h1.merge(h2) will update h1 with the contents of h2. Optionally you can supply a block, to determine what to do in case of duplicates, I believe.
Takle has joined #ruby
<mostlybadfly> shevy: this is what I did under the main menu. I'm sure there is a lot I could be simplying here too. https://gist.github.com/mostlybadfly/83e035b33a988a35fd2b
mikecmpbll has quit [Quit: i've nodded off.]
yubrew has quit [Ping timeout: 276 seconds]
wm3|away has joined #ruby
<shevy> well
<shevy> what I dont like is that you have a mandatory gets
dawkirst has quit [Ping timeout: 245 seconds]
<shevy> I'd rather move task = gets.chomp into the first argument to the method
<shevy> also you should indent case and when on the same line
<shevy> | vertical line that is |
<mostlybadfly> shevy what do you mean by mandatory gets?
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Spaceghostc2c> mostlybadfly: You must give input, you cannot passively observe.
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
<Spaceghostc2c> It's almost like an artistic portrayal of the social web.
Takle has quit [Ping timeout: 245 seconds]
<mostlybadfly> but in this case I would want someone to say what they want to do no?
<shevy> mostlybadfly whenever you call that menu, gets is used
<shevy> so if at some later point you want to do something like:
<shevy> your_object.menu('buy archer')
<shevy> it'll query interactively
<shevy> I have had that with gem install lately; I installed my local gems
jheg_ has joined #ruby
<shevy> then gem interrupted "dia conflicts with blablabla, do you want to overwrite it? [y/N]"
<shevy> that stupid thing halted the whole batch installation of gems until I typed y
<shevy> though luckily, via --force those queries will go away with gem
<mostlybadfly> so i'd be able to do something like your_object.menu('add') or something your saying?
<mostlybadfly> just making sure i understand
<mostlybadfly> you're*, I've been bad about that lately :P
<shevy> sure
b1205 has joined #ruby
meatherly has joined #ruby
<shevy> right now you have no argument
Hobogrammer has joined #ruby
phansch has joined #ruby
sinkensabe has joined #ruby
wallerdev has quit [Quit: wallerdev]
rm_ has joined #ruby
<mostlybadfly> you mean for main_menu?
<mostlybadfly> i think i get what you're saying
<atmosx> mostlybadfly: probably a hash to display a meny in a sinatra application
<atmosx> mostlybadfly: or array
<atmosx> s/meny/menu
* atmosx needs to get some fresh air
sepp2k has quit [Read error: Connection reset by peer]
wm3|away has quit [Ping timeout: 276 seconds]
sepp2k has joined #ruby
marr has joined #ruby
beneggett has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
virtualsue has joined #ruby
sinkensabe has quit [Remote host closed the connection]
lyanchih has quit [Quit: lyanchih]
mercwithamouth has quit [Ping timeout: 252 seconds]
<shevy> Hanmac1 this is so insane
motto has joined #ruby
<shevy> mostlybadfly yeah of course
m8tt8 has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
m8 has quit [Ping timeout: 276 seconds]
james_d_h has quit [Quit: leaving]
Hanmac1 is now known as Hanmac
motto has quit [Ping timeout: 252 seconds]
vee has joined #ruby
yfeldblum has joined #ruby
aneong has joined #ruby
Solnse has joined #ruby
GeorgesLeYeti has quit [Ping timeout: 252 seconds]
anaeem1 has joined #ruby
lyanchih_ has joined #ruby
chrisramon has joined #ruby
bmurt has quit []
gorpon has quit [Ping timeout: 260 seconds]
rkazak has quit [Quit: rkazak]
claymore has quit [Ping timeout: 260 seconds]
Takle has joined #ruby
Takle has quit [Read error: Connection reset by peer]
GeorgesLeYeti has joined #ruby
Takle has joined #ruby
claymore has joined #ruby
DaniG2k has joined #ruby
AndChat|102836 has joined #ruby
wallerdev has joined #ruby
danijoo has joined #ruby
feature_creep has joined #ruby
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
m8tt8 has quit [Quit: Sto andando via]
m8 has joined #ruby
mary5030 has joined #ruby
atmosx has quit [Quit: Lost in trance]
GriffinHeart has joined #ruby
yakko has joined #ruby
rm_ has quit [Ping timeout: 265 seconds]
akonny has joined #ruby
yubrew has joined #ruby
SCommette has joined #ruby
benzrf|offline is now known as benzrf
kireevco has quit [Quit: Leaving.]
Xeago has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iliketurtles has joined #ruby
GriffinHeart has quit [Ping timeout: 252 seconds]
rm_ has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
skaflem has quit [Quit: Leaving]
krz has joined #ruby
Mon_Ouie has joined #ruby
xcv has joined #ruby
jamto11 has joined #ruby
Solnse has quit [Ping timeout: 260 seconds]
jheg has joined #ruby
Solnse has joined #ruby
george2 has quit [Remote host closed the connection]
george2 has joined #ruby
setra has joined #ruby
AndChat|102836 has quit [Read error: Connection reset by peer]
kireevco has joined #ruby
retnuh has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
poguez_ has joined #ruby
retnuh has quit [Max SendQ exceeded]
glen has joined #ruby
<glen> hey. any ideas wtf is wrong here?
rm_ has quit [Remote host closed the connection]
chris123456789 has joined #ruby
rm_ has joined #ruby
aneong has left #ruby [#ruby]
krupino has joined #ruby
klaut has joined #ruby
krupino has left #ruby [#ruby]
<glen> my ruby 2.0 build broken? or that's not correct usage?
<Hanmac> glen did you read the docs? "Note that case sensitivity depends on your system (so File::FNM_CASEFOLD is ignored)"
<Hanmac> glen "*" is parsed by your bash too, you need to escape it with \* ... thats what i think
<glen> no, * is escaped by bash already by single quotes
kirun has quit [Read error: Connection reset by peer]
<glen> Hanmac: and no, i did not read the docs, because this failing ruby fragment is from ruby2.0 tarball
rm_ has quit [Ping timeout: 255 seconds]
kirun has joined #ruby
nszceta_ has joined #ruby
<glen> and if the flag is supposed to be ignored, why i'm given exception?
sigurding has quit [Ping timeout: 252 seconds]
banisterone has joined #ruby
tobago has joined #ruby
tobago has quit [Remote host closed the connection]
nszceta has quit [Ping timeout: 252 seconds]
sleepee has quit [Ping timeout: 252 seconds]
SCommette has quit [Quit: SCommette]
zybi1 has joined #ruby
<Hanmac> glen hm works for me, did you try a newer ruby tarball (like trunk?)
<glen> i'm particularily interested in 2.0 branch
<glen> and from that, yes, i'm using latest tarball
relix has joined #ruby
KLVTZ has joined #ruby
angusiguess has joined #ruby
meatherly has quit [Remote host closed the connection]
Grundell has quit []
<jhass> what's your locale ?
<jhass> (output of, that is)
dangerou_ has quit [Read error: Connection reset by peer]
<glen> jhass: look the paste, i enforced locale to C and UTF8, both samples are there
dangerousdave has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rampert has quit [Read error: Connection reset by peer]
<benzrf> [C
DaniG2k has quit [Ping timeout: 252 seconds]
phinfonet has joined #ruby
TorpedoSkyline has joined #ruby
DaniG2k has joined #ruby
dangerou_ has joined #ruby
chrisramon has quit [Quit: chrisramon]
dangero__ has joined #ruby
Tentra has joined #ruby
dangerousdave has quit [Ping timeout: 276 seconds]
jcarouth has quit [Excess Flood]
rm_ has joined #ruby
dangerou_ has quit [Ping timeout: 276 seconds]
alxgnon has joined #ruby
DaniG2k has quit [Ping timeout: 252 seconds]
sigurding has joined #ruby
jheg has quit [Quit: jheg]
timonv has joined #ruby
Takle has quit [Remote host closed the connection]
michael_lee has quit [Quit: Ex-Chat]
mikecmpbll has joined #ruby
AndChat|102836 has joined #ruby
banisterone has quit [Read error: Connection reset by peer]
chris123456789 has quit [Quit: Textual IRC Client: www.textualapp.com]
krz has quit [Quit: WeeChat 0.4.3]
timonv has quit [Ping timeout: 260 seconds]
eka has joined #ruby
kies has quit [Quit: baaaaiiiiiiiiiii~]
benzrf is now known as benzrf|offline
kies has joined #ruby
jhulten has joined #ruby
lethjakman has joined #ruby
freerobby has quit [Quit: Leaving.]
danshultz has joined #ruby
dawkirst has joined #ruby
<noob101> Hello.
Takle has joined #ruby
Aryasam has joined #ruby
kilk_1 has joined #ruby
kilk_ has quit [Quit: kilk_]
danshultz has quit [Read error: Connection reset by peer]
kilk_1 has left #ruby [#ruby]
Aryasam has quit [Client Quit]
danshultz has joined #ruby
Atrumx has joined #ruby
danshult_ has joined #ruby
<RubyPanther> glen: http://graysoftinc.com/character-encodings/ruby-19s-three-default-encodings you need to set your encoding, you probably have a filename with some UTF8 or other
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
sigurding has quit [Quit: sigurding]
bthesorceror has quit [Remote host closed the connection]
amclain has joined #ruby
bthesorceror has joined #ruby
<glen> RubyPanther: look again, the glob expanded by shell is in the paste, all is ASCII, and if you look again the paste you see it fails under ASCII (C) locale as well. and as i already said, the code is stright from ruby-2.0 release tarball, so the code must be accurate!
<RubyPanther> glen: ^ re-read what I said
<frosgy> Quick question: what is the name for the %w(str str str), or %r, %q, etc thing in Ruby? Does it have one?
synfin has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
<glen> RubyPanther: so you're saying OFFICIAL code is invalid?
qwyeth has joined #ruby
charliesome has joined #ruby
danshultz has quit [Ping timeout: 245 seconds]
mary5030 has joined #ruby
<RubyPanther> glen: What did I say has the problem? Put my words inside quotes and repeat back to me where I said the problem is
<noob101> What does it mean when it says `'<main>'`
<RubyPanther> noob101: It means you're not using OOP
<noob101> RubyPanther: What is OOP?
<RubyPanther> noob101: google
danshultz has joined #ruby
<noob101> Can someone please tell me what OOP is?
danshult_ has quit [Read error: Connection reset by peer]
r0ok has joined #ruby
<shevy> noob101 don't be so dumb, do you know what it stands for
<shevy> OOP
<shevy> how many words does it have
<noob101> It has three letters, words? I don't know.
<frosgy> jhass: cheers for that, making it a lot easier to look up
<noob101> Object oriented programming, I searched it up.
<jhass> frosgy: there are search engines not ignoring special characters, like symbolhound.com
<shevy> yes
mary5030 has quit [Read error: Connection reset by peer]
<shevy> 3 characters, 3 words
<noob101> But I still don't understand how me not using OOP will solve my bug. What am I suppose to do when I see `'<main>'1
chipotle has quit [Quit: cya]
<shevy> that depends on your program
<noob101> `'<main>'`*
<shevy> the way you code is by avoiding objects right now
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> so you throw everything into main
mary5030 has joined #ruby
wm3|away has joined #ruby
<shevy> imagine if everyone is doing that
<shevy> class Foo
<shevy> what happens if someone else also has the same name?
<noob101> Don't know.
<shevy> and btw
<shevy> `'<main>'`*
<shevy> is never the full error name
<shevy> so you omit information
<noob101> I know but I am asking what it means and stuff.
<RubyPanther> noob101: main is the entry point. It means you didn't go anywhere, you're still running your code in the very top container. Your code is homeless. But you should only see something like <main> when you're seeing an error.
<shevy> that's a cool sentence
<shevy> Your code is homeless.
<noob101> I have an error.
<shevy> you did not state the error
eka has joined #ruby
setra has quit [Ping timeout: 252 seconds]
kilk_ has joined #ruby
<RubyPanther> so if you see 'wrong number of arguments (0 for 2) in <main>' you can read that as, 'your homeless code couldn't afford to run the method' time to get out on the corner with a sign
reactormonk has quit [Ping timeout: 260 seconds]
jhulten has quit [Remote host closed the connection]
bthesorceror has quit [Remote host closed the connection]
anaeem1 has quit [Remote host closed the connection]
rasta-man has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lucky__ has joined #ruby
<shevy> hmm someone reminds me why I am using $stdout.flush in this old script here...
alem0lars has quit [Quit: alem0lars]
Solnse has quit [Ping timeout: 240 seconds]
kilk_ has left #ruby [#ruby]
kilk_ has joined #ruby
kilk_ has left #ruby [#ruby]
kilk_ has joined #ruby
<noob101> RubyPanther: Ah ok.
jack_rabbit has joined #ruby
<noob101> RubyPanther: this is my error: <filename>:<line number>:in '<main>': undefined method 'to_i=' for 1:Fixnum (NoMethodError)
<shevy> isn't that the same you had yesterday
<noob101> I don't know.
dawkirst has quit [Remote host closed the connection]
<noob101> but the thing about this is that the line number shows that there is an error on an else statement
<noob101> I swear it's confusing, why is that>
<noob101> ?*
kireevco has quit [Quit: Leaving.]
chrisseaton has quit []
iliketurtles has quit [Quit: zzzzz…..]
NukePuppy has joined #ruby
b1205 has quit [Ping timeout: 245 seconds]
dawkirst has joined #ruby
feature_creep has quit [Quit: feature_creep]
<shevy> no
<shevy> the error is wherever you do .to_i =
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<noob101> shevy I just do `.to_i` and then after `.to_i` I do +=
jheg has joined #ruby
aef has quit [Remote host closed the connection]
GeorgesLeYeti has quit [Ping timeout: 240 seconds]
<jhass> noob101: a += b is just another way to write a = a +b
GeorgesLeYeti has joined #ruby
<noob101> jhass: Hmmmmmm, interesting.
<jhass> so when you write a.to_i += b your code is rewritten as a.to_i = a.to_i + b
<noob101> I learned something new today jhass.
<jhass> now a.something = b is just another way to write a.something=(b)
<jhass> where something= is the name of a method
Rahul_Roy has joined #ruby
sinkensabe has joined #ruby
mijicd has joined #ruby
niharvey has quit [Ping timeout: 276 seconds]
NukePuppy has quit [Ping timeout: 255 seconds]
angusiguess has quit [Ping timeout: 255 seconds]
<jheg> o/
<jheg> is the 'then' keyword exclusively for the purpose of writing 1 line syntax?
<jhass> nobody uses then
GeorgesLeYeti has quit [Client Quit]
<jhass> if you need a oneliner use modifer-if
<jhass> if you need a value if / else use ternary
<jhass> for everything else expand it to multiple lines
niharvey has joined #ruby
<jheg> cool thanks jhass
danshultz has quit [Remote host closed the connection]
<jheg> I prefer the readability of multi line anyway
sepp2k1 has joined #ruby
danshultz has joined #ruby
<jheg> I just wanted to check that it didn't serve another purpose that was of particular importance
sepp2k has quit [Ping timeout: 255 seconds]
<jheg> is it the same story with 'unless' ?
rm_ has quit [Remote host closed the connection]
glen has left #ruby [#ruby]
<jhass> sure
<luckyruby> https://gist.github.com/luckyruby/8ca714375202abee930c Is there a better way than using `rescue nil` for nested hash access?
rm_ has joined #ruby
danshultz has quit [Read error: Connection reset by peer]
danshultz has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Morrolan> Not at all, "unless x" is a more readable way of writing "if !x"
<Morrolan> If you ask some, anyway. Others will say that it boggles their mind.
endash has joined #ruby
uTosTan has joined #ruby
<jhass> oh I though he meant unless condition then
<jhass> *thought
Xeago has joined #ruby
<jhass> luckyruby: don't do that. now/validate your input data instead
TorpedoSkyline has joined #ruby
dangero__ has quit []
<luckyruby> jhass: some of those inputs are optional though
teddyp1cker has joined #ruby
<uTosTan> Are there any Rails channels, other than #rubyonrails?
<jheg> cheers Morrolan
<jheg> rubyonrails no good?
<RubyPanther> luckyruby: If it is only the leaf nodes you can do h = Hash.new(nil) # where nil is a default value
<jheg> * #rubyonrails
<wu_> any train+rail technical chat channels (simulations, interlocking switch-networks, etc) ?
<jhass> uTosTan: not that I'm aware of
<wu_> i'm still confused as to why i'd want rails. have been since 2005. hasn't stopped their runaway success
<uTosTan> Ah, alright. Thanks
<luckyruby> RubyPanther: nori/nokogiri is what's creating the hash
<wu_> if those Github usage-charts are accurate, Ruby will be forgotten in a few years anyways as everyone goes pure JS
<luckyruby> input is an xml message that nori converts to a hash.
teddyp1c_ has quit [Ping timeout: 264 seconds]
wm3|away has quit [Ping timeout: 252 seconds]
<Morrolan> luckyruby: Deeply nested XML responses? Sounds as if you had to work with SOAP. :o
<RubyPanther> luckyruby: scaping is icky, so you might be doing okay, but jhass had the "right" answer
anaeem1 has joined #ruby
<RubyPanther> scraping
rm_ has quit [Ping timeout: 264 seconds]
<luckyruby> not scraping, Morrolan is spot on.
<luckyruby> mean to be a soap api but I couldn't get wash_out to work properly so I'm rewriting it as an xml over https webservice.
<luckyruby> s/mean/meant
<jhass> which parts exactly are optional? first level? second level? all of it?
dawkirst has quit [Ping timeout: 240 seconds]
heftig has quit [Quit: Quitting]
<luckyruby> jhass: iata
<luckyruby> which is like 6 levels deep
<RubyPanther> in the end it is less work to just instantiate objects that know about their default values, usually you can share most of the code anyways
<jhass> that's not what I mean
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<jhass> is request["POS"] always present? request["POS"]["Source"]? etc.
bthesorceror has joined #ruby
kireevco has joined #ruby
dawkirst has joined #ruby
<jhass> one sample xml input won't answer those questions
<luckyruby> request["POS"] is optional
<jhass> so if request["POS"] is present, so will ["Source"]["RequestorID"]["@ID"]?
AndChat|102836 has quit [Ping timeout: 240 seconds]
<luckyruby> I don't believe I can rely on that
xcv_ has joined #ruby
<jhass> no docs?
GriffinHeart has joined #ruby
b1205 has joined #ruby
<jhass> what are you doing if it's not present? what do you need it for?
<luckyruby> http://adriatic.pilotfish-net.com/ota-modelviewer/index.html?page=http%3A//adriatic.pilotfish-net.com/ota-modelviewer/model/Format.OTA_VehResRQ.POS.html
claymore has quit [Ping timeout: 264 seconds]
xcv has quit [Ping timeout: 252 seconds]
dingus_khan has joined #ruby
<luckyruby> iata is a vendor # we use to track who made the reservation (usually for commissions purposes)
<luckyruby> it's usually provided but sometimes not.
claymore has joined #ruby
dingus_khan has quit [Remote host closed the connection]
GriffinHeart has quit [Ping timeout: 245 seconds]
lethe has joined #ruby
lethjakman has quit [Ping timeout: 240 seconds]
alxgnon has left #ruby [#ruby]
lethe has quit [Ping timeout: 240 seconds]
virtualsue has quit [Quit: ChatZilla 0.9.90.1 [Iceweasel 24.5.0/20140429144124]]
feature_creep has joined #ruby
JokesOnYou77 has joined #ruby
<luckyruby> jhass: what are your thoughts on using Hash#fetch instead?
<JokesOnYou77> Hi all
<jhass> luckyruby: better, still I'd try to get sane specs and reject requests not conforming
<luckyruby> request.fetch("POS",{}).fetch("Source",{}).fetch("RequestorID",{}).fetch("@ID",nil)
feature_creep has quit [Client Quit]
run_kmc has joined #ruby
Doppp has quit [Quit: Lost terminal]
<JokesOnYou77> I'm learning rails with railstutorial.org and part of the tutorial is a gem freeze: $ gem update --system 2.1.9 Is that something that I can/should undo later? If so, how?
qwyeth has quit [Remote host closed the connection]
b1205 has quit [Ping timeout: 240 seconds]
Doppp has joined #ruby
except has joined #ruby
heftig has joined #ruby
danshultz has quit [Ping timeout: 276 seconds]
sinkensabe has quit [Remote host closed the connection]
<Hanmac> JokesOnYou77: #rubyonrails
nitr has joined #ruby
qwyeth has joined #ruby
<shevy> JokesOnYou77 if you wish to update all gems sure
<shevy> I dont think you can undo it
<shevy> I would copy all the .gem files
<JokesOnYou77> shevy, Is the change system wide or jsut for the project that I'm in? Is there a way to get bask to whatever the default is?
nitr has quit [Remote host closed the connection]
danshultz has joined #ruby
teddyp1cker has quit []
<shevy> it is system wide
northfurr has joined #ruby
<shevy> so I guess this will just update your rubygem version
Fire-Dragon-DoL has joined #ruby
<shevy> but I mean
<shevy> when you are so concerned, you can always download rubygem manually and just install it
randomnick_ has joined #ruby
randomnick_ has left #ruby [#ruby]
<shevy> additionally all .gem files are cached in $SITE_DIR_PREFIX/lib/ruby/gems/2.1.0/cache/
<JokesOnYou77> I'm only concerned because it's a system setting that I'm likely to forget about I'm I have no doubt will cause conflicts with future projects :/
kireevco has quit [Quit: Leaving.]
mercerist has joined #ruby
randomnick_ has joined #ruby
<shevy> >> system 'gem version'
<eval-in_> shevy => (https://eval.in/157591)
<shevy> >> system 'gem --version'
<eval-in_> shevy => (https://eval.in/157592)
tylersmith has joined #ruby
randomnick_ has quit [Client Quit]
n_blownapart has joined #ruby
<JokesOnYou77> ?
isthisreallife has joined #ruby
isthisreallife has left #ruby [#ruby]
kireevco has joined #ruby
<shevy> I have rubygems 2.2.2
<shevy> the eval-in_ bot apparently won't tell us which gem version it is running on
<JokesOnYou77> cool
nitr_ has joined #ruby
pontiki has joined #ruby
rm_ has joined #ruby
n_blownapart is now known as crucify_me
bmurt has joined #ruby
tessi has quit [Ping timeout: 265 seconds]
nitr_ is now known as Nitr_
CamonZ has joined #ruby
VTLob has quit [Quit: VTLob]
<crucify_me> << I decided not to acquiesce to people who were offended by my nick.
NivenHuH has joined #ruby
wu_ is now known as ix9
vikfroberg has joined #ruby
<arrubin> You rebel.
decoponio has quit [Quit: Leaving...]
<JokesOnYou77> shevy, Will I be able to use gems of a more recent version in a Gemfile or will the system version restrict me in some way?
Xeago has quit [Remote host closed the connection]
<shevy> JokesOnYou77 no idea, I don't use Gemfiles
<JokesOnYou77> :/
NukePuppy has joined #ruby
<CamonZ> hello
<CamonZ> I know it's off topic, but… with what services do I need to identify with to get in #rubyonrails ?
<crucify_me> arrubin: no, I'll change it if it annoys a small handful of people.
<CamonZ> I'm already identified with nickserv
<arrubin> CamonZ: /msg nickserv help
tylersmith has quit [Read error: Connection reset by peer]
<arrubin> CamonZ: Perhaps you are banned.
<CamonZ> arrubin: thanks :)
<CamonZ> arrubin: and weird since I haven't been there in months
tylersmith has joined #ruby
angusiguess has joined #ruby
<CamonZ> arrubin: any way to check?
<arrubin> CamonZ: Type /mode #rubyonrails +b
DaniG2k has joined #ruby
rasta-man has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
<CamonZ> arrubin: got no response from the server
<crucify_me> one question about a tiny piece of this code. (warning, deals with prime numbers) pastie.org/9248181
mary5030 has quit [Ping timeout: 240 seconds]
<arrubin> CamonZ: http://pastie.org/9248210
vikfroberg has quit [Quit: vikfroberg]
<CamonZ> arrubin: thanks again, I'm not on that list
vikfroberg has joined #ruby
Nitr_ is now known as Nitr
<crucify_me> question regards lines 9, 10 ^
<CamonZ> just retried joining the channel and it worked
Guest10518 has left #ruby [#ruby]
angusiguess has quit [Ping timeout: 252 seconds]
Doppp has quit [Ping timeout: 265 seconds]
<run_kmc> crucify_me: what's your question?
kireevco has quit [Quit: Leaving.]
<crucify_me> run_kmc: I can't grep the range that is produced on line 8, 9. let me show you the question if you need to see it..
<run_kmc> crucify_me: yeah, that would help
<crucify_me> run_kmc: one sec
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kireevco has joined #ruby
Nitr has quit []
Nitr has joined #ruby
<crucify_me> http://pastie.org/9248232 sorry run_kmc
<crucify_me> con in the code is consecutive primes I assume run_kmc
doodlehaus has joined #ruby
<crucify_me> cons *
<run_kmc> Yeah. is this a project euler question?
<crucify_me> yeah run_kmc is that alright?
<run_kmc> yeah, just wondered. the question is written in that style. Let me look at this for about 60 seconds
doodlehaus has quit [Client Quit]
<crucify_me> it's ruby modified by a member here run_kmc thanks.
timonv has joined #ruby
IceDragon_ is now known as IceDragon
<crucify_me> its not my code I am trying to kill two birds with one stone by learning this stuff ^
NukePuppy has quit [Ping timeout: 252 seconds]
kireevco has quit [Client Quit]
Nitr is now known as Nitr_
yubrew has joined #ruby
<run_kmc> crucify_me: yeah, line 9 creates an array that is a portion of the primes array called cons
Nitr_ is now known as nitr_aka_anty
<run_kmc> then line 10 adds those all together
timonv has quit [Ping timeout: 264 seconds]
chrisseaton has joined #ruby
<crucify_me> so first run_kmc , why is the block run 10 times. Is that known beforehand because of the numbers being used, or squareRoots or something?
mary5030 has joined #ruby
KLVTZ has quit [Ping timeout: 255 seconds]
amargherio has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 240 seconds]
<run_kmc> That, I'm not sure about. seems like it might be arbitrary. This ruby works, but it doesn't seem really idiomatic.
luckyruby has quit [Quit: Leaving...]
<crucify_me> run_kmc: dang well line 14, end while sum < 1000000 looked funny. ^
claymore has joined #ruby
<run_kmc> crucify_me: yeah, that one sticks out
mary5030 has quit [Remote host closed the connection]
moritzs has quit [Ping timeout: 252 seconds]
moritzschaefer has joined #ruby
<crucify_me> but it is an interesting problem to me. how does that simple accumulator math find the consecutive flush of prime numbers with that range ?
<crucify_me> run_kmc:
moritzschaefer has quit [Max SendQ exceeded]
moritzschaefer has joined #ruby
dawkirst has quit [Remote host closed the connection]
bthesorceror has quit [Remote host closed the connection]
jheg has quit [Quit: jheg]
bthesorceror has joined #ruby
<bmurt> how are ya'll handling a bundle exec command via cron?
jheg_ has quit [Ping timeout: 252 seconds]
<shevy> with prayers
<run_kmc> crucify_me: it is interesting.
phutchins has quit [Ping timeout: 276 seconds]
bthesorceror has quit [Ping timeout: 240 seconds]
<crucify_me> run_kmc: thanks a lot . I took an interest in cryptography without knowing much about programming so my work is cut out.
<run_kmc> crucify_me: anytime, maybe I'll be of more use next time. =)
run_kmc has quit [Quit: Textual IRC Client: www.textualapp.com]
apeiros has quit [Remote host closed the connection]
TorpedoSkyline has quit [Read error: Connection reset by peer]
fpoee has joined #ruby
TorpedoSkyline has joined #ruby
atraylen has joined #ruby
frogssgy has joined #ruby
SCommette has joined #ruby
koell has joined #ruby
fmope has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
fpoee has quit [Client Quit]
fmope has joined #ruby
frosgy has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
AndrewMM has joined #ruby
Atrumx has quit [Quit: Exit]
diegoviola has joined #ruby
AndrewMM has quit [Killed (idoru (Spam is off topic on freenode.))]
benzrf|offline is now known as benzrf
nszceta_ has quit []
JPascal has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackneill has quit [Ping timeout: 245 seconds]
reactormonk has joined #ruby
akonny has quit [Quit: akonny]
tectonic has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crucify_me has quit []
northfurr has quit [Quit: northfurr]
TorpedoSkyline has joined #ruby
rurban_ has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
n_blownapart has joined #ruby
gorpon has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rurban_ has joined #ruby
bthesorceror has joined #ruby
koell has quit [Ping timeout: 255 seconds]
ndrei has quit [Ping timeout: 255 seconds]
tylersmi_ has joined #ruby
cpruitt has quit [Read error: Connection reset by peer]
tylersmith has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
bthesorceror has quit [Remote host closed the connection]
angusiguess has joined #ruby
phansch has quit [Quit: WeeChat 0.4.3]
gorpon has quit [Ping timeout: 260 seconds]
feature_creep has joined #ruby
RaptorJesus is now known as And
And is now known as RaptorJesus
Takle has quit [Remote host closed the connection]
amargherio has quit [Remote host closed the connection]
Doppp has joined #ruby
CamonZ has quit [Quit: Linkinus - http://linkinus.com]
angusiguess has quit [Ping timeout: 276 seconds]
feature_creep has quit [Client Quit]
Doppp has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
Morrolan has quit [Quit: ZNC: Shutting down.]
Xeago has joined #ruby
KLVTZ has joined #ruby
GriffinHeart has joined #ruby
benzrf is now known as benzrf|offline
diegoviola has quit [Quit: WeeChat 0.4.3]
<vikfroberg> Difference between *ARGV and ARGV?
Xeago has quit [Ping timeout: 260 seconds]
benzrf|offline is now known as benzrf
__class__ has quit [Ping timeout: 264 seconds]
cpruitt has quit [Quit: cpruitt]
GriffinHeart has quit [Ping timeout: 260 seconds]
Morrolan has joined #ruby
<tectonic> vikfroberg ARGV is an array, *ARGV is that array splatted out as a parameter list
<tectonic> p ARGV # => ['foo', 'bar']
sputnik13 has joined #ruby
<tectonic> p *ARGV # => 'foo', 'bar'
chipotle has joined #ruby
dik_dak has joined #ruby
<vikfroberg> Thanks
SCommette has quit [Quit: SCommette]
claymore has quit [Quit: Leaving]
nahtnam has joined #ruby
<nahtnam> Hello
<nahtnam> I have a string of numbers
Rahul_Roy has quit [Quit: Connection closed for inactivity]
<nahtnam> I want to make a for statement that will go and process every number in that string
banisterone has joined #ruby
jaredrhine has quit [Quit: No Ping reply in 180 seconds.]
<jhass> give example input and desired output
nitr_aka_anty has quit [Remote host closed the connection]
<tectonic> string.scan(/\d+/).each do |number|
<jhass> you be floats as well
<jhass> *could
nitr_aka_anty has joined #ruby
<nahtnam> jhass: Input "110010", and I want to reverse the numbers, so "001101"
<jhass> why don't you just call .reverse?
Lemur is now known as baweaver
<tectonic> string.scan(/-?\d+(\.\d+)?/).map(&:to_f).each do |number|
<tectonic> oh
<nahtnam> jhass: Does that work for numbers?
<jhass> oh you mean invert
<jhass> look at it as a string manipulation problem
<jhass> >> "110010".tr('10', '01')
<eval-in_> jhass => "001101" (https://eval.in/157617)
nitr_aka_anty has quit [Ping timeout: 252 seconds]
jaredrhine has joined #ruby
mburns has quit [Quit: ZNC - http://znc.sourceforge.net]
apeiros has quit [Ping timeout: 276 seconds]
mburns has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
<nahtnam> Thanks guys!
<toertore> >> '%06d' % ('110010'.to_i(2) ^ '111111'.to_i(2)).to_s(2)
<toertore> :(
banisterone has quit [Ping timeout: 240 seconds]
FenixFyreX has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
jhass is now known as jhass|off
Olipro has quit [*.net *.split]
rm_ has quit [Remote host closed the connection]
banisterone has joined #ruby
rathrio has joined #ruby
rm_ has joined #ruby
m8 has quit [Quit: Sto andando via]
jamto11 has quit [Remote host closed the connection]
mijicd has quit [Quit: leaving]
feature_creep has joined #ruby
Shidash has quit [Ping timeout: 240 seconds]
sinkensabe has joined #ruby
n_blownapart has quit []
yfeldblum has joined #ruby
AndChat|102836 has joined #ruby
rm_ has quit [Ping timeout: 252 seconds]
kirun has quit [Quit: Client exiting]
klaut has quit [Remote host closed the connection]
banisterone has quit [Ping timeout: 276 seconds]
andrewlio has quit [Quit: Leaving.]
merceris_ has joined #ruby
mercerist has quit [Read error: Connection reset by peer]
SCommette has joined #ruby
sinkensabe has quit [Ping timeout: 252 seconds]
bthesorceror has joined #ruby
coderhs has quit [Ping timeout: 252 seconds]
gregf has joined #ruby
robert___ is now known as robert_
Gadgetoid has quit [Ping timeout: 240 seconds]
hermanmunster has quit [Remote host closed the connection]
DaniG2k has quit [Quit: leaving]
Olipro has joined #ruby
hermanmunster has joined #ruby
AndChat|102836 has quit [Read error: Connection reset by peer]
feature_creep has quit [Quit: feature_creep]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspires has joined #ruby
anaeem1 has quit [Remote host closed the connection]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
jamto11 has joined #ruby
b1205 has joined #ruby
banisterone has joined #ruby
sputnik13 has joined #ruby
hermanmunster has quit [Ping timeout: 260 seconds]
Shidash has joined #ruby
rm_ has joined #ruby
jamto11 has quit [Ping timeout: 252 seconds]
Gadgetoid has joined #ruby
sputnik13 has quit [Ping timeout: 252 seconds]
feature_creep has joined #ruby
bthesorceror has quit [Remote host closed the connection]
bin_bash has joined #ruby
banister has joined #ruby
__class__ has joined #ruby
zastern has quit [Ping timeout: 252 seconds]
zastern has joined #ruby
feature_creep has quit [Client Quit]
nfk has quit [Quit: yawn]
adeponte has quit [Ping timeout: 252 seconds]
Tentra has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
Valesk has joined #ruby
adeponte has joined #ruby
dik_dak has quit [Quit: Leaving]
bmurt has quit []
<nahtnam> I split a file and got around 10 numbers. How can I get the second one?
bin_bash has left #ruby ["proprium humani ingenii est odisse quem laeseris"]
<nahtnam> I got these numbers.
<nahtnam> I need the second number.
<nahtnam> (1)
<shevy> nahtnam File.readlines()[1]
<shevy> as argument pass the name of your file
lethjakman has joined #ruby
<nahtnam> shevy: I actually cant do that. I have no clue what the file name is.
<nahtnam> My cousin gave me a challenge
<nahtnam> and im stuck
<shevy> it does not matter
<nahtnam> Here is the code I have right now
<nahtnam> So would I do inputs.readLines?
<shevy> no
<shevy> you already have your array
<shevy> correct?
<shevy> you assign it to the variable called inputs
<nahtnam> Yea
<shevy> so simply do inputs[1]
<nahtnam> Lol
<nahtnam> Im stupid
<toertore> nahtnam: keep a counter
<shevy> array operations are always the same
yubrew has quit [Ping timeout: 260 seconds]
<toertore> nahtnam: then when you get to the right number you know it's the correct line
<shevy> toertore hey isn't your nick normally toretore?
ix9 is now known as wu_
aspires has quit []
mercwithamouth has joined #ruby
<toertore> sometimes
<shevy> that so freaks my brain out :(
bitscraper has joined #ruby
ixti has joined #ruby
angusiguess has joined #ruby
seanewest has joined #ruby
JokerDoom has quit [Ping timeout: 252 seconds]
<nahtnam> How come i++ doesnt work in ruby?
MatthewsFace has joined #ruby
<toertore> nahtnam: why should it?
<toertore> that's like asking why `array.map{|e| }` doesn't work in java
KLVTZ has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
rathrio has quit [Quit: rathrio]
chrisseaton has quit [Read error: Connection reset by peer]
<toertore> (the real reason is that ++ implies mutation but numbers are immutable)
<seanewest> wow i’ve wondered that question for so long … thank you
zorak_ has quit [Ping timeout: 240 seconds]
<seanewest> wait a sec but wouldn’t i+=1 mutate i just like i++ would?
<havenn> seanewest: `+=` assigns the variable to the next Fixnum without mutating any Fixnums
<toertore> it's mostly about perception i think
<nahtnam> This takes forever to run: https://gist.github.com/nahtnam/c7c8e6b68326b5b4e273 What can I do to make it faster?
einarj has quit [Ping timeout: 264 seconds]
b1205 has quit [Ping timeout: 264 seconds]
<nahtnam> (the logic behind it is correct), and it works
<nahtnam> but it takes forever for big files
<toertore> str += another_str creates a new string
Tentra has joined #ruby
<shevy> nahtnam define "big"
<nahtnam> shevy: A few hundred lines of random numbers
<nahtnam> so for each number, it has to run a hundred times
<nahtnam> It would have to run 10k times
<nahtnam> And if its bigger, it would take longer
<shevy> eh
<shevy> spaghetti code
<toertore> nahtnam: what is the code for?
<nahtnam> Sorry
<nahtnam> toertore: My cousin wants me to learn ruby
<nahtnam> He gave me a challenge
jack_rabbit has quit [Ping timeout: 252 seconds]
<shevy> I think your cousin hates you
<nahtnam> Lol :D
<nahtnam> I love him tho
<toertore> sure.. but what's the challenge?
<shevy> well you learn ruby through weird challenges
zorak_ has joined #ruby
<nahtnam> toertore: He gives me a list of numbers
steveeJ has left #ruby ["Leaving"]
<nahtnam> he wants me to check and see if any numbers subtracted = to the number given
<nahtnam> He told me its called Delta
<havenn> nahtnam: inputs.product(inputs).count { |number, second| number.to_i - second.to_i == delta }
<nahtnam> So, anything I can do to make it faster?
<havenn> nahtnam: ^ replaces lines 6-14
<havenn> nahtnam: or something along those lines, being distracted here :P
<nahtnam> It works
<shevy> whoa
<shevy> File.delete will work without requiring anything right? I kept on using fileutils
predator117 has joined #ruby
<havenn> shevy: yup
<shevy> \o/
rOOb has joined #ruby
Kricir has joined #ruby
zorak_ has quit [Ping timeout: 265 seconds]
predator217 has quit [Ping timeout: 252 seconds]
banisterone has quit [Read error: Connection reset by peer]
<toertore> you need FileUtils for rm_rf
havenn is now known as havenwood
zenojis has quit [Ping timeout: 240 seconds]
b1205 has joined #ruby
chipotle has quit [Quit: cya]
TorpedoSkyline has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nahtnam has quit [Quit: Page closed]
davedev24_ has quit []
zenojis has joined #ruby
ixti has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
davedev24_ has joined #ruby
lyuzashi has joined #ruby
zorak_ has joined #ruby
diegoviola has joined #ruby
Takle has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 265 seconds]
seanewest has quit [Quit: seanewest]
hermanmunster has joined #ruby
ejnahc has quit [Remote host closed the connection]
ejnahc has joined #ruby
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
lethjakman has quit [Ping timeout: 276 seconds]
linoespinoza has joined #ruby
Kricir has quit [Remote host closed the connection]
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
GriffinHeart has joined #ruby
pagioss has quit [Ping timeout: 252 seconds]
rm_ has quit [Read error: Connection reset by peer]
rm_ has joined #ruby
ctp has joined #ruby
nanoyak has joined #ruby
lethe has joined #ruby
GriffinHeart has quit [Ping timeout: 252 seconds]
ixti has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seanewest has joined #ruby
jay1111 has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
jay1111 has quit [Client Quit]
Shidash has quit [Ping timeout: 255 seconds]
linoespinoza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danijoo has joined #ruby
nanoyak has quit [Ping timeout: 265 seconds]
Vivekananda has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
linoespinoza has joined #ruby
lethe has quit [Ping timeout: 265 seconds]
george2 has quit [Remote host closed the connection]
seanewest has quit [Client Quit]
seanewest has joined #ruby